Interface LayoutControl
- All Superinterfaces:
org.gvsig.tools.observer.Observer
- All Known Implementing Classes:
DefaultLayoutControl
public interface LayoutControl
extends org.gvsig.tools.observer.Observer
- Author:
- Jorge Piera Llodrá
-
Method Summary
Modifier and TypeMethodDescriptionintAdd a new point to geometryAdapter.voidaddLayoutTool(String name, LayoutBehavior tool) Add a new Layout tool.voidClear the image of pointer of mouse.voidRemove last point of geometryAdapter.voidfullRect()It obtains the rect that is adjusted to the size of the window, to see the full extent of layout.getAT()Returns the AffineTransform that is applying in the Layout.Returns the current Layout tool.Returns the name of the current selected tool on this LayoutIt returns the first click point of mouse.It returns the current GeometryAdapter.intgetImage()Returns the current image of Layout.Returns the image with the ruler.Returns the last click point of mouse.Returns the LayoutContext.Returns the object to draw the Layout.Returns the object of FLayoutFunctions.getLayoutTool(String name) Returns the object to make zooms.Returns the previous click of mouse.Returns the position adjusted point.getRect()Returns a copy of the rectangle that represents the size and position of the layout sheet (in pixels), relative to the containing LayoutControl.It returns the point that represents the northwest corner of the Layout.getReSel()Returns the rectangle of selection.intgetWidth()booleanIt returns true if the drawing has been canceled.booleanisReSel()It returns true if should draw the rectangle of selection and does the selection.voidrefresh()Refres the Layout.voidrepaint()voidsetCancelDrawing(boolean b) It cancels the drawing if the parameter is true.voidChanges the currently selected tool to the default toolvoidInserts the first click point of mouse.voidsetGeometryAdapter(GeometryAdapter adapter) Inserts the geometryAdapter.voidChange the position of mousemoved point of geometryAdapter.voidsetIsReSel(boolean b) Insert true if should draw the rectangle of selection and does the selection.voidInserts the last click point of mouse.voidInserts the LayoutContext.voidsetMapCursor(Image image) Changes the pointer of the mouse by the image of parameter.voidInserts the previous click point of mouse.voidsetPosition(Point point2) Insert the position point and calculate the new position if the grid is actived.voidSets the size and position of the layout sheet in screen coordinates (pixels), relative to the LayoutControl.voidIt establishes as selected to the tool from its name of identification.voidStart the vertex edition of graphics.voidstopEdit()Stop the vertex edition of graphics.voidviewFull()It does a full extent of the layers that contains the view of the FFrameView selected.Methods inherited from interface org.gvsig.tools.observer.Observer
update
-
Method Details
-
getRect
Rectangle2D.Double getRect()Returns a copy of the rectangle that represents the size and position of the layout sheet (in pixels), relative to the containing LayoutControl.
Note: you must use
setRect(Rectangle2D)to update the rectangle, as this method only returns a copy of it.- Returns:
- Rectangle2D.Double Rectangle that represents the sheet.
- See Also:
-
setRect
Sets the size and position of the layout sheet in screen coordinates (pixels), relative to the LayoutControl.
The size of the sheet is usually different from the bounds of the underlying UI control, for instance if we have zoomed in an area of the sheet then the paper size in pixels will be bigger than the actual control size.
-
getCurrentTool
String getCurrentTool()Returns the name of the current selected tool on this Layout- Returns:
- A tool name.
-
addLayoutTool
Add a new Layout tool.- Parameters:
name- Name of tool.tool- LayoutBehavior
-
getLayoutTool
-
setLayoutContext
Inserts the LayoutContext.- Parameters:
lc- LayoutContext.
-
getImgRuler
BufferedImage getImgRuler()Returns the image with the ruler.- Returns:
- Ruler image.
-
fullRect
void fullRect()It obtains the rect that is adjusted to the size of the window, to see the full extent of layout. -
getImage
BufferedImage getImage()Returns the current image of Layout.- Returns:
- Current image of Layout.
-
setMapCursor
Changes the pointer of the mouse by the image of parameter.- Parameters:
image- Image
-
setTool
It establishes as selected to the tool from its name of identification.- Parameters:
toolName- Name of identification tool.
-
setDefaultTool
void setDefaultTool()Changes the currently selected tool to the default tool -
startEdit
void startEdit()Start the vertex edition of graphics. -
stopEdit
void stopEdit()Stop the vertex edition of graphics. -
getRectOrigin
Point getRectOrigin()It returns the point that represents the northwest corner of the Layout.- Returns:
- Point.
-
getLayoutDraw
FLayoutDraw getLayoutDraw()Returns the object to draw the Layout.- Returns:
- FLayoutDraw.
-
getCurrentLayoutTool
LayoutBehavior getCurrentLayoutTool()Returns the current Layout tool.- Returns:
- LayoutBehavior Current Layout Tool.
-
getFirstPoint
Point getFirstPoint()It returns the first click point of mouse.- Returns:
- Point.
-
getPointAnt
Point getPointAnt()Returns the previous click of mouse.- Returns:
- Point.
-
getLastPoint
Point getLastPoint()Returns the last click point of mouse.- Returns:
- Point.
-
setFirstPoint
void setFirstPoint()Inserts the first click point of mouse.- Parameters:
p- Point.
-
setPointAnt
void setPointAnt()Inserts the previous click point of mouse.- Parameters:
p- Point.
-
setLastPoint
void setLastPoint()Inserts the last click point of mouse.- Parameters:
p- Point.
-
setPosition
Insert the position point and calculate the new position if the grid is actived.- Parameters:
point2- Position.
-
getPosition
Point getPosition()Returns the position adjusted point.- Returns:
-
getAT
AffineTransform getAT()Returns the AffineTransform that is applying in the Layout.- Returns:
- AffineTransform
-
getGeometryAdapter
GeometryAdapter getGeometryAdapter()It returns the current GeometryAdapter.- Returns:
- Current GeometryAdapter.
-
delLastPoint
void delLastPoint()Remove last point of geometryAdapter. -
addGeometryAdapterPoint
int addGeometryAdapterPoint()Add a new point to geometryAdapter.- Returns:
- Number of points in the geometryAdapter.
-
setGeometryAdapterPoinPosition
void setGeometryAdapterPoinPosition()Change the position of mousemoved point of geometryAdapter. -
clearMouseImage
void clearMouseImage()Clear the image of pointer of mouse. -
refresh
void refresh()Refres the Layout. -
isDrawingCancelled
boolean isDrawingCancelled()It returns true if the drawing has been canceled.- Returns:
- true if the drawn has been canceled.
-
setCancelDrawing
void setCancelDrawing(boolean b) It cancels the drawing if the parameter is true.- Parameters:
b- true if the drawing wants to be canceled
-
getReSel
Rectangle getReSel()Returns the rectangle of selection.- Returns:
- Rectangle of selection.
-
isReSel
boolean isReSel()It returns true if should draw the rectangle of selection and does the selection.- Returns:
- true if should draw the rectangle of selection.
-
setIsReSel
void setIsReSel(boolean b) Insert true if should draw the rectangle of selection and does the selection.- Parameters:
b- boolean.
-
viewFull
void viewFull() throws org.gvsig.fmap.dal.exception.ReadExceptionIt does a full extent of the layers that contains the view of the FFrameView selected. -
getLayoutZooms
FLayoutZooms getLayoutZooms()Returns the object to make zooms.- Returns:
- FLayoutZooms.
-
getLayoutFunctions
FLayoutFunctions getLayoutFunctions()Returns the object of FLayoutFunctions.- Returns:
- FLayoutFunctions
-
getLayoutContext
LayoutContext getLayoutContext()Returns the LayoutContext.- Returns:
- LayoutContext.
-
setGeometryAdapter
Inserts the geometryAdapter.- Parameters:
adapter- GeometryAdapter.
-
getComponent
JComponent getComponent() -
getWidth
int getWidth() -
getHeight
int getHeight() -
repaint
void repaint()
-