com.sibvisions.rad.ui.web.impl
Class WebLayout<CE>

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebLayout<CE>
Type Parameters:
CE - the Contraint type.
All Implemented Interfaces:
ILayout<CE>, IResource
Direct Known Subclasses:
WebBorderLayout, WebFlowLayout, WebFormLayout

public abstract class WebLayout<CE>
extends WebResource
implements ILayout<CE>

Web server implementation of ILayout.


Field Summary
protected  int horizontalGap
          the horizontal gap.
protected  WebInsets margins
          the margins of the layout.
protected  int verticalGap
          the vertical gap.
 
Constructor Summary
protected WebLayout()
          Creates a new instance of WebLayout.
 
Method Summary
 String getAsString()
          Gets this Object as String.
 CE getConstraints(IComponent pComponent)
          Gets the constraints for the specified IComponent.
 int getHorizontalGap()
          Returns the horizontal gap between components.
 WebInsets getMargins()
          Gets the margins.
 int getVerticalGap()
          Returns the vertical gap between components.
 void setComponentConstraints(IComponent pComponent, Object pConstraints)
          Converts an added Constraint to the correct Constraint type CE.
 void setConstraints(IComponent pComponent, CE 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 setVerticalGap(int pVerticalGap)
          Sets the vertical gap between components.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

margins

protected WebInsets margins
the margins of the layout.


horizontalGap

protected int horizontalGap
the horizontal gap.


verticalGap

protected int verticalGap
the vertical gap.

Constructor Detail

WebLayout

protected WebLayout()
Creates a new instance of WebLayout.

See Also:
ILayout
Method Detail

getAsString

public String getAsString()
Gets this Object as String.

Specified by:
getAsString in class WebResource
Returns:
the String.

getConstraints

public CE getConstraints(IComponent pComponent)
Gets the constraints for the specified IComponent.

Specified by:
getConstraints in interface ILayout<CE>
Parameters:
pComponent - 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 pComponent,
                           CE pConstraints)
Gets the constraints for the specified IComponent.

Specified by:
setConstraints in interface ILayout<CE>
Parameters:
pComponent - 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

setComponentConstraints

public void setComponentConstraints(IComponent pComponent,
                                    Object pConstraints)
Converts an added Constraint to the correct Constraint type CE.

Parameters:
pComponent - the component.
pConstraints - the constraints.

getMargins

public WebInsets getMargins()
Gets the margins.

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

setMargins

public void setMargins(IInsets pMargins)
Sets the margins.

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

getHorizontalGap

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

Specified by:
getHorizontalGap in interface ILayout<CE>
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<CE>
Parameters:
pHorizontalGap - the horizontal gap between components.

getVerticalGap

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

Specified by:
getVerticalGap in interface ILayout<CE>
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<CE>
Parameters:
pVerticalGap - the vertical gap between components


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.