public static class VMenuBar.CustomMenuItem extends com.google.gwt.user.client.ui.Widget implements com.google.gwt.user.client.ui.HasHTML, SubPartAware
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
checkable |
protected boolean |
checked |
protected com.google.gwt.user.client.Command |
command |
protected String |
description |
protected ContentMode |
descriptionContentMode |
protected boolean |
enabled |
protected String |
html |
protected boolean |
isSeparator |
protected VMenuBar |
parentMenu |
protected boolean |
selected |
protected VMenuBar |
subMenu |
| Constructor and Description |
|---|
CustomMenuItem()
Default menu item
Widget constructor for GWT.create(). |
CustomMenuItem(String html,
com.google.gwt.user.client.Command cmd)
Deprecated.
use the default constructor and
setHTML(String)
and setCommand(Command) instead |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.user.client.Command |
getCommand() |
String |
getHTML() |
String |
getId() |
VMenuBar |
getParentMenu() |
VMenuBar |
getSubMenu() |
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart. |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
String |
getText() |
TooltipInfo |
getTooltip() |
boolean |
isCheckable() |
boolean |
isChecked() |
boolean |
isEnabled() |
boolean |
isSelectable()
Checks if the item can be selected.
|
boolean |
isSeparator() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onLoad() |
void |
setCheckable(boolean checkable) |
void |
setChecked(boolean checked) |
void |
setCommand(com.google.gwt.user.client.Command command) |
void |
setEnabled(boolean enabled) |
void |
setHTML(String html) |
void |
setId(String id) |
void |
setParentMenu(VMenuBar parentMenu) |
void |
setSelected(boolean selected) |
void |
setStyleName(String style) |
void |
setSubMenu(VMenuBar subMenu) |
void |
setText(String text) |
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client) |
protected void |
updateStyleNames() |
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, 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, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringprotected String html
protected com.google.gwt.user.client.Command command
protected VMenuBar subMenu
protected VMenuBar parentMenu
protected boolean enabled
protected boolean isSeparator
protected boolean checkable
protected boolean checked
protected boolean selected
protected String description
protected ContentMode descriptionContentMode
public CustomMenuItem()
Widget constructor for GWT.create().
Use setHTML(String) and setCommand(Command) after
constructing a menu item.@Deprecated public CustomMenuItem(String html, com.google.gwt.user.client.Command cmd)
setHTML(String)
and setCommand(Command) insteadWidget.html - cmd - public 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.Widgetprotected void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void setStyleName(String style)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setSelected(boolean selected)
public void setChecked(boolean checked)
public boolean isChecked()
public void setCheckable(boolean checkable)
public boolean isCheckable()
public void setSubMenu(VMenuBar subMenu)
public VMenuBar getSubMenu()
public void setParentMenu(VMenuBar parentMenu)
protected void updateStyleNames()
public VMenuBar getParentMenu()
public void setCommand(com.google.gwt.user.client.Command command)
public com.google.gwt.user.client.Command getCommand()
public String getHTML()
getHTML in interface com.google.gwt.user.client.ui.HasHTMLpublic void setHTML(String html)
setHTML in interface com.google.gwt.user.client.ui.HasHTMLpublic String getText()
getText in interface com.google.gwt.user.client.ui.HasTextpublic void setText(String text)
setText in interface com.google.gwt.user.client.ui.HasTextpublic void setEnabled(boolean enabled)
public boolean isEnabled()
public boolean isSeparator()
public void updateFromUIDL(UIDL uidl, ApplicationConnection client)
public TooltipInfo getTooltip()
public boolean isSelectable()
public com.google.gwt.user.client.Element getSubPartElement(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 componentpublic 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 identifysubElement or null
if no identifier could be provided.public String getId()
public void setId(String id)
Copyright © 2018 Vaadin Ltd. All rights reserved.