Interface FreeformFigure

All Superinterfaces:
IFigure
All Known Implementing Classes:
ConnectionLayer, FreeformLayer, FreeformLayeredPane, ScalableFreeformLayeredPane

public interface FreeformFigure extends IFigure
A figure that allows its children to extend into negative coordinates. This figure must be placed in a FreeformViewport. Also, you shouldn't call IFigure.setBounds(Rectangle) on this figure. The bounds will be calculated based on the extent of its children. A FreeformFigure's bounds will be the smallest rectangle that will contain all of its children.
  • Method Details

    • addFreeformListener

      void addFreeformListener(FreeformListener listener)
      Adds a FreeformListener to this FreeformFigure.
      Parameters:
      listener - the listener
    • fireExtentChanged

      void fireExtentChanged()
      Notifies listeners that the freeform extent (i.e. bounds) has changed.
    • getFreeformExtent

      Rectangle getFreeformExtent()
      Returns the freeform extent, essentially the bounds of the FreeformFigure. This is based on the extent of its children.
      Returns:
      the freeform extent
    • removeFreeformListener

      void removeFreeformListener(FreeformListener listener)
      Removes the given listener from this FreeformFigure.
      Parameters:
      listener - the listener
    • setFreeformBounds

      void setFreeformBounds(Rectangle bounds)
      Sets the freeform bounds of this FreeformFigure.
      Parameters:
      bounds - the new freeform bounds