Class CornerLayout
java.lang.Object
org.jjazz.uiutilities.api.CornerLayout
- All Implemented Interfaces:
LayoutManager
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 and NW as default corner.CornerLayout(int padding, String defaultCorner) Create the layout. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String corner, Component comp) intvoidlayoutContainer(Container container) minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) Compute a size so that the biggest component of each corner is visible.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 and NW as default corner. -
CornerLayout
Create the layout.- Parameters:
padding- The space between container's inside border and the child components.defaultCorner- Default corner to be used when no constraint provided to the addLayoutComponent() method- See Also:
-
-
Method Details
-
getDefaultCorner
-
getPadding
public int getPadding() -
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
Compute a size so that the biggest component of each corner is visible.- Specified by:
preferredLayoutSizein interfaceLayoutManager- Parameters:
parent-- Returns:
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-