Main Page | Packages | Class Tree | Index | Help

xp.system.layout

class TableLayout

Object
  |
  +--xp.system.layout.LayoutManager
        |
        +--xp.system.layout.TableLayout


class TableLayout
extends LayoutManager



Property Summary

public
columns (read, write)
Gets/Sets the number and sizes of rows in this layout.

public
hGap: Number (read, write)
Gets the horizontal gap between colunns.

public
rows (read, write)
Gets/Sets the number and sizes of rows in this layout.

public
vGap: Number (read, write)
Gets the vertical gap between rows.

Constructor

public
TableLayout ( )
Constructs an instance of TableLayout.

Method Summary

public
addLayoutComponent ( component, constraint ): Void
Adds the specified component with the specified name to the layout.

public
deleteColumn ( i: Number ): Void
Deletes a column in this layout. All components to the right of the deletion point are moved left one column.

public
deleteRow ( i: Number ): Void
Deletes a row in this layout. All components below the deletion point are moved up one row.

public
getColumn ( i: Number ): Number
Gets the width of a single column in this layout.

public
getColumnCount ( ): Number
Gets the number of columns in this layout.

public
getMinimumSize ( ): Dimension
Determines the minimum size of the container argument using this layout. The minimum size is the smallest size that, if used for the container's size, will ensure that all components are at least as large as their minimum size. This method cannot guarantee that all components will be their minimum size. For example, if component A and component B are each allocate half of the container's width and component A wants to be 10 pixels wide while component B wants to be 100 pixels wide, they cannot both be accommodated. Since in general components rather be larger than their minimum size instead of smaller, component B's request will be fulfilled. The minimum size of the container would be 200 pixels.

public
getPreferredSize ( ): Dimension
Calculates the preferred size for a container

public
getRow ( i: Number ): Number
Gets the sizes of a row in this layout.

public
getRowCount ( ): Number
Gets the number of rows in this layout.

public
insertColumn ( i: Number, column ): Void
Inserts a column in this layout. All components to the right of the insertion point are moved right one column. The container will need to be laid out after this method returns. See setColumn.

public
insertRow ( i: Number, row ): Void
Inserts a row in this layout. All components below the insertion point are moved down one row. The container will need to be laid out after this method returns. See setRow.

public
invalidateLayout ( ): Void
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

public
layoutContainer ( ): Void
To lay out the specified container using this layout. This method reshapes the components in the specified target container in order to satisfy the constraints of all components.

User code should not have to call this method directly.



public
removeLayoutComponent ( component ): Void
Removes the specified component from the layout.

public
setColumn ( i: Number, column ): Void
Adjusts the width of a single column in this layout.

public
setRow ( i: Number, row ): Void
Adjusts the height of a single row in this layout.

public
toString ( ): String
Converts this TableLayout to a string.

Methods inherited from class xp.system.layout.LayoutManager

addLayoutComponent, getLayoutType, getPreferredSize, initContainer, layoutContainer, removeLayoutComponent



Property Documentation

columns

public columns (read, write)
Gets/Sets the number and sizes of rows in this layout.

hGap

public hGap: Number (read, write)
Gets the horizontal gap between colunns.

rows

public rows (read, write)
Gets/Sets the number and sizes of rows in this layout.

vGap

public vGap: Number (read, write)
Gets the vertical gap between rows.


Constructor Documentation

TableLayout

public function TableLayout()
Constructs an instance of TableLayout.


Method Documentation

addLayoutComponent

public function addLayoutComponent(component,
 constraint): Void
Adds the specified component with the specified name to the layout.

Overrides:

Parameters:
component
component to add
constraint
indicates entry's position and alignment

deleteColumn

public function deleteColumn(i: Number): Void
Deletes a column in this layout. All components to the right of the deletion point are moved left one column.

Parameters:
i
zero-based index of column to delete

deleteRow

public function deleteRow(i: Number): Void
Deletes a row in this layout. All components below the deletion point are moved up one row.

Parameters:
i
zero-based index of row to delete

getColumn

public function getColumn(i: Number): Number
Gets the width of a single column in this layout.

Parameters:
i
zero-based index of row to get.
Returns:
width of the requested column

getColumnCount

public function getColumnCount(): Number
Gets the number of columns in this layout.

Returns:
the number of columns

getMinimumSize

public function getMinimumSize(): Dimension
Determines the minimum size of the container argument using this layout. The minimum size is the smallest size that, if used for the container's size, will ensure that all components are at least as large as their minimum size. This method cannot guarantee that all components will be their minimum size. For example, if component A and component B are each allocate half of the container's width and component A wants to be 10 pixels wide while component B wants to be 100 pixels wide, they cannot both be accommodated. Since in general components rather be larger than their minimum size instead of smaller, component B's request will be fulfilled. The minimum size of the container would be 200 pixels.

Returns:
a dimension indicating the container's minimum size

getPreferredSize

public function getPreferredSize(): Dimension
Calculates the preferred size for a container

Determines the preferred size of the container argument using this layout. The preferred size is the smallest size that, if used for the container's size, will ensure that all components are at least as large as their preferred size. This method cannot guarantee that all components will be their preferred size. For example, if component A and component B are each allocate half of the container's width and component A wants to be 10 pixels wide while component B wants to be 100 pixels wide, they cannot both be accommodated. Since in general components rather be larger than their preferred size instead of smaller, component B's request will be fulfilled. The preferred size of the container would be 200 pixels.

Overrides:

Returns:
The size of the container in a Dimension object

getRow

public function getRow(i: Number): Number
Gets the sizes of a row in this layout.

Parameters:
i
zero-based index of row to get.
Returns:
height of each of the requested row

getRowCount

public function getRowCount(): Number
Gets the number of rows in this layout.

Returns:
the number of rows

insertColumn

public function insertColumn(i: Number,
 column): Void
Inserts a column in this layout. All components to the right of the insertion point are moved right one column. The container will need to be laid out after this method returns. See setColumn.

Parameters:
i
zero-based index at which to insert the column
column
size size of the column to be inserted
See also:

insertRow

public function insertRow(i: Number,
 row): Void
Inserts a row in this layout. All components below the insertion point are moved down one row. The container will need to be laid out after this method returns. See setRow.

Parameters:
i
zero-based index at which to insert the row
row
size size of the row to be inserted
See also:

invalidateLayout

public function invalidateLayout(): Void
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

layoutContainer

public function layoutContainer(): Void
To lay out the specified container using this layout. This method reshapes the components in the specified target container in order to satisfy the constraints of all components.

User code should not have to call this method directly.

Overrides:

removeLayoutComponent

public function removeLayoutComponent(component): Void
Removes the specified component from the layout.

Overrides:

Parameters:
component
component being removed

setColumn

public function setColumn(i: Number,
 column): Void
Adjusts the width of a single column in this layout.

Parameters:
i
zero-based index of column to set.
column
size width of the column. This parameter cannot be null.

setRow

public function setRow(i: Number,
 row): Void
Adjusts the height of a single row in this layout.

Parameters:
i
zero-based index of row to set.
row
size height of the row. This parameter cannot be null.

toString

public function toString(): String
Converts this TableLayout to a string.

Returns:
a string representing the columns and row sizes in the form "{{x0, x1, x2, ..., xN}, {y0, y1, y2, ..., yM}}"


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc