|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSimplePanel
com.vaadin.client.ui.SimpleFocusablePanel
com.vaadin.client.ui.VMenuBar
public class VMenuBar
| Nested Class Summary | |
|---|---|
static class |
VMenuBar.CustomMenuItem
A class to hold information on menu items |
| Field Summary | |
|---|---|
static java.lang.String |
CLASSNAME
Set the CSS class name to allow styling. |
ApplicationConnection |
client
For internal use only. |
VMenuBar |
collapsedRootItems
For internal use only. |
protected Element |
containerElement
|
static Command |
emptyCommand
An empty command to be used when the item has no command associated |
boolean |
enabled
For internal use only. |
VMenuBar |
hostReference
For internal use only. |
boolean |
htmlContentAllowed
For internal use only. |
protected java.util.ArrayList<VMenuBar.CustomMenuItem> |
items
|
protected boolean |
menuVisible
|
VMenuBar.CustomMenuItem |
moreItem
For internal use only. |
boolean |
openRootOnHover
For internal use only. |
protected VMenuBar |
parentMenu
|
protected VOverlay |
popup
|
protected VMenuBar.CustomMenuItem |
selected
|
protected boolean |
subMenu
Widget fields |
static java.lang.String |
SUBMENU_CLASSNAME_PREFIX
|
java.lang.String |
uidlId
For server connections. |
protected VMenuBar |
visibleChildMenu
|
| Constructor Summary | |
|---|---|
VMenuBar()
|
|
VMenuBar(boolean subMenu,
VMenuBar parentMenu)
|
|
| Method Summary | |
|---|---|
VMenuBar.CustomMenuItem |
addItem(java.lang.String html,
Command cmd)
Add a new item to this menu |
void |
addItem(VMenuBar.CustomMenuItem item)
Add a new item to this menu |
void |
addItem(VMenuBar.CustomMenuItem item,
int index)
|
java.lang.String |
buildItemHTML(UIDL item)
Build the HTML content for a menu item. |
void |
clearItems()
Remove all the items in this menu |
protected int |
getCloseMenuKey()
Get the key that closes the menu. |
com.google.gwt.user.client.Element |
getContainerElement()
Returns the containing element of the menu |
java.util.List<VMenuBar.CustomMenuItem> |
getItems()
Returns a list of items in this menu |
VMenuBar.CustomMenuItem |
getMenuItemWithElement(com.google.gwt.user.client.Element element)
Deprecated. As of 7.2, call or override getMenuItemWithElement(Element) instead |
VMenuBar.CustomMenuItem |
getMenuItemWithElement(Element element)
Get menu item with given DOM element |
protected int |
getNavigationDownKey()
Get the key that moves the selection downwards. |
protected int |
getNavigationLeftKey()
Get the key that moves the selection left. |
protected int |
getNavigationRightKey()
Get the key that moves the selection right. |
protected int |
getNavigationSelectKey()
Deprecated. use isNavigationSelectKey(int) instead |
protected int |
getNavigationUpKey()
Get the key that moves the selection upwards. |
VMenuBar |
getParentMenu()
Returns the parent menu of this menu, or null if this is the top-level menu |
VMenuBar.CustomMenuItem |
getSelected()
Returns the currently selected item of this menu, or null if nothing is selected |
com.google.gwt.user.client.Element |
getSubPartElement(java.lang.String subPart)
Locates an element inside a component using the identifier provided in subPart. |
java.lang.String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component. |
boolean |
handleNavigation(int keycode,
boolean ctrl,
boolean shift)
Handles the keyboard events handled by the MenuBar |
void |
hideChildMenu(VMenuBar.CustomMenuItem item)
Hides the submenu of an item |
void |
hideChildren()
Recursively hide all child menus |
void |
hideParents(boolean autoClosed)
Recursively hide all parent menus |
void |
iLayout()
|
void |
iLayout(boolean iconLoadEvent)
|
protected boolean |
isNavigationSelectKey(int keycode)
Checks whether key code selects a menu item. |
void |
itemClick(VMenuBar.CustomMenuItem item)
When an item is clicked |
void |
itemOut(VMenuBar.CustomMenuItem item)
When the mouse is moved away from an item |
void |
itemOver(VMenuBar.CustomMenuItem item)
When the user hovers the mouse over the item |
void |
onBrowserEvent(Event e)
|
void |
onClose(com.google.gwt.event.logical.shared.CloseEvent<PopupPanel> event)
Listener method, fired when this menu is closed |
protected void |
onDetach()
|
void |
onFocus(FocusEvent event)
|
void |
onKeyDown(KeyDownEvent event)
|
void |
onKeyPress(KeyPressEvent event)
|
void |
onMenuClick(int clickedItemId)
This is called by the items in the menu and it communicates the information to the server |
void |
onShow()
When the menu is shown. |
void |
removeItem(VMenuBar.CustomMenuItem item)
Remove the given item from this menu |
void |
setParentMenu(VMenuBar parent)
Set the parent menu of this menu |
void |
setSelected(VMenuBar.CustomMenuItem item)
Set the currently selected item of this menu |
void |
setStyleName(java.lang.String style)
|
void |
setStylePrimaryName(java.lang.String style)
|
void |
showChildMenu(VMenuBar.CustomMenuItem item)
Shows the child menu of an item. |
protected void |
showChildMenuAt(VMenuBar.CustomMenuItem item,
int top,
int left)
|
protected void |
updateStyleNames()
|
| Methods inherited from class com.vaadin.client.ui.SimpleFocusablePanel |
|---|
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focus, setFocus, setTabIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.logical.shared.CloseHandler |
|---|
onClose |
| Field Detail |
|---|
public static final java.lang.String CLASSNAME
public static final java.lang.String SUBMENU_CLASSNAME_PREFIX
public java.lang.String uidlId
For internal use only. May be removed or replaced in the future.
public ApplicationConnection client
public final VMenuBar hostReference
public VMenuBar.CustomMenuItem moreItem
public VMenuBar collapsedRootItems
public static final Command emptyCommand
For internal use only. May be removed or replaced in the future.
protected boolean subMenu
protected java.util.ArrayList<VMenuBar.CustomMenuItem> items
protected Element containerElement
protected VOverlay popup
protected VMenuBar visibleChildMenu
protected boolean menuVisible
protected VMenuBar parentMenu
protected VMenuBar.CustomMenuItem selected
public boolean enabled
public boolean openRootOnHover
public boolean htmlContentAllowed
| Constructor Detail |
|---|
public VMenuBar()
public VMenuBar(boolean subMenu,
VMenuBar parentMenu)
| Method Detail |
|---|
public void setStyleName(java.lang.String style)
public void setStylePrimaryName(java.lang.String style)
protected void updateStyleNames()
protected void onDetach()
public java.lang.String buildItemHTML(UIDL item)
For internal use only. May be removed or replaced in the future.
public void onMenuClick(int clickedItemId)
clickedItemId - id of the item that was clickedpublic java.util.List<VMenuBar.CustomMenuItem> getItems()
public void clearItems()
public com.google.gwt.user.client.Element getContainerElement()
public VMenuBar.CustomMenuItem addItem(java.lang.String html,
Command cmd)
html - items textcmd - items command
public void addItem(VMenuBar.CustomMenuItem item)
item -
public void addItem(VMenuBar.CustomMenuItem item,
int index)
public void removeItem(VMenuBar.CustomMenuItem item)
item - public void onBrowserEvent(Event e)
public void itemClick(VMenuBar.CustomMenuItem item)
item - public void itemOver(VMenuBar.CustomMenuItem item)
item - public void itemOut(VMenuBar.CustomMenuItem item)
item - public void showChildMenu(VMenuBar.CustomMenuItem item)
item -
protected void showChildMenuAt(VMenuBar.CustomMenuItem item,
int top,
int left)
public void hideChildMenu(VMenuBar.CustomMenuItem item)
item - public void onShow()
public void onClose(com.google.gwt.event.logical.shared.CloseEvent<PopupPanel> event)
public void hideChildren()
public void hideParents(boolean autoClosed)
public VMenuBar getParentMenu()
public void setParentMenu(VMenuBar parent)
parent - public VMenuBar.CustomMenuItem getSelected()
public void setSelected(VMenuBar.CustomMenuItem item)
item - public void iLayout()
public void iLayout(boolean iconLoadEvent)
public void onKeyPress(KeyPressEvent event)
public void onKeyDown(KeyDownEvent event)
protected int getNavigationUpKey()
protected int getNavigationDownKey()
protected int getNavigationLeftKey()
protected int getNavigationRightKey()
@Deprecated protected int getNavigationSelectKey()
isNavigationSelectKey(int) instead
protected boolean isNavigationSelectKey(int keycode)
keycode -
protected int getCloseMenuKey()
public boolean handleNavigation(int keycode,
boolean ctrl,
boolean shift)
event - The keyboard event received
public void onFocus(FocusEvent event)
public com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.
getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the component
public java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identify
subElement or null
if no identifier could be provided.@Deprecated public VMenuBar.CustomMenuItem getMenuItemWithElement(com.google.gwt.user.client.Element element)
getMenuItemWithElement(Element) instead
element - Element used in search
public VMenuBar.CustomMenuItem getMenuItemWithElement(Element element)
element - Element used in search
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||