Class FFrameGrid
java.lang.Object
org.gvsig.app.project.documents.layout.fframes.FFrame
org.gvsig.app.project.documents.layout.fframes.AbstractFFrameViewDependence
org.gvsig.app.project.documents.layout.fframes.FFrameGrid
- All Implemented Interfaces:
Cloneable,IFFrame,IFFrameViewDependence,org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable,org.gvsig.tools.dispose.Disposable,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.observer.Observable,org.gvsig.tools.persistence.Persistent
FFrame para introducir una cuadrícula sobre una vista en el Layout.
- Author:
- Vicente Caballero Navarro
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUse a fixed distance (intervalX and intervalY) to calculate the position of grid linesstatic final intUse a specific number of horizontal divisions in order to calculate the position of grid linesstatic final intUse a specific number of vertical divisions in order to calculate the position of grid linesstatic final StringFields inherited from class org.gvsig.app.project.documents.layout.fframes.AbstractFFrameViewDependence
fframeViewDependenceFields inherited from class org.gvsig.app.project.documents.layout.fframes.FFrame
e, frameFactory, iEResize, iNResize, lastAT, layoutManager, LOG, m_BoundBox, m_Selected, n, ne, no, num, o, observers, s, se, so -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g, AffineTransform at, Rectangle2D rv, BufferedImage imgBase) Draws the FFrame on the provided Graphics, according to the provided affine transform and the visible rectangle.voidDibuja los handlers sobre el boundingBox en el graphics que se pasa como par�metro.Returns the bounding box (in pixels) of this FFrame, based on the provided AffineTransform.getFont()intdoubleGets the rotation of the labels corresponding to horizontal linesdoubledoubleintDefines the alignment of the grid label compared with the associated grid tickDevuelve el rect�ngulo que representa el �ltimo generado al desplazar o modificar el tama�o del fframe.getMovieRect(int difx, int dify) Devuelve el rect�ngulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.getMovieRect(int difx, int dify, boolean prop) Devuelve el rectángulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.getName()Devuelve el nombre que representa al fframe.Devuelve el nombre que representa al tipo de FFrame.intintintorg.gvsig.fmap.mapcontext.rendering.symbols.ISymbolorg.gvsig.fmap.mapcontext.rendering.symbols.ISymbolintReturns true if a number of divisions is used to calculate the location of grid lines, or false if a distance (intervalX and intervalY) is used to calculate them.doubleGets the rotation of the labels corresponding to vertical linesbooleanisLine()voidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidprint(Graphics2D g, AffineTransform at, org.gvsig.fmap.geom.Geometry shape, org.gvsig.compat.print.PrintAttributes properties) voidrefreshDependence(IFFrame fant, IFFrame fnew) Refresca las dependencias de la IFFrame teniendo en cuenta la dependencia anterior.static voidvoidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidInserta una FFrame de la cual se necesita por tener una dependencia.voidvoidsetHorizLabelRotation(double labelRotation) Sets the rotation of the labels corresponding to horizontal linesvoidsetIntervalX(double d) voidsetIntervalY(double d) voidsetIsLine(boolean b) voidsetLabelAnchor(int anchor) Gets the alignment of the grid labels.voidvoidsetNumDivisionsHoriz(int nx) voidsetNumDivisionsVert(int ny) voidsetSizeFont(int sizeFont) voidsetSymbolLine(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbolLine) voidsetSymbolPoint(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbolPoint) voidsetTextColor(Color textcolor) voidsetUseNumDivisions(int mode) Defines whether a number of divisions is used to calculate the location of grid lines, or a distance (intervalX and intervalY) is used to calculate them.voidsetVertLabelRotation(double labelRotation) Sets the rotation of the labels corresponding to vertical linesprotected voidprotected voidupdateIntervals(org.gvsig.fmap.geom.primitive.Envelope env) Methods inherited from class org.gvsig.app.project.documents.layout.fframes.AbstractFFrameViewDependence
clone, getFFrameDependenceMethods inherited from class org.gvsig.app.project.documents.layout.fframes.FFrame
addObserver, contains, deleteObserver, deleteObservers, dispose, doSetSelected, drawDraft, drawEmpty, drawSymbolTag, frameAdded, frameRemoved, getBoundBox, getContains, getDocument, getFrameFactory, getLayoutContext, getLevel, getMapCursor, getRotation, getRotationAT, getSelected, getTag, getVisibleRect, initializeIcons, intersects, isSelected, setBoundBox, setDocument, setFrameFactory, setLayoutContext, setLevel, setNum, setRotation, setSelected, setSelected, setTag, updateRectMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gvsig.app.project.documents.layout.fframes.IFFrameViewDependence
getFFrameDependence
-
Field Details
-
PERSISTENCE_DEFINITION_NAME
- See Also:
-
FIXED_DISTANCE_MODE
public static final int FIXED_DISTANCE_MODEUse a fixed distance (intervalX and intervalY) to calculate the position of grid lines- See Also:
-
NUM_DIVISIONS_HORIZ_MODE
public static final int NUM_DIVISIONS_HORIZ_MODEUse a specific number of horizontal divisions in order to calculate the position of grid lines- See Also:
-
NUM_DIVISIONS_VERT_MODE
public static final int NUM_DIVISIONS_VERT_MODEUse a specific number of vertical divisions in order to calculate the position of grid lines- See Also:
-
-
Constructor Details
-
FFrameGrid
public FFrameGrid()
-
-
Method Details
-
draw
Description copied from class:FFrameDraws the FFrame on the provided Graphics, according to the provided affine transform and the visible rectangle. It has to to be implemented by each FFrame, as each of them usually draws diffently. -
getNameFFrame
Description copied from interface:IFFrameDevuelve el nombre que representa al tipo de FFrame.- Specified by:
getNameFFramein interfaceIFFrame- Returns:
- nombre del elemento.
-
getName
Description copied from interface:IFFrameDevuelve el nombre que representa al fframe. -
setFFrameDependence
Description copied from interface:IFFrameViewDependenceInserta una FFrame de la cual se necesita por tener una dependencia.- Specified by:
setFFrameDependencein interfaceIFFrameViewDependence- Overrides:
setFFrameDependencein classAbstractFFrameViewDependence- Parameters:
f- FFrame de la que se depende.
-
setIntervalX
public void setIntervalX(double d) -
setIntervalY
public void setIntervalY(double d) -
getIntervalX
public double getIntervalX() -
getIntervalY
public double getIntervalY() -
setTextColor
-
setIsLine
public void setIsLine(boolean b) -
isLine
public boolean isLine() -
getFontColor
-
getSizeFont
public int getSizeFont() -
setSizeFont
public void setSizeFont(int sizeFont) -
getBoundingBox
Description copied from class:FFrameReturns the bounding box (in pixels) of this FFrame, based on the provided AffineTransform. If the AffineTransform is null, it returns the last calculated bounding box.- Specified by:
getBoundingBoxin interfaceIFFrame- Overrides:
getBoundingBoxin classFFrame- Parameters:
at- Affine transform to apply to the sheet coordinates to get the bounding box in pixels.- Returns:
- Rectangle representing the bounding box (in pixels) of this FFrame
-
getMovieRect
Description copied from class:FFrameDevuelve el rect�ngulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.- Specified by:
getMovieRectin interfaceIFFrame- Overrides:
getMovieRectin classFFrame- Parameters:
difx- desplazamiento sobre el eje x.dify- desplazamiento sobre el eje y.- Returns:
- rect�ngulo modificado en funci�n del desplazamiento realizado.
-
getMovieRect
Description copied from interface:IFFrameDevuelve el rectángulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.- Specified by:
getMovieRectin interfaceIFFrame- Overrides:
getMovieRectin classFFrame- Parameters:
difx- desplazamiento sobre el eje x.dify- desplazamiento sobre el eje y.prop- true para un desplazamiento proporcional- Returns:
- rectángulo modificado en función del desplazamiento realizado.
-
refreshDependence
Description copied from interface:IFFrameViewDependenceRefresca las dependencias de la IFFrame teniendo en cuenta la dependencia anterior.- Specified by:
refreshDependencein interfaceIFFrameViewDependence- Overrides:
refreshDependencein classAbstractFFrameViewDependence- Parameters:
fant- Dependencia anterior.fnew- Nueva dependencia.
-
drawHandlers
Description copied from class:FFrameDibuja los handlers sobre el boundingBox en el graphics que se pasa como par�metro.- Specified by:
drawHandlersin interfaceIFFrame- Overrides:
drawHandlersin classFFrame- Parameters:
g- Graphics sobre el que dibujar.
-
getLastMoveRect
Description copied from class:FFrameDevuelve el rect�ngulo que representa el �ltimo generado al desplazar o modificar el tama�o del fframe.- Specified by:
getLastMoveRectin interfaceIFFrame- Overrides:
getLastMoveRectin classFFrame- Returns:
- Rectangle2D
-
getSymbolLine
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolLine() -
setSymbolLine
public void setSymbolLine(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbolLine) -
getSymbolPoint
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolPoint() -
setSymbolPoint
public void setSymbolPoint(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbolPoint) -
getFont
-
setFont
-
getFontSize
public int getFontSize() -
setUseNumDivisions
public void setUseNumDivisions(int mode) Defines whether a number of divisions is used to calculate the location of grid lines, or a distance (intervalX and intervalY) is used to calculate them.- Parameters:
useNumDivisions- One ofFIXED_DISTANCE_MODE,NUM_DIVISIONS_HORIZ_MODEorNUM_DIVISIONS_HORIZ_MODE.
-
updateIntervals
protected void updateIntervals() -
updateIntervals
protected void updateIntervals(org.gvsig.fmap.geom.primitive.Envelope env) -
getUseNumDivisions
public int getUseNumDivisions()Returns true if a number of divisions is used to calculate the location of grid lines, or false if a distance (intervalX and intervalY) is used to calculate them.- Returns:
- One of
FIXED_DISTANCE_MODE,NUM_DIVISIONS_HORIZ_MODEorNUM_DIVISIONS_VERT_MODE.
-
setNumDivisionsHoriz
public void setNumDivisionsHoriz(int nx) -
setNumDivisionsVert
public void setNumDivisionsVert(int ny) -
getNumDivisionsHoriz
public int getNumDivisionsHoriz() -
getNumDivisionsVert
public int getNumDivisionsVert() -
setLabelFormat
-
getLabelFormat
-
setHorizLabelRotation
public void setHorizLabelRotation(double labelRotation) Sets the rotation of the labels corresponding to horizontal lines- Parameters:
labelRotation- Label rotation, measured in arc degrees
-
setVertLabelRotation
public void setVertLabelRotation(double labelRotation) Sets the rotation of the labels corresponding to vertical lines- Parameters:
labelRotation- Label rotation, measured in arc degrees
-
getHorizLabelRotation
public double getHorizLabelRotation()Gets the rotation of the labels corresponding to horizontal lines- Parameters:
labelRotation- Label rotation, measured in arc degrees
-
getLabelAnchor
public int getLabelAnchor()Defines the alignment of the grid label compared with the associated grid tick- Parameters:
anchor-orinvalid reference
RotatedTextUtils.ANCHOR_CORNERinvalid reference
RotatedTextUtils.ANCHOR_CENTER
-
setLabelAnchor
public void setLabelAnchor(int anchor) Gets the alignment of the grid labels. ANCHOR_CORNER aligns the corner of the label with the grid tick, while ANCHOR_CENTER aligns the label center with the grid tick.- Parameters:
anchor-orinvalid reference
RotatedTextUtils.ANCHOR_CORNERinvalid reference
RotatedTextUtils.ANCHOR_CENTER
-
getVertLabelRotation
public double getVertLabelRotation()Gets the rotation of the labels corresponding to vertical lines- Parameters:
labelRotation- Label rotation, measured in arc degrees
-
print
public void print(Graphics2D g, AffineTransform at, org.gvsig.fmap.geom.Geometry shape, org.gvsig.compat.print.PrintAttributes properties) - Specified by:
printin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.IPrintable
-
registerPersistent
public static void registerPersistent() -
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
loadFromStatein classAbstractFFrameViewDependence- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
saveToStatein classAbstractFFrameViewDependence- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-