We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.terminal.gwt.client.ui.
Class VMenuBar.CustomMenuItem
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.vaadin.terminal.gwt.client.ui.VMenuBar.CustomMenuItem
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.IsWidget
Enclosing class:
- extends com.google.gwt.user.client.ui.Widget
- implements com.google.gwt.user.client.ui.HasHTML
protected static class VMenuBar.CustomMenuItem
A class to hold information on menu items
Nested Class Summary |
---|
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 | |
---|---|
protected boolean |
checkable
|
protected boolean |
checked
|
protected com.google.gwt.user.client.Command |
command
|
protected boolean |
enabled
|
protected String |
html
|
protected boolean |
isSeparator
|
protected VMenuBar |
parentMenu
|
protected VMenuBar |
subMenu
|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VMenuBar.CustomMenuItem()
Default menu item Widget constructor for GWT.create(). |
|
VMenuBar.CustomMenuItem(String html,
com.google.gwt.user.client.Command cmd)
Deprecated. use the default constructor and setHTML(String)
and setCommand(Command) instead |
Method Summary | |
---|---|
com.google.gwt.user.client.Command |
getCommand()
|
String |
getHTML()
|
VMenuBar |
getParentMenu()
|
VMenuBar |
getSubMenu()
|
String |
getText()
|
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)
|
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 |
setParentMenu(VMenuBar parentMenu)
|
void |
setSelected(boolean selected)
|
void |
setSubMenu(VMenuBar subMenu)
|
void |
setText(String text)
|
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
html
protected String html
command
protected com.google.gwt.user.client.Command command
subMenu
protected VMenuBar subMenu
parentMenu
protected VMenuBar parentMenu
enabled
protected boolean enabled
isSeparator
protected boolean isSeparator
checkable
protected boolean checkable
checked
protected boolean checked
Constructor Detail |
---|
VMenuBar.CustomMenuItem
public VMenuBar.CustomMenuItem()
Default menu item Widget
constructor for GWT.create().
Use setHTML(String)
and setCommand(Command)
after
constructing a menu item.
VMenuBar.CustomMenuItem
@Deprecated
public VMenuBar.CustomMenuItem(String html,
com.google.gwt.user.client.Command cmd)
- Parameters:
html
-cmd
-
Deprecated. use the default constructor and setHTML(String)
and setCommand(Command)
instead
Creates a menu item Widget
.
Method Detail |
---|
setSelected
public void setSelected(boolean selected)
setChecked
public void setChecked(boolean checked)
isChecked
public boolean isChecked()
setCheckable
public void setCheckable(boolean checkable)
isCheckable
public boolean isCheckable()
setSubMenu
public void setSubMenu(VMenuBar subMenu)
getSubMenu
public VMenuBar getSubMenu()
setParentMenu
public void setParentMenu(VMenuBar parentMenu)
getParentMenu
public VMenuBar getParentMenu()
setCommand
public void setCommand(com.google.gwt.user.client.Command command)
getCommand
public com.google.gwt.user.client.Command getCommand()
getHTML
public String getHTML()
- Specified by:
getHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
setHTML
public void setHTML(String html)
- Specified by:
setHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
getText
public String getText()
- Specified by:
getText
in interfacecom.google.gwt.user.client.ui.HasText
setText
public void setText(String text)
- Specified by:
setText
in interfacecom.google.gwt.user.client.ui.HasText
setEnabled
public void setEnabled(boolean enabled)
isEnabled
public boolean isEnabled()
isSeparator
public boolean isSeparator()
updateFromUIDL
public void updateFromUIDL(UIDL uidl,
ApplicationConnection client)
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
isSelectable
public boolean isSelectable()
- Returns:
- true if it is possible to select this item, false otherwise
Checks if the item can be selected.