com.alee.extended.layout
Class GroupLayout
java.lang.Object
com.alee.extended.layout.AbstractLayoutManager
com.alee.extended.layout.GroupLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2, javax.swing.SwingConstants
public class GroupLayout
- extends AbstractLayoutManager
- implements javax.swing.SwingConstants
Custom layout mostly used by custom GroupPanel container.
It allows simple grouping of components placed into one line - either horizontally or vertically.
- Author:
- Mikle Garin
Field Summary |
protected java.util.Map<java.awt.Component,java.lang.String> |
constraints
|
static java.lang.String |
FILL
|
protected int |
gap
|
protected int |
orientation
|
static java.lang.String |
PREFERRED
|
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREFERRED
public static final java.lang.String PREFERRED
- See Also:
- Constant Field Values
FILL
public static final java.lang.String FILL
- See Also:
- Constant Field Values
orientation
protected int orientation
gap
protected int gap
constraints
protected java.util.Map<java.awt.Component,java.lang.String> constraints
GroupLayout
public GroupLayout()
GroupLayout
public GroupLayout(int orientation)
GroupLayout
public GroupLayout(int orientation,
int gap)
getOrientation
public int getOrientation()
setOrientation
public void setOrientation(int orientation)
getGap
public int getGap()
setGap
public void setGap(int gap)
addComponent
public void addComponent(java.awt.Component component,
java.lang.Object constraints)
- Caled when component added into container with this layout.
- Overrides:
addComponent
in class AbstractLayoutManager
- Parameters:
component
- added componentconstraints
- component constraints
removeComponent
public void removeComponent(java.awt.Component component)
- Called when component removed from container with this layout.
- Overrides:
removeComponent
in class AbstractLayoutManager
- Parameters:
component
- removed component
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
-
- Specified by:
preferredLayoutSize
in interface java.awt.LayoutManager
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
-
- Specified by:
minimumLayoutSize
in interface java.awt.LayoutManager
- Overrides:
minimumLayoutSize
in class AbstractLayoutManager
layoutContainer
public void layoutContainer(java.awt.Container parent)
-
- Specified by:
layoutContainer
in interface java.awt.LayoutManager
getLayoutSize
protected java.awt.Dimension getLayoutSize(java.awt.Container parent,
boolean minimum)
isFill
protected boolean isFill(java.awt.Component component)