de.matthiasmann.twl
Class ColumnLayout.Panel

java.lang.Object
  extended by de.matthiasmann.twl.ColumnLayout.Panel
Enclosing class:
ColumnLayout

public final class ColumnLayout.Panel
extends java.lang.Object


Method Summary
 ColumnLayout.Panel addPanel()
          Adds a new child panel
 ColumnLayout.Row addRow(ColumnLayout.Columns columns)
          Adds a new row to this panel.
 ColumnLayout.Row addRow(java.lang.String... columnNames)
          Adds a new row to this panel using the specified column names.
 void addVerticalGap(java.lang.String name)
          Adds a named vertical gap.
 void clearPanel()
          Removes all child panels and rows from this panel.
 ColumnLayout.Columns getColumns(java.lang.String... columnNames)
          Calls ColumnLayout.getColumns(java.lang.String[])
 boolean isValid()
           
 void removePanel(ColumnLayout.Panel panel)
          Removes the specified child panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValid

public boolean isValid()

getColumns

public ColumnLayout.Columns getColumns(java.lang.String... columnNames)
Calls ColumnLayout.getColumns(java.lang.String[])

Parameters:
columnNames - the column names.
Returns:
the column layout.

addRow

public ColumnLayout.Row addRow(java.lang.String... columnNames)
Adds a new row to this panel using the specified column names.

It is equivalent to addRow(getColumns(columnNames))

Parameters:
columnNames - the column names.
Returns:
the new row

addRow

public ColumnLayout.Row addRow(ColumnLayout.Columns columns)
Adds a new row to this panel.

Parameters:
columns - the column layout
Returns:
the new row.
Throws:
java.lang.IllegalStateException - when the panel has been removed from the root.

addVerticalGap

public void addVerticalGap(java.lang.String name)
Adds a named vertical gap.

Parameters:
name - the gap name.
Throws:
java.lang.IllegalStateException - when the panel has been removed from the root.

addPanel

public ColumnLayout.Panel addPanel()
Adds a new child panel

Returns:
the new child panel
Throws:
java.lang.IllegalStateException - when the panel has been removed from the root.

removePanel

public void removePanel(ColumnLayout.Panel panel)
Removes the specified child panel. Can also be called on an invalidated panel.

Parameters:
panel - the child panel.

clearPanel

public void clearPanel()
Removes all child panels and rows from this panel.