|
||||||||||
| 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.MenuBar
org.xwiki.gwt.user.client.ui.MenuBar
public class MenuBar
Improves the default menu bar widget provided by GWT.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.MenuBar |
|---|
com.google.gwt.user.client.ui.MenuBar.MenuBarImages, com.google.gwt.user.client.ui.MenuBar.Resources |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
MenuBar()
Creates an empty horizontal menu bar. |
|
MenuBar(boolean vertical)
Creates an empty menu bar. |
|
| Method Summary | |
|---|---|
void |
addAll(java.util.List<com.google.gwt.user.client.ui.UIObject> items)
Adds all the MenuItems and MenuItemSeparators from the given list to this menu bar. |
MenuItem |
getItem(int index)
|
protected boolean |
hasParentMenu()
NOTE: This is a hack required because #parentMenu is private. |
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
protected void |
setItems(java.util.List<com.google.gwt.user.client.ui.MenuItem> items)
Sets the list of menu items displayed by this menu bar. NOTE: This is just a hack required to overcome the fact that the GWT menu bar steals the focus when hovered. |
protected MenuItem |
xFindItem(Element target)
Finds the menu item containing the given element, which is the target of a DOM event. NOTE: This is a hack required because #findItem(Element) is private. |
protected void |
xItemOver(MenuItem item,
boolean focus)
Called when a menu item is being hovered. NOTE: This is a hack required because #itemOver(MenuItem, boolean) is package-protected. |
| Methods inherited from class com.google.gwt.user.client.ui.MenuBar |
|---|
addCloseHandler, addItem, addItem, addItem, addItem, addItem, addSeparator, addSeparator, clearItems, focus, getAutoOpen, getItemIndex, getItems, getSelectedItem, getSeparatorIndex, insertItem, insertSeparator, insertSeparator, isAnimationEnabled, isFocusOnHoverEnabled, moveSelectionDown, moveSelectionUp, onDetach, onEnsureDebugId, onPopupClosed, removeItem, removeSeparator, selectItem, setAnimationEnabled, setAutoOpen, setFocusOnHoverEnabled |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public MenuBar()
public MenuBar(boolean vertical)
vertical - true to orient the menu bar vertically| Method Detail |
|---|
public void addAll(java.util.List<com.google.gwt.user.client.ui.UIObject> items)
MenuItems and MenuItemSeparators from the given list to this menu bar.
items - the list of MenuItems and MenuItemSeparators to be added to this menu barpublic MenuItem getItem(int index)
index - the index of the menu item to return
protected boolean hasParentMenu()
true if this menu bar has a parent menu, false otherwiseprotected MenuItem xFindItem(Element target)
target - a DOM element, usually the target of an event
null otherwise
protected void xItemOver(MenuItem item,
boolean focus)
item - the menu item being hoveredfocus - true to focus the specified menu item, false otherwiseprotected void setItems(java.util.List<com.google.gwt.user.client.ui.MenuItem> items)
items - the list of MenuItem objects to be placed on the menu baronBrowserEvent(Event),
http://code.google.com/p/google-web-toolkit/issues/detail?id=3884public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.MenuBarMenuBar.onBrowserEvent(Event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||