com.alee.extended.layout
Class GroupLayout

java.lang.Object
  extended by com.alee.extended.layout.AbstractLayoutManager
      extended by 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
 
Constructor Summary
GroupLayout()
           
GroupLayout(int orientation)
           
GroupLayout(int orientation, int gap)
           
 
Method Summary
 void addComponent(java.awt.Component component, java.lang.Object constraints)
          Caled when component added into container with this layout.
 int getGap()
           
protected  java.awt.Dimension getLayoutSize(java.awt.Container parent, boolean minimum)
           
 int getOrientation()
           
protected  boolean isFill(java.awt.Component component)
           
 void layoutContainer(java.awt.Container parent)
          
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          
 void removeComponent(java.awt.Component component)
          Called when component removed from container with this layout.
 void setGap(int gap)
           
 void setOrientation(int orientation)
           
 
Methods inherited from class com.alee.extended.layout.AbstractLayoutManager
addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, removeLayoutComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

GroupLayout

public GroupLayout()

GroupLayout

public GroupLayout(int orientation)

GroupLayout

public GroupLayout(int orientation,
                   int gap)
Method Detail

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 component
constraints - 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)