Class AbstractCompositeFigure

All Implemented Interfaces:
Figure, TransformCachingFigure, PropertyBean, StyleableBean, StyleablePropertyBean, TreeNode<Figure>
Direct Known Subclasses:
AbstractDrawing, ClippingFigure, CombinedPathFigure, GroupFigure, LayerFigure, PageFigure

public abstract class AbstractCompositeFigure extends AbstractFigure
This base class can be used to implement figures which support child figures.
Author:
Werner Randelshofer
  • Constructor Details

    • AbstractCompositeFigure

      public AbstractCompositeFigure()
  • Method Details

    • getChildren

      public javafx.collections.ObservableList<Figure> getChildren()
      Description copied from interface: Figure
      The child figures.

      All changes on this list causes this figure to fire an invalidation event.

      If a child is added to this list, then this figure removes the child from its former parent, and then sets itself as the parent of the child.

      If a child is removed from this list, then this figure sets the parent of the child to null.

      Returns:
      the children
    • isAllowsChildren

      public final boolean isAllowsChildren()
      Description copied from interface: Figure
      Whether children may be added to this figure.
      Returns:
      true if getChildren are allowed
    • getLayoutBounds

      public javafx.geometry.Bounds getLayoutBounds()
      Description copied from interface: Figure
      The bounds that should be used for transformations of this figure.

      The bounds are given in the untransformed local coordinate space of the figure.

      This method may use caching and return incorrect results if the cache is stale. Invoke Figure.layout(org.jhotdraw8.draw.render.RenderContext) if you are not sure that the cache is valid.

      Returns:
      the local bounds
    • getBoundsInLocal

      public javafx.geometry.Bounds getBoundsInLocal()
      Description copied from interface: Figure
      The bounds of this figure in local coordinates, including space required for a non-zero stroke.
      Returns:
      the local bounds
    • getCssLayoutBounds

      public CssRectangle2D getCssLayoutBounds()
    • getLayoutBoundsInParent

      public javafx.geometry.Bounds getLayoutBoundsInParent()
      Description copied from interface: Figure
      The layout bounds of this figure in parent coordinates.

      The bounds are given in the coordinate space of the parent figure.

      This method may use caching and return incorrect results if the caches are stale. Invoke Figure.invalidateTransforms() and Figure.layout(org.jhotdraw8.draw.render.RenderContext) if you are not sure that the cache is valid.

      Returns:
      the local bounds
    • firePropertyChangeEvent

      public void firePropertyChangeEvent(FigurePropertyChangeEvent event)
      Description copied from interface: Figure
      Fires a property change event.
      Parameters:
      event - the event
    • firePropertyChangeEvent

      public <T> void firePropertyChangeEvent(@Nullable Figure source, Key<T> key, T oldValue, T newValue, boolean wasAdded, boolean wasRemoved)
      Description copied from interface: Figure
      Fires a property change event.
      Type Parameters:
      T - the value type
      Parameters:
      source - the event source
      key - the property key
      oldValue - the old property value
      newValue - the new property value
      wasAdded - true if the new property value was added
      wasRemoved - true if the old property value was removed