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
-
BagLayout()
-
-
accommodate(CompositeFigure, Figure)
- The basic subfigure positioning algorithm.
-
addLayoutComponent(Figure)
- Does nothing.
-
grow(CompositeFigure, Rectangle)
- Grow the display box of the container so that the childBox is enclosed.
-
invalidateLayout()
- Does nothing.
-
invalidateLayout(Figure)
- Calls invalidateLayout().
-
layoutContainer(CompositeFigure)
- The bag layout algorithm.
-
minimumLayoutRectangle(CompositeFigure)
- Calculates the minimum size display box for the specified container
at its current location.
-
minimumLayoutSize(CompositeFigure)
- Calculates the minimum size dimensions for the specified container.
-
minimumLayoutSize(CompositeFigure)
- Calculates the minimum size dimensions for the specified container.
-
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.
-
overlayMinimumRectangle(CompositeFigure, Rectangle)
- Does nothing.
-
preferredLayoutRectangle(CompositeFigure)
- Calculates the minimum size display box for the specified container
at its current location.
-
preferredLayoutSize(CompositeFigure)
- Calculates the preferred size dimensions for the specified container.
-
preferredLayoutSize(CompositeFigure)
- Calculates the preferred size dimensions for the specified container.
-
removeLayoutComponent(Figure)
- Does nothing.
-
replaceLayoutComponent(Figure, Figure)
- Does nothing.
BagLayout
public BagLayout()
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.
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.
overlayMinimumRectangle
public void overlayMinimumRectangle(CompositeFigure container,
Rectangle minimum)
- Does nothing. The default is not to translate the minimum size recatngle.
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.
grow
protected void grow(CompositeFigure container,
Rectangle childBox)
- Grow the display box of the container so that the childBox is enclosed.
invalidateLayout
public void invalidateLayout()
- Does nothing.
invalidateLayout
public void invalidateLayout(Figure component)
- Calls invalidateLayout().
minimumLayoutSize
public Dimension minimumLayoutSize(CompositeFigure container)
- Calculates the minimum size dimensions for the specified container.
minimumLayoutRectangle
public Rectangle minimumLayoutRectangle(CompositeFigure container)
- Calculates the minimum size display box for the specified container
at its current location.
preferredLayoutSize
public Dimension preferredLayoutSize(CompositeFigure container)
- Calculates the preferred size dimensions for the specified container.
preferredLayoutRectangle
public Rectangle preferredLayoutRectangle(CompositeFigure container)
- Calculates the minimum size display box for the specified container
at its current location.
addLayoutComponent
public void addLayoutComponent(Figure component)
- Does nothing. Bag layout does not need to store the components.
removeLayoutComponent
public void removeLayoutComponent(Figure component)
- Does nothing. Bag layout does not need to store the components.
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