Class FreeformLayout

All Implemented Interfaces:
LayoutManager

public class FreeformLayout extends XYLayout
A layout for FreeformFigures. Supports option to set only positive (x,y) coordinates for children figures.
  • Constructor Details

    • FreeformLayout

      public FreeformLayout()
  • Method Details

    • getOrigin

      public Point getOrigin(IFigure figure)
      Returns the point (0,0) as the origin.
      Overrides:
      getOrigin in class XYLayout
      Parameters:
      figure - the figure whose origin is requested
      Returns:
      the origin
      See Also:
    • isPositiveCoordinates

      public boolean isPositiveCoordinates()
      Checks whether the positive coordinates flag is on, e.g positive coordinates for children are inforced by the layout
      Returns:
      boolean
      Since:
      3.6
    • setPositiveCoordinates

      public void setPositiveCoordinates(boolean positiveCoordinates)
      Sets/unsets the positive coordinates flag for true/false parameters respectively. If option is set to on then layout calculates positive coordinates for children figures by adjusting the layout origin accordingly.
      Parameters:
      positiveCoordinates -
      Since:
      3.6
    • invalidate

      public void invalidate()
      Description copied from interface: LayoutManager
      Tells the LayoutManager to throw away all cached information about the figures it is responsible for. This method is called whenever the owning figure is invalidated.
      Specified by:
      invalidate in interface LayoutManager
      Overrides:
      invalidate in class AbstractLayout
      See Also: