Package org.jjazz.uiutilities.api
Class CornerLayout
java.lang.Object
org.jjazz.uiutilities.api.CornerLayout
- All Implemented Interfaces:
LayoutManager,LayoutManager2
Simple layout which puts components at their preferred size in one of the 4 corners.
Components must be added to container using Container.add(Component comp, Object constraints), constraints being NORTH_WEST etc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionA layout using 0 padding.CornerLayout(int padding) A layout with a custom padding. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(Component comp, Object constraints) voidaddLayoutComponent(String s, Component comp) floatgetLayoutAlignmentX(Container target) floatgetLayoutAlignmentY(Container target) intvoidinvalidateLayout(Container target) voidlayoutContainer(Container container) maximumLayoutSize(Container target) minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) void
-
Field Details
-
NORTH_WEST
- See Also:
-
SOUTH_WEST
- See Also:
-
NORTH_EAST
- See Also:
-
SOUTH_EAST
- See Also:
-
-
Constructor Details
-
CornerLayout
public CornerLayout()A layout using 0 padding. -
CornerLayout
public CornerLayout(int padding) A layout with a custom padding.- Parameters:
padding- The space between container's inside border and the child components.
-
-
Method Details
-
getPadding
public int getPadding() -
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager2
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
maximumLayoutSize
- Specified by:
maximumLayoutSizein interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentXin interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentYin interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayoutin interfaceLayoutManager2
-