CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.gui
Class LayeredBorderLayout

java.lang.Object
  extended by ch.randelshofer.gui.LayeredBorderLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

public class LayeredBorderLayout
extends java.lang.Object
implements java.awt.LayoutManager2

LayoutManager which supports overlapping border layouts for use with JLayeredPane.

The border layout is computed individually for each layer of the JLayeredPane.

Author:
Werner Randelshofer  @version 2008-09-11 Added SOUTH_EAST.
1.0 Jan 5, 2008 Created.

Field Summary
static java.lang.String ABSOLUTE
          The absolute layout constraint.
static java.lang.String CENTER
          The center layout constraint (middle of container).
protected  java.util.HashMap<java.awt.Component,java.lang.Object> comptable
           
static java.lang.String EAST
          The east layout constraint (right side of container).
static java.lang.String NORTH
          The north layout constraint (top of container).
static java.lang.String PIP_SOUTH_EAST
          The PIP south-east layout constraint (bottom right eighth of container with insets).
static java.lang.String SOUTH
          The south layout constraint (bottom of container).
static java.lang.String SOUTH_CENTER
          The south-center layout constraint (bottom middle of container).
static java.lang.String SOUTH_EAST
          The south-east layout constraint (bottom right of container).
static java.lang.String WEST
          The west layout constraint (left side of container).
 
Constructor Summary
LayeredBorderLayout()
           
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
           
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
 float getLayoutAlignmentX(java.awt.Container target)
           
 float getLayoutAlignmentY(java.awt.Container target)
           
 void invalidateLayout(java.awt.Container target)
           
 void layoutContainer(java.awt.Container container)
           
 java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container container)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container container)
           
 void removeLayoutComponent(java.awt.Component comp)
           
 void setPipScaleFactor(double sf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTH

public static final java.lang.String NORTH
The north layout constraint (top of container).

See Also:
Constant Field Values

SOUTH

public static final java.lang.String SOUTH
The south layout constraint (bottom of container).

See Also:
Constant Field Values

EAST

public static final java.lang.String EAST
The east layout constraint (right side of container).

See Also:
Constant Field Values

WEST

public static final java.lang.String WEST
The west layout constraint (left side of container).

See Also:
Constant Field Values

CENTER

public static final java.lang.String CENTER
The center layout constraint (middle of container).

See Also:
Constant Field Values

SOUTH_CENTER

public static final java.lang.String SOUTH_CENTER
The south-center layout constraint (bottom middle of container).

See Also:
Constant Field Values

SOUTH_EAST

public static final java.lang.String SOUTH_EAST
The south-east layout constraint (bottom right of container).

See Also:
Constant Field Values

PIP_SOUTH_EAST

public static final java.lang.String PIP_SOUTH_EAST
The PIP south-east layout constraint (bottom right eighth of container with insets).

See Also:
Constant Field Values

ABSOLUTE

public static final java.lang.String ABSOLUTE
The absolute layout constraint. The bounds of components with this constraint are not touched by the layout manager.

See Also:
Constant Field Values

comptable

protected java.util.HashMap<java.awt.Component,java.lang.Object> comptable
Constructor Detail

LayeredBorderLayout

public LayeredBorderLayout()
Method Detail

setPipScaleFactor

public void setPipScaleFactor(double sf)

addLayoutComponent

public void addLayoutComponent(java.awt.Component comp,
                               java.lang.Object constraints)
Specified by:
addLayoutComponent in interface java.awt.LayoutManager2

maximumLayoutSize

public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2

getLayoutAlignmentX

public float getLayoutAlignmentX(java.awt.Container target)
Specified by:
getLayoutAlignmentX in interface java.awt.LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(java.awt.Container target)
Specified by:
getLayoutAlignmentY in interface java.awt.LayoutManager2

invalidateLayout

public void invalidateLayout(java.awt.Container target)
Specified by:
invalidateLayout in interface java.awt.LayoutManager2

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Specified by:
addLayoutComponent in interface java.awt.LayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Specified by:
removeLayoutComponent in interface java.awt.LayoutManager

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container container)
Specified by:
preferredLayoutSize in interface java.awt.LayoutManager

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container container)
Specified by:
minimumLayoutSize in interface java.awt.LayoutManager

layoutContainer

public void layoutContainer(java.awt.Container container)
Specified by:
layoutContainer in interface java.awt.LayoutManager

(c) Werner Randelshofer.
All rights reserved.