public abstract class CellPanel extends ComplexPanel
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(com.google.gwt.user.client.ui.Widget, com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant)
HasVerticalAlignment.VerticalAlignmentConstant
and used as the align
argument to setCellVerticalAlignment(com.google.gwt.user.client.ui.Widget, com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant)
width
argument to setCellWidth(com.google.gwt.user.client.ui.Widget, java.lang.String)
height
argument to setCellHeight(com.google.gwt.user.client.ui.Widget, java.lang.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>
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
IndexedPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
CellPanel() |
Modifier and Type | Method and Description |
---|---|
protected Element |
getBody() |
int |
getSpacing()
Gets the amount of spacing between this panel's cells.
|
protected Element |
getTable() |
void |
setBorderWidth(int width)
Sets the width of the border to be applied to all cells in this panel.
|
void |
setCellHeight(IsWidget w,
String height)
Overloaded version for IsWidget.
|
void |
setCellHeight(Widget w,
String height)
Sets the height of the cell associated with the given widget, related to
the panel as a whole.
|
protected void |
setCellHorizontalAlignment(Element td,
HasHorizontalAlignment.HorizontalAlignmentConstant align) |
protected void |
setCellHorizontalAlignment(Element td,
HasHorizontalAlignment.HorizontalAlignmentConstant align)
Deprecated.
Call and override
#setCellHorizontalAlignment(Element,
HorizontalAlignmentConstant) instead. |
void |
setCellHorizontalAlignment(IsWidget w,
HasHorizontalAlignment.HorizontalAlignmentConstant align)
Overloaded version for IsWidget.
|
void |
setCellHorizontalAlignment(Widget w,
HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the horizontal alignment of the given widget within its cell.
|
protected void |
setCellVerticalAlignment(Element td,
HasVerticalAlignment.VerticalAlignmentConstant align) |
protected void |
setCellVerticalAlignment(Element td,
HasVerticalAlignment.VerticalAlignmentConstant align)
Deprecated.
Call and override
#setCellVerticalAlignment(Element,
VerticalAlignmentConstant) instead. |
void |
setCellVerticalAlignment(IsWidget w,
HasVerticalAlignment.VerticalAlignmentConstant align)
Overloaded version for IsWidget.
|
void |
setCellVerticalAlignment(Widget w,
HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the vertical alignment of the given widget within its cell.
|
void |
setCellWidth(IsWidget w,
String width)
Overloaded version for IsWidget.
|
void |
setCellWidth(Widget w,
String width)
Sets the width of the cell associated with the given widget, related to the
panel as a whole.
|
void |
setSpacing(int spacing)
Sets the amount of spacing between this panel's cells.
|
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
forEach, spliterator
public int getSpacing()
public void setBorderWidth(int width)
width
- the width of the panel's cell borders, in pixelspublic void setCellHeight(Widget w, String height)
w
- the widget whose cell height is to be setheight
- the cell's height, in CSS unitspublic void setCellHeight(IsWidget w, String height)
setCellHeight(Widget,String)
public void setCellHorizontalAlignment(Widget w, HasHorizontalAlignment.HorizontalAlignmentConstant align)
w
- the widget whose horizontal alignment is to be setalign
- the widget's horizontal alignment, as defined in
HasHorizontalAlignment
.public void setCellHorizontalAlignment(IsWidget w, HasHorizontalAlignment.HorizontalAlignmentConstant align)
public void setCellVerticalAlignment(Widget w, HasVerticalAlignment.VerticalAlignmentConstant align)
w
- the widget whose vertical alignment is to be setalign
- the widget's vertical alignment, as defined in
HasVerticalAlignment
.public void setCellVerticalAlignment(IsWidget w, HasVerticalAlignment.VerticalAlignmentConstant align)
public void setCellWidth(Widget w, String width)
w
- the widget whose cell width is to be setwidth
- the cell's width, in CSS unitspublic void setCellWidth(IsWidget w, String width)
setCellWidth(Widget,String)
public void setSpacing(int spacing)
spacing
- the inter-cell spacing, in pixelsprotected Element getBody()
protected Element getTable()
protected void setCellHorizontalAlignment(Element td, HasHorizontalAlignment.HorizontalAlignmentConstant align)
@Deprecated protected void setCellHorizontalAlignment(Element td, HasHorizontalAlignment.HorizontalAlignmentConstant align)
#setCellHorizontalAlignment(Element,
HorizontalAlignmentConstant)
instead.protected void setCellVerticalAlignment(Element td, HasVerticalAlignment.VerticalAlignmentConstant align)
@Deprecated protected void setCellVerticalAlignment(Element td, HasVerticalAlignment.VerticalAlignmentConstant align)
#setCellVerticalAlignment(Element,
VerticalAlignmentConstant)
instead.Copyright © 2018. All rights reserved.