public class FFrameGrid extends AbstractFFrameViewDependence implements IFFrameViewDependence
Modifier and Type | Field and Description |
---|---|
static int |
FIXED_DISTANCE_MODE
Use a fixed distance (intervalX and intervalY)
to calculate the position of grid lines
|
static int |
NUM_DIVISIONS_HORIZ_MODE
Use a specific number of horizontal divisions in order
to calculate the position of grid lines
|
static int |
NUM_DIVISIONS_VERT_MODE
Use a specific number of vertical divisions in order to calculate
the position of grid lines
|
static String |
PERSISTENCE_DEFINITION_NAME |
fframeViewDependence
e, frameFactory, lastAT, layoutManager, LOG, m_BoundBox, m_Selected, n, ne, no, num, o, observers, s, se, so
Constructor and Description |
---|
FFrameGrid() |
Modifier and Type | Method and Description |
---|---|
void |
draw(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.
|
void |
drawHandlers(Graphics2D g)
Dibuja los handlers sobre el boundingBox en el graphics que se pasa como
par�metro.
|
Rectangle2D.Double |
getBoundingBox(AffineTransform at)
Returns the bounding box (in pixels) of this FFrame, based on the provided
AffineTransform.
|
Font |
getFont() |
Color |
getFontColor() |
int |
getFontSize() |
double |
getHorizLabelRotation()
Gets the rotation of the labels corresponding to horizontal lines
|
double |
getIntervalX() |
double |
getIntervalY() |
int |
getLabelAnchor()
Defines the alignment of the grid label compared with the
associated grid tick
|
DecimalFormat |
getLabelFormat() |
Rectangle2D |
getLastMoveRect()
Devuelve el rect�ngulo que representa el �ltimo generado al desplazar
o modificar el tama�o del fframe.
|
Rectangle2D |
getMovieRect(int difx,
int dify)
Devuelve el rect�ngulo a partir del desplazamiento en el eje x y el
desplazamiento en el eje y.
|
String |
getName()
Devuelve el nombre que representa al fframe.
|
String |
getNameFFrame()
Devuelve el nombre que representa al tipo de FFrame.
|
int |
getNumDivisionsHoriz() |
int |
getNumDivisionsVert() |
int |
getSizeFont() |
ISymbol |
getSymbolLine() |
ISymbol |
getSymbolPoint() |
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.
|
double |
getVertLabelRotation()
Gets the rotation of the labels corresponding to vertical lines
|
boolean |
isLine() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
print(Graphics2D g,
AffineTransform at,
Geometry shape,
PrintAttributes properties) |
void |
refreshDependence(IFFrame fant,
IFFrame fnew)
Refresca las dependencias de la IFFrame teniendo en cuenta la dependencia
anterior.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setFFrameDependence(IFFrame f)
Inserta una FFrame de la cual se necesita por tener una dependencia.
|
void |
setFont(Font m_font) |
void |
setHorizLabelRotation(double labelRotation)
Sets the rotation of the labels corresponding to horizontal lines
|
void |
setIntervalX(double d) |
void |
setIntervalY(double d) |
void |
setIsLine(boolean b) |
void |
setLabelAnchor(int anchor)
Gets the alignment of the grid labels.
|
void |
setLabelFormat(DecimalFormat f) |
void |
setNumDivisionsHoriz(int nx) |
void |
setNumDivisionsVert(int ny) |
void |
setSizeFont(int sizeFont) |
void |
setSymbolLine(ISymbol symbolLine) |
void |
setSymbolPoint(ISymbol symbolPoint) |
void |
setTextColor(Color textcolor) |
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.
|
void |
setVertLabelRotation(double labelRotation)
Sets the rotation of the labels corresponding to vertical lines
|
protected void |
updateIntervals() |
protected void |
updateIntervals(Envelope env) |
clone, getFFrameDependence
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, updateRect
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFFrameDependence
public static final String PERSISTENCE_DEFINITION_NAME
public static final int FIXED_DISTANCE_MODE
public static final int NUM_DIVISIONS_HORIZ_MODE
public static final int NUM_DIVISIONS_VERT_MODE
public void draw(Graphics2D g, AffineTransform at, Rectangle2D rv, BufferedImage imgBase)
FFrame
public String getNameFFrame()
IFFrame
getNameFFrame
in interface IFFrame
public String getName()
IFFrame
public void setFFrameDependence(IFFrame f)
IFFrameViewDependence
setFFrameDependence
in interface IFFrameViewDependence
setFFrameDependence
in class AbstractFFrameViewDependence
f
- FFrame de la que se depende.public void setIntervalX(double d)
public void setIntervalY(double d)
public double getIntervalX()
public double getIntervalY()
public void setTextColor(Color textcolor)
public void setIsLine(boolean b)
public boolean isLine()
public Color getFontColor()
public int getSizeFont()
public void setSizeFont(int sizeFont)
public Rectangle2D.Double getBoundingBox(AffineTransform at)
FFrame
getBoundingBox
in interface IFFrame
getBoundingBox
in class FFrame
at
- Affine transform to apply to the sheet coordinates to get the
bounding box in pixels.public Rectangle2D getMovieRect(int difx, int dify)
FFrame
getMovieRect
in interface IFFrame
getMovieRect
in class FFrame
difx
- desplazamiento sobre el eje x.dify
- desplazamiento sobre el eje y.public void refreshDependence(IFFrame fant, IFFrame fnew)
IFFrameViewDependence
refreshDependence
in interface IFFrameViewDependence
refreshDependence
in class AbstractFFrameViewDependence
fant
- Dependencia anterior.fnew
- Nueva dependencia.public void drawHandlers(Graphics2D g)
FFrame
drawHandlers
in interface IFFrame
drawHandlers
in class FFrame
g
- Graphics sobre el que dibujar.public Rectangle2D getLastMoveRect()
FFrame
getLastMoveRect
in interface IFFrame
getLastMoveRect
in class FFrame
public ISymbol getSymbolLine()
public void setSymbolLine(ISymbol symbolLine)
public ISymbol getSymbolPoint()
public void setSymbolPoint(ISymbol symbolPoint)
public Font getFont()
public void setFont(Font m_font)
public int getFontSize()
public void setUseNumDivisions(int mode)
useNumDivisions
- One of FIXED_DISTANCE_MODE
,
NUM_DIVISIONS_HORIZ_MODE
or NUM_DIVISIONS_HORIZ_MODE
.protected void updateIntervals()
protected void updateIntervals(Envelope env)
public int getUseNumDivisions()
FIXED_DISTANCE_MODE
,
NUM_DIVISIONS_HORIZ_MODE
or NUM_DIVISIONS_VERT_MODE
.public void setNumDivisionsHoriz(int nx)
public void setNumDivisionsVert(int ny)
public int getNumDivisionsHoriz()
public int getNumDivisionsVert()
public void setLabelFormat(DecimalFormat f)
public DecimalFormat getLabelFormat()
public void setHorizLabelRotation(double labelRotation)
labelRotation
- Label rotation, measured in arc degreespublic void setVertLabelRotation(double labelRotation)
labelRotation
- Label rotation, measured in arc degreespublic double getHorizLabelRotation()
labelRotation
- Label rotation, measured in arc degreespublic int getLabelAnchor()
anchor
- RotatedTextUtils.ANCHOR_CORNER
or
RotatedTextUtils.ANCHOR_CENTER
public void setLabelAnchor(int anchor)
anchor
- RotatedTextUtils.ANCHOR_CORNER
or
RotatedTextUtils.ANCHOR_CENTER
public double getVertLabelRotation()
labelRotation
- Label rotation, measured in arc degreespublic void print(Graphics2D g, AffineTransform at, Geometry shape, PrintAttributes properties)
print
in interface IPrintable
public static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractFFrameViewDependence
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractFFrameViewDependence
PersistenceException