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
-
Constructor Summary
ConstructorDescriptionA layout using 0 padding.CornerLayout
(int padding) A layout with a custom padding. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(Component comp, Object constraints) void
addLayoutComponent
(String s, Component comp) float
getLayoutAlignmentX
(Container target) float
getLayoutAlignmentY
(Container target) int
void
invalidateLayout
(Container target) void
layoutContainer
(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:
layoutContainer
in interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager2
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponent
in interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
-
maximumLayoutSize
- Specified by:
maximumLayoutSize
in interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentX
in interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentY
in interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayout
in interfaceLayoutManager2
-