de.matthiasmann.twl
Class ColumnLayout

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.DialogLayout
          extended by de.matthiasmann.twl.ColumnLayout

public class ColumnLayout
extends DialogLayout

A column oriented layout engine.

It's based on named columns and rows.
Each row is constructed with a set of columns.
Rows can be added to the implicit root panel or to sub panels.
Panels can be removed and/or cleared to create dynamic settings.


Nested Class Summary
static class ColumnLayout.Columns
           
 class ColumnLayout.Panel
           
 class ColumnLayout.Row
           
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.DialogLayout
DialogLayout.Gap, DialogLayout.Group
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.DialogLayout
addDefaultGaps, blockInvalidateLayoutTree, DEFAULT_GAP, defaultGap, includeInvisibleWidgets, isPrepared, LARGE_GAP, largeGap, MEDIUM_GAP, mediumGap, namedGaps, redoDefaultGaps, SMALL_GAP, smallGap, warnOnIncomplete
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
ColumnLayout()
           
 
Method Summary
 ColumnLayout.Row addRow(ColumnLayout.Columns columns)
          Adds a new row.
 ColumnLayout.Row addRow(java.lang.String... columnNames)
          Adds a new row.
 ColumnLayout.Columns getColumns(java.lang.String... columnNames)
          Returns the column layout for the specified list of columns.
 ColumnLayout.Panel getRootPanel()
           
 
Methods inherited from class de.matthiasmann.twl.DialogLayout
addDefaultGaps, adjustSize, afterAddToGUI, applyTheme, applyThemeDialogLayout, childVisibilityChanged, createParallelGroup, createParallelGroup, createParallelGroup, createSequentialGroup, createSequentialGroup, createSequentialGroup, doLayout, getDefaultGap, getHorizontalGroup, getLargeGap, getMediumGap, getMinHeight, getMinWidth, getPreferredInnerHeight, getPreferredInnerWidth, getSmallGap, getVerticalGroup, insertChild, invalidateLayout, isAddDefaultGaps, isIncludeInvisibleWidgets, layout, layoutGroupsChanged, maybeInvalidateLayoutTree, paintWidget, prepare, recheckWidgets, removeAllChildren, removeChild, removeDefaultGaps, setAddDefaultGaps, setDefaultGap, setHorizontalGroup, setIncludeInvisibleWidgets, setLargeGap, setMediumGap, setSmallGap, setVerticalGroup, setWidgetAlignment, sizeChanged
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, beforeRemoveFromGUI, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleEvent, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, positionChanged, reapplyTheme, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnLayout

public ColumnLayout()
Method Detail

getRootPanel

public final ColumnLayout.Panel getRootPanel()

getColumns

public ColumnLayout.Columns getColumns(java.lang.String... columnNames)
Returns the column layout for the specified list of columns.

A column name of "" or "-" is used to create a flexible gap.

Layouts are merged starting with the first column if that column name is already in use. Merged column layouts share the column width.

Parameters:
columnNames - list of column names
Returns:
the column layout

addRow

public ColumnLayout.Row addRow(ColumnLayout.Columns columns)
Adds a new row. This is a short cut for getRootPanel().addRow(columns)

Parameters:
columns - the column layout info
Returns:
the new row

addRow

public ColumnLayout.Row addRow(java.lang.String... columnNames)
Adds a new row. This is a short cut for getRootPanel().addRow(getColumns(columnNames))

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