|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.CellPanel
com.google.gwt.user.client.ui.DockPanel
public 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 Class Summary | |
---|---|
static class |
DockPanel.DockLayoutConstant
DockPanel layout constant, used in add(Widget, DockPanel.DockLayoutConstant) . |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
---|
HasHorizontalAlignment.HorizontalAlignmentConstant |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
---|
HasVerticalAlignment.VerticalAlignmentConstant |
Field Summary | |
---|---|
static DockPanel.DockLayoutConstant |
CENTER
Specifies that a widget be added at the center of the dock. |
static DockPanel.DockLayoutConstant |
EAST
Specifies that a widget be added at the east edge of the dock. |
static DockPanel.DockLayoutConstant |
NORTH
Specifies that a widget be added at the north edge of the dock. |
static DockPanel.DockLayoutConstant |
SOUTH
Specifies that a widget be added at the south edge of the dock. |
static DockPanel.DockLayoutConstant |
WEST
Specifies that a widget be added at the west edge of the dock. |
Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
---|
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT |
Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
---|
ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP |
Constructor Summary | |
---|---|
DockPanel()
Creates an empty dock panel. |
Method Summary | |
---|---|
void |
add(Widget widget,
DockPanel.DockLayoutConstant direction)
Adds a widget to the specified edge of the dock. |
HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
Gets the horizontal alignment. |
HasVerticalAlignment.VerticalAlignmentConstant |
getVerticalAlignment()
Gets the vertical alignment. |
DockPanel.DockLayoutConstant |
getWidgetDirection(Widget w)
Gets the layout direction of the given child widget. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
setCellHeight(Widget w,
java.lang.String height)
Sets the height of the cell associated with the given widget, related to the panel as a whole. |
void |
setCellHorizontalAlignment(Widget w,
HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the horizontal alignment of the given widget within its cell. |
void |
setCellVerticalAlignment(Widget w,
HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the vertical alignment of the given widget within its cell. |
void |
setCellWidth(Widget w,
java.lang.String width)
Sets the width of the cell associated with the given widget, related to the panel as a whole. |
void |
setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the default horizontal alignment to be used for widgets added to this panel. |
void |
setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the default vertical alignment to be used for widgets added to this panel. |
Methods inherited from class com.google.gwt.user.client.ui.CellPanel |
---|
getBody, getSpacing, getTable, setBorderWidth, setSpacing |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, getChildren, insert, iterator |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, clear, disown, onAttach, onDetach |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, onBrowserEvent, onLoad, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DockPanel.DockLayoutConstant CENTER
public static final DockPanel.DockLayoutConstant EAST
public static final DockPanel.DockLayoutConstant NORTH
public static final DockPanel.DockLayoutConstant SOUTH
public static final DockPanel.DockLayoutConstant WEST
Constructor Detail |
---|
public DockPanel()
Method Detail |
---|
public void add(Widget widget, DockPanel.DockLayoutConstant direction)
widget
- the widget to be addeddirection
- the widget's direction in the dockpublic HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
HasHorizontalAlignment
getHorizontalAlignment
in interface HasHorizontalAlignment
public HasVerticalAlignment.VerticalAlignmentConstant getVerticalAlignment()
HasVerticalAlignment
getVerticalAlignment
in interface HasVerticalAlignment
public DockPanel.DockLayoutConstant getWidgetDirection(Widget w)
w
- the widget to be queried
null
if it is not
a child of this panelpublic boolean remove(Widget w)
HasWidgets
remove
in interface HasWidgets
remove
in class ComplexPanel
w
- the widget to be removed
true
if the widget was presentpublic void setCellHeight(Widget w, java.lang.String height)
CellPanel
setCellHeight
in class CellPanel
w
- the widget whose cell height is to be setheight
- the cell's height, in CSS unitspublic void setCellHorizontalAlignment(Widget w, HasHorizontalAlignment.HorizontalAlignmentConstant align)
CellPanel
setCellHorizontalAlignment
in class CellPanel
w
- the widget whose horizontal alignment is to be setalign
- the widget's horizontal alignment, as defined in
HasHorizontalAlignment
.public void setCellVerticalAlignment(Widget w, HasVerticalAlignment.VerticalAlignmentConstant align)
CellPanel
setCellVerticalAlignment
in class CellPanel
w
- the widget whose vertical alignment is to be setalign
- the widget's vertical alignment, as defined in
HasVerticalAlignment
.public void setCellWidth(Widget w, java.lang.String width)
CellPanel
setCellWidth
in class CellPanel
w
- the widget whose cell width is to be setwidth
- the cell's width, in CSS unitspublic void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
setHorizontalAlignment
in interface HasHorizontalAlignment
align
- the horizontal alignment (
HasHorizontalAlignment.ALIGN_LEFT
,
HasHorizontalAlignment.ALIGN_CENTER
, or
HasHorizontalAlignment.ALIGN_RIGHT
).HasHorizontalAlignment.setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant)
public void setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
setVerticalAlignment
in interface HasVerticalAlignment
align
- the vertical alignment (
HasVerticalAlignment.ALIGN_TOP
,
HasVerticalAlignment.ALIGN_MIDDLE
, or
HasVerticalAlignment.ALIGN_BOTTOM
).HasVerticalAlignment.setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |