com.sibvisions.rad.ui.swing.ext.layout
Class JVxBorderLayout

java.lang.Object
  extended by com.sibvisions.rad.ui.swing.ext.layout.JVxBorderLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

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

The JVxSequenceLayout can be used as FlowLayout with additional features. The additional features are:


Field Summary
static java.lang.String CENTER
          The center layout constraint (middle of container).
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 SOUTH
          The south layout constraint (bottom of container).
static java.lang.String WEST
          The west layout constraint (left side of container).
 
Constructor Summary
JVxBorderLayout()
          Creates a new instance of JVxBorderLayout.
JVxBorderLayout(int pHorizontalGap, int pVerticalGap)
          Creates a new instance of JVxBorderLayout with the desired orientation and gaps.
 
Method Summary
 void addLayoutComponent(java.awt.Component pComponent, java.lang.Object pConstraints)
          
 void addLayoutComponent(java.lang.String pName, java.awt.Component pComponent)
          
 java.lang.Object getConstraints(java.awt.Component comp)
          Gets the constraints for the specified component.
 int getHorizontalGap()
          Gets the horizontal gap between components.
 float getLayoutAlignmentX(java.awt.Container target)
          
 float getLayoutAlignmentY(java.awt.Container target)
          
 java.awt.Insets getMargins()
          Gets the layout margins.
 int getVerticalGap()
          Gets the vertical gap between components.
 void invalidateLayout(java.awt.Container target)
          
 void layoutContainer(java.awt.Container pContainer)
          
 java.awt.Dimension maximumLayoutSize(java.awt.Container pTarget)
          
 java.awt.Dimension minimumLayoutSize(java.awt.Container pTarget)
          
 java.awt.Dimension preferredLayoutSize(java.awt.Container pContainer)
          
 void removeLayoutComponent(java.awt.Component pComponent)
          
 void setHorizontalGap(int pGap)
          Sets horizontal gap between components.
 void setMargins(java.awt.Insets pMargins)
          Sets the layout margins.
 void setVerticalGap(int pGap)
          Sets the vertical gap between components.
 
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
Constructor Detail

JVxBorderLayout

public JVxBorderLayout()
Creates a new instance of JVxBorderLayout.


JVxBorderLayout

public JVxBorderLayout(int pHorizontalGap,
                       int pVerticalGap)
Creates a new instance of JVxBorderLayout with the desired orientation and gaps.

Parameters:
pHorizontalGap - the horizontal gap
pVerticalGap - the vertical gap
Method Detail

addLayoutComponent

public void addLayoutComponent(java.lang.String pName,
                               java.awt.Component pComponent)

Specified by:
addLayoutComponent in interface java.awt.LayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component pComponent)

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager

addLayoutComponent

public void addLayoutComponent(java.awt.Component pComponent,
                               java.lang.Object pConstraints)

Specified by:
addLayoutComponent 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

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container pTarget)

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager

maximumLayoutSize

public java.awt.Dimension maximumLayoutSize(java.awt.Container pTarget)

Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container pContainer)

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager

layoutContainer

public void layoutContainer(java.awt.Container pContainer)

Specified by:
layoutContainer in interface java.awt.LayoutManager

setHorizontalGap

public void setHorizontalGap(int pGap)
Sets horizontal gap between components.

Parameters:
pGap - the gap in pixel

getHorizontalGap

public int getHorizontalGap()
Gets the horizontal gap between components.

Returns:
the gap in pixel

setVerticalGap

public void setVerticalGap(int pGap)
Sets the vertical gap between components.

Parameters:
pGap - the gap in pixel

getVerticalGap

public int getVerticalGap()
Gets the vertical gap between components.

Returns:
the gap in pixel

setMargins

public void setMargins(java.awt.Insets pMargins)
Sets the layout margins.

Parameters:
pMargins - the margins

getMargins

public java.awt.Insets getMargins()
Gets the layout margins.

Returns:
the margins

getConstraints

public java.lang.Object getConstraints(java.awt.Component comp)
Gets the constraints for the specified component.

Parameters:
comp - the component to be queried
Returns:
the constraint for the specified component, or null if component is null or is not present in this layout


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.