Class DockPanel
A panel that lays its child widgets out "docked" at its outer edges, and
allows its last widget to take up the remaining space in its center.

Nested Classes
Fields
CENTER | Specifies that a widget be added at the center of the dock. |
EAST | Specifies that a widget be added at the east edge of the dock. |
NORTH | Specifies that a widget be added at the north edge of the dock. |
SOUTH | Specifies that a widget be added at the south edge of the dock. |
WEST | Specifies that a widget be added at the west edge of the dock. |
Constructors
Methods
Field Detail
CENTER
public static final DockPanel.DockLayoutConstant CENTER
Specifies that a widget be added at the center of the dock.
EAST
public static final DockPanel.DockLayoutConstant EAST
Specifies that a widget be added at the east edge of the dock.
NORTH
public static final DockPanel.DockLayoutConstant NORTH
Specifies that a widget be added at the north edge of the dock.
SOUTH
public static final DockPanel.DockLayoutConstant SOUTH
Specifies that a widget be added at the south edge of the dock.
WEST
public static final DockPanel.DockLayoutConstant WEST
Specifies that a widget be added at the west edge of the dock.
Constructor Detail
DockPanel
public DockPanel()
Creates an empty dock panel.
Method Detail
add
Adds a widget to the specified edge of the dock. If the widget is already a
child of this panel, this method behaves as though
remove(Widget)
had already been called.
Parameters
- widget
- the widget to be added
- direction
- the widget's direction in the dock
getHorizontalAlignment
Gets the horizontal alignment.
Return Value
the current horizontal alignment.
getVerticalAlignment
Gets the vertical alignment.
Return Value
the current vertical alignment.
getWidgetDirection
Gets the layout direction of the given child widget.
Parameters
- w
- the widget to be queried
Return Value
the widget's layout direction, or
null
if it is not
a child of this panel
remove
public boolean
remove(
Widget w)
Parameters
- w
-
setCellHeight
Sets the height of the cell associated with the given widget, related to
the panel as a whole.
Parameters
- w
- the widget whose cell height is to be set
- height
- the cell's height, in CSS units
setCellHorizontalAlignment
Sets the horizontal alignment of the given widget within its cell.
Parameters
- w
- the widget whose horizontal alignment is to be set
- align
- the widget's horizontal alignment, as defined in
HasHorizontalAlignment.
setCellVerticalAlignment
Sets the vertical alignment of the given widget within its cell.
Parameters
- w
- the widget whose vertical alignment is to be set
- align
- the widget's vertical alignment, as defined in
HasVerticalAlignment.
setCellWidth
Sets the width of the cell associated with the given widget, related to the
panel as a whole.
Parameters
- w
- the widget whose cell width is to be set
- width
- the cell's width, in CSS units
setHorizontalAlignment
Sets the default horizontal alignment to be used for widgets added to this
panel. It only applies to widgets added after this property is set.
Parameters
- align
-
See Also
HorizontalAlignmentConstant)
setVerticalAlignment
Sets the default vertical alignment to be used for widgets added to this
panel. It only applies to widgets added after this property is set.
Parameters
- align
-
See Also
VerticalAlignmentConstant)