public class VerticalPanel extends CellPanel implements HasAlignment, InsertPanel.ForIsWidget
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledHasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstantHasVerticalAlignment.VerticalAlignmentConstantInsertPanel.ForIsWidgetHasWidgets.ForIsWidgeteventsToSinkDEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERRORALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHTALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP| Constructor and Description |
|---|
VerticalPanel()
Creates an empty vertical panel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Widget w)
Adds a child widget.
|
HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
Gets the horizontal alignment.
|
HasVerticalAlignment.VerticalAlignmentConstant |
getVerticalAlignment()
Gets the vertical alignment.
|
void |
insert(IsWidget w,
int beforeIndex) |
void |
insert(Widget w,
int beforeIndex)
Inserts a child widget before the specified index.
|
protected void |
onEnsureDebugId(java.lang.String baseID)
Affected Elements:
-# = the cell at the given index.
|
boolean |
remove(Widget w)
Removes a child widget.
|
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.
|
getBody, getSpacing, getTable, getWidgetTd, setBorderWidth, setCellHeight, setCellHeight, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellWidth, setCellWidth, setSpacingadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, doLogicalClear, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddgetWidgetIndexgetWidget, getWidgetCount, getWidgetIndex, removepublic void add(Widget w)
PanelHow to Override this Method
There are several important things that must take place in the correct order to properly add or insert a Widget to a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
ComplexPanel.adjustIndex(Widget, int).Widget.removeFromParent() on the
Widget.WidgetCollection at the appropriate index.Panel.adopt(Widget) to finalize the add as the
very last step.add in interface HasWidgetsadd in interface InsertPaneladd in class Panelw - the widget to be addedHasWidgets.add(Widget)public HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
HasHorizontalAlignmentgetHorizontalAlignment in interface HasHorizontalAlignmentHasHorizontalAlignment.ALIGN_LEFT,
HasHorizontalAlignment.ALIGN_CENTER,
HasHorizontalAlignment.ALIGN_RIGHT,
HasHorizontalAlignment.ALIGN_JUSTIFY, or
null).public HasVerticalAlignment.VerticalAlignmentConstant getVerticalAlignment()
HasVerticalAlignmentgetVerticalAlignment in interface HasVerticalAlignmentpublic void insert(IsWidget w, int beforeIndex)
insert in interface InsertPanel.ForIsWidgetpublic void insert(Widget w, int beforeIndex)
InsertPanelinsert in interface InsertPanelw - the child widget to be insertedbeforeIndex - the index before which it will be insertedpublic boolean remove(Widget w)
PanelHow to Override this Method
There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
false if it is not.Panel.orphan(Widget) first while the child
Widget is still attached.WidgetCollection.remove in interface HasWidgetsremove in class ComplexPanelw - the widget to be removedtrue if the child was presentpublic void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
setHorizontalAlignment in interface HasHorizontalAlignmentalign - the horizontal alignment (
HasHorizontalAlignment.ALIGN_LEFT,
HasHorizontalAlignment.ALIGN_CENTER,
HasHorizontalAlignment.ALIGN_RIGHT,
HasHorizontalAlignment.ALIGN_JUSTIFY,
HasHorizontalAlignment.ALIGN_LOCALE_START, or
HasHorizontalAlignment.ALIGN_LOCALE_END).HasHorizontalAlignment.setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant)public void setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
setVerticalAlignment in interface HasVerticalAlignmentalign - the vertical alignment (
HasVerticalAlignment.ALIGN_TOP,
HasVerticalAlignment.ALIGN_MIDDLE, or
HasVerticalAlignment.ALIGN_BOTTOM).HasVerticalAlignment.setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant)protected void onEnsureDebugId(java.lang.String baseID)
onEnsureDebugId in class UIObjectbaseID - the base ID used by the main elementUIObject.onEnsureDebugId(String)