javax.rad.genui
Class UILayout<C extends ILayout<CO>,CO>

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UILayout<C,CO>
Type Parameters:
C - instance of ILayout
CO - type of the constraints.
All Implemented Interfaces:
ILayout<CO>, IResource
Direct Known Subclasses:
UIBorderLayout, UIFlowLayout, UIFormLayout

public abstract class UILayout<C extends ILayout<CO>,CO>
extends UIResource<C>
implements ILayout<CO>

Platform and technology independent layout. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .


Field Summary
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Constructor Summary
protected UILayout(C pLayout)
          Creates a new instance of UILayout.
 
Method Summary
 CO getConstraints(IComponent pComp)
          Gets the constraints for the specified IComponent.
 int getHorizontalGap()
          Returns the horizontal gap between components.
 IInsets getMargins()
          Gets the margins.
 int getVerticalGap()
          Returns the vertical gap between components.
 void setConstraints(IComponent pComp, CO pConstraints)
          Gets the constraints for the specified IComponent.
 void setHorizontalGap(int pHorizontalGap)
          Sets the horizontal gap between components.
 void setMargins(IInsets pMargins)
          Sets the margins.
 void setMargins(int pTop, int pLeft, int pBottom, int pRight)
          Sets the insets with primitive types.
 void setVerticalGap(int pVerticalGap)
          Sets the vertical gap between components.
 
Methods inherited from class javax.rad.genui.UIResource
equals, getResource, getUIResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

UILayout

protected UILayout(C pLayout)
Creates a new instance of UILayout.

Parameters:
pLayout - the ILayout.
See Also:
ILayout
Method Detail

getConstraints

public CO getConstraints(IComponent pComp)
Gets the constraints for the specified IComponent.

Specified by:
getConstraints in interface ILayout<CO>
Parameters:
pComp - the IComponent to be queried
Returns:
the constraint for the specified IComponent, or null if component is null or is not present in this layout

setConstraints

public void setConstraints(IComponent pComp,
                           CO pConstraints)
Gets the constraints for the specified IComponent.

Specified by:
setConstraints in interface ILayout<CO>
Parameters:
pComp - the IComponent to be queried
pConstraints - the constraint for the specified IComponent, or null if component is null or is not present in this layout

getMargins

public IInsets getMargins()
Gets the margins.

Specified by:
getMargins in interface ILayout<CO>
Returns:
the margins.

setMargins

public void setMargins(IInsets pMargins)
Sets the margins.

Specified by:
setMargins in interface ILayout<CO>
Parameters:
pMargins - the margins.

setMargins

public void setMargins(int pTop,
                       int pLeft,
                       int pBottom,
                       int pRight)
Sets the insets with primitive types.

Parameters:
pTop - the top insets.
pLeft - the left insets.
pBottom - the bottom insets.
pRight - the right insets.

getHorizontalGap

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

Specified by:
getHorizontalGap in interface ILayout<CO>
Returns:
returns the horizontal gap between components.

setHorizontalGap

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

Specified by:
setHorizontalGap in interface ILayout<CO>
Parameters:
pHorizontalGap - the horizontal gap between components.

getVerticalGap

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

Specified by:
getVerticalGap in interface ILayout<CO>
Returns:
returns the vertical gap between components.

setVerticalGap

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

Specified by:
setVerticalGap in interface ILayout<CO>
Parameters:
pVerticalGap - the vertical gap between components


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.