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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(Component comp, Object constraints)voidaddLayoutComponent(String name, Component comp)floatgetLayoutAlignmentX(Container target)floatgetLayoutAlignmentY(Container target)(package private) voidinitialize(Container parent)voidinvalidateLayout(Container target)voidlayoutContainer(Container container)maximumLayoutSize(Container target)minimumLayoutSize(Container parent)preferredLayoutSize(Container parent)voidremoveLayoutComponent(Component comp)
-
Constructor Details
-
AnchorLayout
public AnchorLayout()
-
-
Method Details
-
initialize
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager2
-
maximumLayoutSize
- Specified by:
maximumLayoutSizein interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentXin interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentYin interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayoutin interfaceLayoutManager2
-