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:
LayoutManager, LayoutManager2

public class JVxBorderLayout
extends Object
implements LayoutManager2

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


Field Summary
static String CENTER
          The center layout constraint (middle of container).
static String EAST
          The east layout constraint (right side of container).
static String NORTH
          The north layout constraint (top of container).
static String SOUTH
          The south layout constraint (bottom of container).
static 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(Component pComponent, Object pConstraints)
          
 void addLayoutComponent(String pName, Component pComponent)
          
 Object getConstraints(Component comp)
          Gets the constraints for the specified component.
 int getHorizontalGap()
          Gets the horizontal gap between components.
 float getLayoutAlignmentX(Container target)
          
 float getLayoutAlignmentY(Container target)
          
 Insets getMargins()
          Gets the layout margins.
 int getVerticalGap()
          Gets the vertical gap between components.
 void invalidateLayout(Container target)
          
 void layoutContainer(Container pContainer)
          
 Dimension maximumLayoutSize(Container pTarget)
          
 Dimension minimumLayoutSize(Container pTarget)
          
 Dimension preferredLayoutSize(Container pContainer)
          
 void removeLayoutComponent(Component pComponent)
          
 void setHorizontalGap(int pGap)
          Sets horizontal gap between components.
 void setMargins(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 String NORTH
The north layout constraint (top of container).

See Also:
Constant Field Values

SOUTH

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

See Also:
Constant Field Values

EAST

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

See Also:
Constant Field Values

WEST

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

See Also:
Constant Field Values

CENTER

public static final 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(String pName,
                               Component pComponent)

Specified by:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component pComponent)

Specified by:
removeLayoutComponent in interface LayoutManager

addLayoutComponent

public void addLayoutComponent(Component pComponent,
                               Object pConstraints)

Specified by:
addLayoutComponent in interface LayoutManager2

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)

Specified by:
getLayoutAlignmentX in interface LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)

Specified by:
getLayoutAlignmentY in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)

Specified by:
invalidateLayout in interface LayoutManager2

minimumLayoutSize

public Dimension minimumLayoutSize(Container pTarget)

Specified by:
minimumLayoutSize in interface LayoutManager

maximumLayoutSize

public Dimension maximumLayoutSize(Container pTarget)

Specified by:
maximumLayoutSize in interface LayoutManager2

preferredLayoutSize

public Dimension preferredLayoutSize(Container pContainer)

Specified by:
preferredLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container pContainer)

Specified by:
layoutContainer in interface 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(Insets pMargins)
Sets the layout margins.

Parameters:
pMargins - the margins

getMargins

public Insets getMargins()
Gets the layout margins.

Returns:
the margins

getConstraints

public Object getConstraints(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.