com.sibvisions.rad.ui.swing.impl.layout
Class AwtGridLayout

java.lang.Object
  extended by com.sibvisions.rad.ui.awt.impl.AwtResource<JVxGridLayout>
      extended by com.sibvisions.rad.ui.swing.impl.layout.AwtGridLayout
All Implemented Interfaces:
ILayout<IGridLayout.IGridConstraints>, IResource, IGridLayout

public class AwtGridLayout
extends AwtResource<JVxGridLayout>
implements IGridLayout

The AwtGridLayout is the IGridLayout implementation for AWT.

See Also:
JVxGridLayout

Nested Class Summary
static class AwtGridLayout.AwtGridConstraints
          The Constraint stores the columns and rows for layouting a component.
 
Nested classes/interfaces inherited from interface javax.rad.ui.layout.IGridLayout
IGridLayout.IGridConstraints
 
Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
resource
 
Constructor Summary
AwtGridLayout(int pColumns, int pRows)
          Creates a new instance of AwtGridLayout based on an IGridLayout implementation.
 
Method Summary
 int getColumns()
          Returns the number of columns.
 IGridLayout.IGridConstraints getConstraints(IComponent pComponent)
          Gets the constraints for the specified IComponent.
 IGridLayout.IGridConstraints getConstraints(int pColumns, int pRows)
          Creates a constraint with the specified number of rows and columns.
 IGridLayout.IGridConstraints getConstraints(int pColumns, int pRows, int pWidth, int pHeight)
          Creates a constraint with the specified number of rows and columns with the determined dimensions.
 IGridLayout.IGridConstraints getConstraints(int pColumns, int pRows, int pWidth, int pHeight, IInsets pInsets)
          Creates a constraint with the specified number of rows and columns with the determined dimensions and insets.
 int getHorizontalGap()
          Returns the horizontal gap between components.
 IInsets getMargins()
          Gets the margins.
 int getRows()
          Returns the number of rows.
 int getVerticalGap()
          Returns the vertical gap between components.
 void setColumns(int pColumns)
          Sets the column count.
 void setConstraints(IComponent pComponent, IGridLayout.IGridConstraints pConstraints)
          Sets the constraints for the specified IComponent.
 void setHorizontalGap(int pHorizontalGap)
          Sets the horizontal gap between components.
 void setMargins(IInsets pMargins)
          Sets the margins.
 void setRows(int pRows)
          Sets the row count.
 void setVerticalGap(int pVerticalGap)
          Sets the vertical gap between components.
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
equals, getResource, 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

AwtGridLayout

public AwtGridLayout(int pColumns,
                     int pRows)
Creates a new instance of AwtGridLayout based on an IGridLayout implementation.

Parameters:
pColumns - the column count
pRows - the row count
See Also:
IGridLayout
Method Detail

getMargins

public IInsets getMargins()
Gets the margins.

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

setMargins

public void setMargins(IInsets pMargins)
Sets the margins.

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

setColumns

public void setColumns(int pColumns)
Sets the column count.

Specified by:
setColumns in interface IGridLayout
Parameters:
pColumns - the column count.

getColumns

public int getColumns()
Returns the number of columns.

Specified by:
getColumns in interface IGridLayout
Returns:
the number of columns.

setRows

public void setRows(int pRows)
Sets the row count.

Specified by:
setRows in interface IGridLayout
Parameters:
pRows - the row count.

getRows

public int getRows()
Returns the number of rows.

Specified by:
getRows in interface IGridLayout
Returns:
the number of rows.

getHorizontalGap

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

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

getVerticalGap

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

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

getConstraints

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

Specified by:
getConstraints in interface ILayout<IGridLayout.IGridConstraints>
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,
                           IGridLayout.IGridConstraints pConstraints)
Sets the constraints for the specified IComponent.

Specified by:
setConstraints in interface ILayout<IGridLayout.IGridConstraints>
Parameters:
pComponent - the IComponent
pConstraints - the new constraints for the specified IComponent.

getConstraints

public IGridLayout.IGridConstraints getConstraints(int pColumns,
                                                   int pRows)
Creates a constraint with the specified number of rows and columns.

Specified by:
getConstraints in interface IGridLayout
Parameters:
pColumns - the number of columns
pRows - the number of rows
Returns:
the constraint.

getConstraints

public IGridLayout.IGridConstraints getConstraints(int pColumns,
                                                   int pRows,
                                                   int pWidth,
                                                   int pHeight)
Creates a constraint with the specified number of rows and columns with the determined dimensions.

Specified by:
getConstraints in interface IGridLayout
Parameters:
pColumns - the number of columns
pRows - the number of rows
pWidth - width of the content
pHeight - height of the content
Returns:
the constraint.

getConstraints

public IGridLayout.IGridConstraints getConstraints(int pColumns,
                                                   int pRows,
                                                   int pWidth,
                                                   int pHeight,
                                                   IInsets pInsets)
Creates a constraint with the specified number of rows and columns with the determined dimensions and insets.

Specified by:
getConstraints in interface IGridLayout
Parameters:
pColumns - the number of columns
pRows - the number of rows
pWidth - width of the content
pHeight - height of the content
pInsets - the determined insets
Returns:
the constraint.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.