All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.contrib.xcomp.BagLayout

CH.ifa.draw.contrib.xcomp.BagLayout

public class BagLayout
implements DrawLayoutManager

Constructor Index

 o BagLayout()

Method Index

 o accommodate(CompositeFigure, Figure)
The basic subfigure positioning algorithm.
 o addLayoutComponent(Figure)
Does nothing.
 o grow(CompositeFigure, Rectangle)
Grow the display box of the container so that the childBox is enclosed.
 o invalidateLayout()
Does nothing.
 o invalidateLayout(Figure)
Calls invalidateLayout().
 o layoutContainer(CompositeFigure)
The bag layout algorithm.
 o minimumLayoutRectangle(CompositeFigure)
Calculates the minimum size display box for the specified container at its current location.
 o minimumLayoutSize(CompositeFigure)
Calculates the minimum size dimensions for the specified container.
 o minimumLayoutSize(CompositeFigure)
Calculates the minimum size dimensions for the specified container.
 o moveIn(CompositeFigure, Figure)
Move the subfigure inside of this if the subfigure extends either to the left or up (or both) of the origin of this.
 o overlayMinimumRectangle(CompositeFigure, Rectangle)
Does nothing.
 o preferredLayoutRectangle(CompositeFigure)
Calculates the minimum size display box for the specified container at its current location.
 o preferredLayoutSize(CompositeFigure)
Calculates the preferred size dimensions for the specified container.
 o preferredLayoutSize(CompositeFigure)
Calculates the preferred size dimensions for the specified container.
 o removeLayoutComponent(Figure)
Does nothing.
 o replaceLayoutComponent(Figure, Figure)
Does nothing.

Constructors

 o BagLayout
 public BagLayout()

Methods

 o layoutContainer
 public void layoutContainer(CompositeFigure container)
The bag layout algorithm. Enumerates over the subfigures of the container and calls accommodate to position each child and to adjust the display box of the container so that all subfigures are enclosed.

 o accommodate
 public void accommodate(CompositeFigure container,
                         Figure child)
The basic subfigure positioning algorithm. Moves the child so that the origin of its display box is inside the display box of the container and then makes the display box of the container to grow, if necessary, to fully enclose the child. That is, the child gets placed where it was dropped. Overlapping of child figures is not checked.

 o overlayMinimumRectangle
 public void overlayMinimumRectangle(CompositeFigure container,
                                     Rectangle minimum)
Does nothing. The default is not to translate the minimum size recatngle.

 o moveIn
 protected void moveIn(CompositeFigure container,
                       Figure child)
Move the subfigure inside of this if the subfigure extends either to the left or up (or both) of the origin of this.

 o grow
 protected void grow(CompositeFigure container,
                     Rectangle childBox)
Grow the display box of the container so that the childBox is enclosed.

 o invalidateLayout
 public void invalidateLayout()
Does nothing.

 o invalidateLayout
 public void invalidateLayout(Figure component)
Calls invalidateLayout().

 o minimumLayoutSize
 public Dimension minimumLayoutSize(CompositeFigure container)
Calculates the minimum size dimensions for the specified container.

 o minimumLayoutRectangle
 public Rectangle minimumLayoutRectangle(CompositeFigure container)
Calculates the minimum size display box for the specified container at its current location.

 o preferredLayoutSize
 public Dimension preferredLayoutSize(CompositeFigure container)
Calculates the preferred size dimensions for the specified container.

 o preferredLayoutRectangle
 public Rectangle preferredLayoutRectangle(CompositeFigure container)
Calculates the minimum size display box for the specified container at its current location.

 o addLayoutComponent
 public void addLayoutComponent(Figure component)
Does nothing. Bag layout does not need to store the components.

 o removeLayoutComponent
 public void removeLayoutComponent(Figure component)
Does nothing. Bag layout does not need to store the components.

 o replaceLayoutComponent
 public void replaceLayoutComponent(Figure component,
                                    Figure replacement)
Does nothing. Bag layout does not need to store the components.


All Packages  Class Hierarchy  This Package  Previous  Next  Index