Interface IFFrame
- All Superinterfaces:
Cloneable,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.dispose.Disposable,org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable,org.gvsig.tools.observer.Observable,org.gvsig.tools.persistence.Persistent
- All Known Subinterfaces:
IFFrameUseFMap,LayoutPanelListener
- All Known Implementing Classes:
AbstractFFrameViewDependence,FFrame,FFrameBasic,FFrameGraphics,FFrameGrid,FFrameGroup,FFrameLegend,FFrameMapBox,FFrameNorth,FFrameOverView,FFramePicture,FFrameScaleBar,FFrameSymbol,FFrameTable,FFrameText,FFrameView
public interface IFFrame
extends org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable, org.gvsig.tools.persistence.Persistent, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.observer.Observable, org.gvsig.tools.dispose.Disposable
Interface representing a frame that can be added to a LayoutDocument.
IFFrames are assumed to be rectangular objects that are able to draw themselves
on a Graphics2D object. They handle selection status and can also be
rotated. Specific implementations of this interface should be able to persist
their status.
- Author:
- Vicente Caballero Navarro, Cesar Martinez Izquierdo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFFrame has been selected by clicking on its East boundarystatic final intFFrame has been selected by clicking on its North boundarystatic final intFFrame has been selected by clicking on its North-East cornerstatic final intFFrame has been selected by clicking on its North-West cornerstatic final intFFrame is not selectedstatic final intFFrame has been selected by clicking on its West boundarystatic final intFFrame has been selected by clicking within the frame rectanglestatic final intFFrame has been selected by clicking on its South boundarystatic final intFFrame has been selected by clicking on its South-East cornerstatic final intFFrame has been selected by clicking on its South-West corner -
Method Summary
Modifier and TypeMethodDescriptionbooleanDevuelve true, si el punto que se pasa como parámetro esta contenido dentro del boundingbox del fframe.voiddraw(Graphics2D g, AffineTransform at, Rectangle2D r, BufferedImage imgBase) Este método se implementa en cada una de las fframe, ya que cada una se dibuja de una forma diferente sobre el graphics.voidDibuja un rectángulo de color gris, con el nombre en el centro y escalado en forma de borrador.voidDibuja los handlers sobre el boundingBox en el graphics que se pasa como parámetro.voidDibuja el símbolo que indica que el FFrame contiene un tag.voidThis method is called when the FFrame has been added to the LayoutvoidThis method is called when the FFrame has been removed from the LayoutReturns the bounding box in centimeters of this FFrame, using paper coordinatesReturns the bounding box (in pixels) of this FFrame, based on the provided AffineTransform.intChecks whether the provided point is contained within the FFrame rectangle.org.gvsig.app.project.documents.DocumentintgetLevel()Devuelve el nivel al que se encuentra el FFrame en el Layout.Devuelve el Cursor adecuado según como esté contenido el punto, si es para desplazamiento, o cambio de tamaño.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.doubleGets the rotation of the frame, measured in arc degreesintReturns an integer representing the type of selection applied to the FFrame.getTag()Devuelve el valor del tag.booleanintersects(Rectangle2D rv, Rectangle2D r) Devuelve true si el rectángulo primero es null o si es distinto de null e intersecta.booleanGets the selection status of the framevoidsetBoundBox(Rectangle2D rect) Sets the bounding box in centimeters of this FFrame, using paper coordinates.voidsetDocument(org.gvsig.app.project.documents.Document document) voidsetFrameFactory(FrameFactory frameFactory) voidsetLayoutContext(LayoutContext layoutContext) voidsetLevel(int l) Inserta el nivel de dibujado del FFrame respecto del resto de fframes del Layout.voidsetNum(int i) Introduce el número de FFrame en el que de que se trata.voidsetRotation(double rotation) Sets the rotation of the frame, measured in arc degreesvoidsetSelected(boolean b) Sets the selected status of the frame.voidsetSelected(Point2D b, MouseEvent e) Sets the type of selection performed on the frame, based on the position of the provided Point compared with the boundaries of the FFrame.voidRellena el tag.voidupdateRect(Rectangle2D r, AffineTransform at) Actualiza el BoundBox del FFrame a partir de su rectángulo en pixels y la matriz de transformación.Methods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.tools.dispose.Disposable
disposeMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable
printMethods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObserversMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Field Details
-
N
static final int NFFrame has been selected by clicking on its North boundary- See Also:
-
NE
static final int NEFFrame has been selected by clicking on its North-East corner- See Also:
-
E
static final int EFFrame has been selected by clicking on its East boundary- See Also:
-
SE
static final int SEFFrame has been selected by clicking on its South-East corner- See Also:
-
S
static final int SFFrame has been selected by clicking on its South boundary- See Also:
-
SO
static final int SOFFrame has been selected by clicking on its South-West corner- See Also:
-
O
static final int OFFrame has been selected by clicking on its West boundary- See Also:
-
NO
static final int NOFFrame has been selected by clicking on its North-West corner- See Also:
-
RECT
static final int RECTFFrame has been selected by clicking within the frame rectangle- See Also:
-
NOSELECT
static final int NOSELECTFFrame is not selected- See Also:
-
-
Method Details
-
getBoundingBox
Returns 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.- 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
-
getBoundBox
Rectangle2D.Double getBoundBox()Returns the bounding box in centimeters of this FFrame, using paper coordinates- Returns:
- The bounding box of this FFrame, measured in centimeters.
-
setBoundBox
Sets the bounding box in centimeters of this FFrame, using paper coordinates.- Parameters:
r- Rectangle in centimeters
-
draw
Este método se implementa en cada una de las fframe, ya que cada una se dibuja de una forma diferente sobre el graphics. Método que dibuja sobre el graphics que se le pasa como parámetro, según la transformada afin que se debe de aplicar y el rectángulo que se debe de dibujar.- Parameters:
g- Graphicsat- Transformada afin.r- rectángulo sobre el que hacer un clip.imgBase- Imagen para acelerar el dibujado.
-
getName
String getName()Devuelve el nombre que representa al fframe.- Returns:
- String nombre del FFrame.
-
contains
Devuelve true, si el punto que se pasa como parámetro esta contenido dentro del boundingbox del fframe.- Parameters:
p- punto a comprobar.- Returns:
- true si el punto esta dentro del boundingbox.
-
drawHandlers
Dibuja los handlers sobre el boundingBox en el graphics que se pasa como parámetro.- Parameters:
g- Graphics sobre el que dibujar.
-
setSelected
Sets the type of selection performed on the frame, based on the position of the provided Point compared with the boundaries of the FFrame. This method is usually called when the user clicks on the FFrame- Parameters:
e- Mouse event that triggered this method callp- Point which should be evaluated to establish if the FFrame must be selected or not
-
setSelected
void setSelected(boolean b) Sets the selected status of the frame.- Parameters:
selected-trueto select the frame,falseto unselect it
-
getSelected
int getSelected()Returns an integer representing the type of selection applied to the FFrame. Valid values are:NOSELECT,NO,N,NE,O,RECT,E,SO,S,SE.- Returns:
- The type of selection that has been applied
-
isSelected
boolean isSelected()Gets the selection status of the frame- Returns:
trueif the frame is selected,falseotherwise
-
getContains
Checks whether the provided point is contained within the FFrame rectangle. -
getMapCursor
Devuelve el Cursor adecuado según como esté contenido el punto, si es para desplazamiento, o cambio de tamaño.- Parameters:
p- punto a comprobar.- Returns:
- Cursor adecuado a la posición.
-
getMovieRect
Devuelve el rectángulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.- Parameters:
difx- desplazamiento sobre el eje x.dify- desplazamiento sobre el eje y.- Returns:
- rectángulo modificado en función del desplazamiento realizado.
-
getMovieRect
Devuelve el rectángulo a partir del desplazamiento en el eje x y el desplazamiento en el eje y.- 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.
-
drawDraft
Dibuja un rectángulo de color gris, con el nombre en el centro y escalado en forma de borrador.- Parameters:
g- Graphics sobre el que se dibuja.
-
updateRect
Actualiza el BoundBox del FFrame a partir de su rectángulo en pixels y la matriz de transformación.- Parameters:
r- Rectángulo.at- Matriz de transformación.
-
intersects
Devuelve true si el rectángulo primero es null o si es distinto de null e intersecta.- Parameters:
rv- Rectángulor- Rectángulo- Returns:
- True si intersecta o es null.
-
setNum
void setNum(int i) Introduce el número de FFrame en el que de que se trata.- Parameters:
i- número de FFrame
-
getNameFFrame
String getNameFFrame()Devuelve el nombre que representa al tipo de FFrame.- Returns:
- nombre del elemento.
-
setTag
Rellena el tag.- Parameters:
s- valor del tag.
-
getTag
String getTag()Devuelve el valor del tag.- Returns:
- String del valor del tag.
-
drawSymbolTag
Dibuja el símbolo que indica que el FFrame contiene un tag.- Parameters:
g- Graphics sobre el que dibujar.
-
setRotation
void setRotation(double rotation) Sets the rotation of the frame, measured in arc degrees- Parameters:
rotation- Rotation to apply to the frame
-
getRotation
double getRotation()Gets the rotation of the frame, measured in arc degrees- Returns:
- Rotation of the frame
-
getLevel
int getLevel()Devuelve el nivel al que se encuentra el FFrame en el Layout.- Returns:
- nivel.
-
setLevel
void setLevel(int l) Inserta el nivel de dibujado del FFrame respecto del resto de fframes del Layout.- Parameters:
l- nivel.
-
getLastMoveRect
Rectangle2D getLastMoveRect() -
setFrameFactory
-
getFrameFactory
FrameFactory getFrameFactory() -
getDocument
org.gvsig.app.project.documents.Document getDocument() -
setDocument
void setDocument(org.gvsig.app.project.documents.Document document) -
getLayoutContext
LayoutContext getLayoutContext() -
setLayoutContext
-
frameRemoved
void frameRemoved()This method is called when the FFrame has been removed from the Layout -
frameAdded
void frameAdded()This method is called when the FFrame has been added to the Layout
-