public class Toolbar extends com.google.gwt.user.client.ui.FlowPanel implements ButtonContainer, com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.KeyUpHandler
Widget representing a toolbar. It renders a
horizontal bar that is supposed to contain buttons with icons. You can directly
add buttons. To put buttons into a ButtonGroup
you may also use startGroup() and endGroup().com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
private List<com.google.gwt.user.client.ui.ButtonBase> |
buttonList |
private ButtonGroup |
currentButtonGroup
The current
ButtonGroup or null. |
private com.google.gwt.user.client.ui.ButtonBase |
focusButton |
| Constructor and Description |
|---|
Toolbar()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget widget) |
com.google.gwt.event.shared.HandlerRegistration |
addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler) |
boolean |
endGroup()
This method ends a
previously started group. |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event) |
private void |
setFocusButton(com.google.gwt.user.client.ui.ButtonBase button) |
void |
startGroup()
This method starts a new button-group and adds it to this container.
|
private void |
updateFocus(com.google.gwt.user.client.ui.ButtonBase button)
Updates the focus to the given button.
|
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetWidgetIndexgetWidget, getWidgetCount, getWidgetIndex, removeforEach, spliteratorprivate final List<com.google.gwt.user.client.ui.ButtonBase> buttonList
add(Widget)private com.google.gwt.user.client.ui.ButtonBase focusButton
add(Widget)private ButtonGroup currentButtonGroup
ButtonGroup or null.public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler)
addBlurHandler in interface com.google.gwt.event.dom.client.HasBlurHandlerspublic com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
addFocusHandler in interface com.google.gwt.event.dom.client.HasFocusHandlerspublic void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus in interface com.google.gwt.event.dom.client.FocusHandlerprivate void updateFocus(com.google.gwt.user.client.ui.ButtonBase button)
button - is the button to focus.public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
onKeyUp in interface com.google.gwt.event.dom.client.KeyUpHandlerpublic void add(com.google.gwt.user.client.ui.Widget widget)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in interface com.google.gwt.user.client.ui.InsertPaneladd in class com.google.gwt.user.client.ui.FlowPanelprivate void setFocusButton(com.google.gwt.user.client.ui.ButtonBase button)
button - is the button to set a active descendant and receiver of the focus (via
tab).public void startGroup()
throws IllegalStateException
container until the button-group was ended will be added
to the current button-group.
A button-group is realized by ButtonGroup.startGroup in interface ButtonContainerIllegalStateException - if the previous button-group has NOT been ended.ButtonContainer.endGroup()public boolean endGroup()
previously started group.endGroup in interface ButtonContainertrue if the current button-group has successfully been ended, false
otherwise (if there was no such button-group).Copyright © 2001–2016 mmm-Team. All rights reserved.