java.lang.Object | |||||
↳ | com.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 |
Known Direct Subclasses |
A panel whose child widgets are contained within the cells of a table. Each cell's size may be set independently. Each child widget can take up a subset of its cell and can be aligned within it.
Note: This class is not related to the
Cell
based data presentation widgets such
as CellList
and
CellTable
.
When working with CellPanel subclasses in
UiBinder
templates, wrap
child widgets in <g:cell>
elements. (Note the lower case
"c", meant to signal that the cell is not a runtime object, and so cannot
have a ui:field
attribute.) Cell elements can have
attributes setting their height, width and alignment.
HasHorizontalAlignment.HorizontalAlignmentConstant
and used as the align
argument to setCellHorizontalAlignment(Element, HasHorizontalAlignment.HorizontalAlignmentConstant)
HasVerticalAlignment.VerticalAlignmentConstant
and used as the align
argument to setCellVerticalAlignment(Element, HasVerticalAlignment.VerticalAlignmentConstant)
width
argument to setCellWidth(Widget, String)
height
argument to setCellHeight(Widget, String)
For example:
<g:HorizontalPanel> <g:cell width='5em' horizontalAlignment='ALIGN_RIGHT'> <g:Label ui:field='leftSide' /> </g:cell> <g:cell width='15em' horizontalAlignment='ALIGN_LEFT'> <g:Label ui:field='rightSide' /> </g:cell> </g:HorizontalPanel>
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the amount of spacing between this panel's cells.
| |||||||||||
Sets the width of the border to be applied to all cells in this panel.
| |||||||||||
Sets the height of the cell associated with the given widget, related to
the panel as a whole.
| |||||||||||
Sets the horizontal alignment of the given widget within its cell.
| |||||||||||
Sets the vertical alignment of the given widget within its cell.
| |||||||||||
Sets the width of the cell associated with the given widget, related to the
panel as a whole.
| |||||||||||
Sets the amount of spacing between this panel's cells.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.ComplexPanel
| |||||||||||
From class
com.google.gwt.user.client.ui.Panel
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
java.lang.Iterable
|
Gets the amount of spacing between this panel's cells.
Sets the width of the border to be applied to all cells in this panel. This is particularly useful when debugging layouts, in that it allows you to see explicitly the cells that contain this panel's children.
width | the width of the panel's cell borders, in pixels |
---|
Sets the height of the cell associated with the given widget, related to the panel as a whole.
w | the widget whose cell height is to be set |
---|---|
height | the cell's height, in CSS units |
Sets the horizontal alignment of the given widget within its cell.
w | the widget whose horizontal alignment is to be set |
---|---|
align | the widget's horizontal alignment, as defined in
HasHorizontalAlignment .
|
Sets the vertical alignment of the given widget within its cell.
w | the widget whose vertical alignment is to be set |
---|---|
align | the widget's vertical alignment, as defined in
HasVerticalAlignment .
|
Sets the width of the cell associated with the given widget, related to the panel as a whole.
w | the widget whose cell width is to be set |
---|---|
width | the cell's width, in CSS units |
Sets the amount of spacing between this panel's cells.
spacing | the inter-cell spacing, in pixels |
---|