java.lang.Object
org.graphstream.ui.swing.renderer.shape.swing.Area
Direct Known Subclasses:
AreaOnConnector, ShapePaint.ShapeAreaPaint

public class Area extends Object
Trait for elements painted inside an area (most nodes and sprites). This trait manages the size of the area (the size is rectangular, although the area may not be), its position, and the automatic fit to the contents, if needed. As this trait computes the position and size of the shape, it should probably be configured first when assembling the configureForGroup and configureForElement methods.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Fit the shape size to its contents?
    org.graphstream.ui.geom.Point2
    The shape position.
    org.graphstream.ui.geom.Point2
    The shape size.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configureAreaForElement(Backend backend, org.graphstream.ui.view.camera.DefaultCamera2D camera, AreaSkeleton skel, org.graphstream.ui.graphicGraph.GraphicElement element, ShapeDecor decor)
    Select the general size and position of the shape.
    void
    configureAreaForGroup(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • theCenter

      public org.graphstream.ui.geom.Point2 theCenter
      The shape position.
    • theSize

      public org.graphstream.ui.geom.Point2 theSize
      The shape size.
    • fit

      protected boolean fit
      Fit the shape size to its contents?
  • Constructor Details

    • Area

      public Area()
  • Method Details

    • configureAreaForGroup

      public void configureAreaForGroup(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)
    • configureAreaForElement

      public void configureAreaForElement(Backend backend, org.graphstream.ui.view.camera.DefaultCamera2D camera, AreaSkeleton skel, org.graphstream.ui.graphicGraph.GraphicElement element, ShapeDecor decor)
      Select the general size and position of the shape. This is done according to: - The style, - Eventually the element specific size attribute, - Eventually the element contents (decor).