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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    FFrame has been selected by clicking on its East boundary
    static final int
    FFrame has been selected by clicking on its North boundary
    static final int
    FFrame has been selected by clicking on its North-East corner
    static final int
    FFrame has been selected by clicking on its North-West corner
    static final int
    FFrame is not selected
    static final int
    FFrame has been selected by clicking on its West boundary
    static final int
    FFrame has been selected by clicking within the frame rectangle
    static final int
    FFrame has been selected by clicking on its South boundary
    static final int
    FFrame has been selected by clicking on its South-East corner
    static final int
    FFrame has been selected by clicking on its South-West corner
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Devuelve true, si el punto que se pasa como parámetro esta contenido dentro del boundingbox del fframe.
    void
    Este método se implementa en cada una de las fframe, ya que cada una se dibuja de una forma diferente sobre el graphics.
    void
    Dibuja un rectángulo de color gris, con el nombre en el centro y escalado en forma de borrador.
    void
    Dibuja los handlers sobre el boundingBox en el graphics que se pasa como parámetro.
    void
    Dibuja el símbolo que indica que el FFrame contiene un tag.
    void
    This method is called when the FFrame has been added to the Layout
    void
    This method is called when the FFrame has been removed from the Layout
    Returns the bounding box in centimeters of this FFrame, using paper coordinates
    Returns the bounding box (in pixels) of this FFrame, based on the provided AffineTransform.
    int
    Checks whether the provided point is contained within the FFrame rectangle.
    org.gvsig.app.project.documents.Document
     
     
     
     
    int
    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.
    Devuelve el nombre que representa al fframe.
    Devuelve el nombre que representa al tipo de FFrame.
    double
    Gets the rotation of the frame, measured in arc degrees
    int
    Returns an integer representing the type of selection applied to the FFrame.
    Devuelve el valor del tag.
    boolean
    Devuelve true si el rectángulo primero es null o si es distinto de null e intersecta.
    boolean
    Gets the selection status of the frame
    void
    Sets the bounding box in centimeters of this FFrame, using paper coordinates.
    void
    setDocument(org.gvsig.app.project.documents.Document document)
     
    void
     
    void
     
    void
    setLevel(int l)
    Inserta el nivel de dibujado del FFrame respecto del resto de fframes del Layout.
    void
    setNum(int i)
    Introduce el número de FFrame en el que de que se trata.
    void
    setRotation(double rotation)
    Sets the rotation of the frame, measured in arc degrees
    void
    setSelected(boolean b)
    Sets the selected status of the frame.
    void
    Sets the type of selection performed on the frame, based on the position of the provided Point compared with the boundaries of the FFrame.
    void
    Rellena el tag.
    void
    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

    clone

    Methods inherited from interface org.gvsig.tools.dispose.Disposable

    dispose

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable

    print

    Methods inherited from interface org.gvsig.tools.observer.Observable

    addObserver, deleteObserver, deleteObservers

    Methods inherited from interface org.gvsig.tools.persistence.Persistent

    loadFromState, saveToState
  • Field Details

    • N

      static final int N
      FFrame has been selected by clicking on its North boundary
      See Also:
    • NE

      static final int NE
      FFrame has been selected by clicking on its North-East corner
      See Also:
    • E

      static final int E
      FFrame has been selected by clicking on its East boundary
      See Also:
    • SE

      static final int SE
      FFrame has been selected by clicking on its South-East corner
      See Also:
    • S

      static final int S
      FFrame has been selected by clicking on its South boundary
      See Also:
    • SO

      static final int SO
      FFrame has been selected by clicking on its South-West corner
      See Also:
    • O

      static final int O
      FFrame has been selected by clicking on its West boundary
      See Also:
    • NO

      static final int NO
      FFrame has been selected by clicking on its North-West corner
      See Also:
    • RECT

      static final int RECT
      FFrame has been selected by clicking within the frame rectangle
      See Also:
    • NOSELECT

      static final int NOSELECT
      FFrame is not selected
      See Also:
  • Method Details

    • getBoundingBox

      Rectangle2D.Double getBoundingBox(AffineTransform at)
      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

      void setBoundBox(Rectangle2D rect)
      Sets the bounding box in centimeters of this FFrame, using paper coordinates.
      Parameters:
      r - Rectangle in centimeters
    • draw

      void draw(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. 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 - Graphics
      at - 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

      boolean contains(Point2D p)
      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

      void drawHandlers(Graphics2D g)
      Dibuja los handlers sobre el boundingBox en el graphics que se pasa como parámetro.
      Parameters:
      g - Graphics sobre el que dibujar.
    • setSelected

      void setSelected(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. This method is usually called when the user clicks on the FFrame
      Parameters:
      e - Mouse event that triggered this method call
      p - 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 - true to select the frame, false to 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:
      true if the frame is selected, false otherwise
    • getContains

      int getContains(Point2D p)
      Checks whether the provided point is contained within the FFrame rectangle.
      Parameters:
      p - Point to compare
      Returns:
      An integer representing the topologic relation of the point and the frame rectangle. It can be one of: NOSELECT, NO, N, NE, O, RECT, E, SO, S, SE.
    • getMapCursor

      Image getMapCursor(Point2D p)
      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

      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.
      Parameters:
      difx - desplazamiento sobre el eje x.
      dify - desplazamiento sobre el eje y.
      Returns:
      rectángulo modificado en función del desplazamiento realizado.
    • getMovieRect

      Rectangle2D 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.
      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

      void drawDraft(Graphics2D g)
      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

      void updateRect(Rectangle2D r, AffineTransform at)
      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

      boolean intersects(Rectangle2D rv, Rectangle2D r)
      Devuelve true si el rectángulo primero es null o si es distinto de null e intersecta.
      Parameters:
      rv - Rectángulo
      r - 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

      void setTag(String s)
      Rellena el tag.
      Parameters:
      s - valor del tag.
    • getTag

      String getTag()
      Devuelve el valor del tag.
      Returns:
      String del valor del tag.
    • drawSymbolTag

      void drawSymbolTag(Graphics2D g)
      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

      void setFrameFactory(FrameFactory frameFactory)
    • 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

      void setLayoutContext(LayoutContext layoutContext)
    • 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