Package com.cloudgarden.layout
Class AnchorLayout
java.lang.Object
com.cloudgarden.layout.AnchorLayout
- All Implemented Interfaces:
LayoutManager
,LayoutManager2
Lays out components, using a combination of their "bounds" property
and their AnchorConstraints layout constraint objects.
Sides of the components can be anchored either absolutely (eg, if the right side is anchored absolutely then it will always be a fixed number of pixels from the right side of it's parent container) or relatively (ie, if any side is anchored relatively then it will always occur a fixed fraction of the way along it's parent's side). Or they can be not anchored, at all in which case they will occur at places determined by their component's "bounds" property and the anchoring of the component's other sides.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent(Component comp, Object constraints)
void
addLayoutComponent(String name, Component comp)
float
getLayoutAlignmentX(Container target)
float
getLayoutAlignmentY(Container target)
(package private) void
initialize(Container parent)
void
invalidateLayout(Container target)
void
layoutContainer(Container container)
maximumLayoutSize(Container target)
minimumLayoutSize(Container parent)
preferredLayoutSize(Container parent)
void
removeLayoutComponent(Component comp)
-
Constructor Details
-
AnchorLayout
public AnchorLayout()
-
-
Method Details
-
initialize
-
layoutContainer
- Specified by:
layoutContainer
in interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponent
in interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager2
-
maximumLayoutSize
- Specified by:
maximumLayoutSize
in interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentX
in interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentY
in interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayout
in interfaceLayoutManager2
-