com.vaadin.terminal.gwt.client.ui.menubar
Class MenuItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.vaadin.terminal.gwt.client.ui.menubar.MenuItem
All Implemented Interfaces:
com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility

Deprecated.

@Deprecated
public class MenuItem
extends com.google.gwt.user.client.ui.UIObject
implements com.google.gwt.user.client.ui.HasHTML

A widget that can be placed in a MenuBar. Menu items can either fire a Command when they are clicked, or open a cascading sub-menu.


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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
MenuItem(String text, boolean asHTML, com.google.gwt.user.client.Command cmd)
          Deprecated. Constructs a new menu item that fires a command when it is selected.
MenuItem(String text, boolean asHTML, MenuBar subMenu)
          Deprecated. Constructs a new menu item that cascades to a sub-menu when it is selected.
MenuItem(String text, com.google.gwt.user.client.Command cmd)
          Deprecated. Constructs a new menu item that fires a command when it is selected.
MenuItem(String text, MenuBar subMenu)
          Deprecated. Constructs a new menu item that cascades to a sub-menu when it is selected.
 
Method Summary
 com.google.gwt.user.client.Command getCommand()
          Deprecated. Gets the command associated with this item.
 String getHTML()
          Deprecated.  
 MenuBar getParentMenu()
          Deprecated. Gets the menu that contains this item.
 MenuBar getSubMenu()
          Deprecated. Gets the sub-menu associated with this item.
 String getText()
          Deprecated.  
 void setCommand(com.google.gwt.user.client.Command cmd)
          Deprecated. Sets the command associated with this item.
 void setHTML(String html)
          Deprecated.  
 void setSubMenu(MenuBar subMenu)
          Deprecated. Sets the sub-menu associated with this item.
 void setText(String text)
          Deprecated.  
 
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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuItem

public MenuItem(String text,
                com.google.gwt.user.client.Command cmd)
Deprecated. 
Constructs a new menu item that fires a command when it is selected.

Parameters:
text - the item's text
cmd - the command to be fired when it is selected

MenuItem

public MenuItem(String text,
                boolean asHTML,
                com.google.gwt.user.client.Command cmd)
Deprecated. 
Constructs a new menu item that fires a command when it is selected.

Parameters:
text - the item's text
asHTML - true to treat the specified text as html
cmd - the command to be fired when it is selected

MenuItem

public MenuItem(String text,
                MenuBar subMenu)
Deprecated. 
Constructs a new menu item that cascades to a sub-menu when it is selected.

Parameters:
text - the item's text
subMenu - the sub-menu to be displayed when it is selected

MenuItem

public MenuItem(String text,
                boolean asHTML,
                MenuBar subMenu)
Deprecated. 
Constructs a new menu item that cascades to a sub-menu when it is selected.

Parameters:
text - the item's text
asHTML - true to treat the specified text as html
subMenu - the sub-menu to be displayed when it is selected
Method Detail

getCommand

public com.google.gwt.user.client.Command getCommand()
Deprecated. 
Gets the command associated with this item.

Returns:
this item's command, or null if none exists

getHTML

public String getHTML()
Deprecated. 
Specified by:
getHTML in interface com.google.gwt.user.client.ui.HasHTML

getParentMenu

public MenuBar getParentMenu()
Deprecated. 
Gets the menu that contains this item.

Returns:
the parent menu, or null if none exists.

getSubMenu

public MenuBar getSubMenu()
Deprecated. 
Gets the sub-menu associated with this item.

Returns:
this item's sub-menu, or null if none exists

getText

public String getText()
Deprecated. 
Specified by:
getText in interface com.google.gwt.user.client.ui.HasText

setCommand

public void setCommand(com.google.gwt.user.client.Command cmd)
Deprecated. 
Sets the command associated with this item.

Parameters:
cmd - the command to be associated with this item

setHTML

public void setHTML(String html)
Deprecated. 
Specified by:
setHTML in interface com.google.gwt.user.client.ui.HasHTML

setSubMenu

public void setSubMenu(MenuBar subMenu)
Deprecated. 
Sets the sub-menu associated with this item.

Parameters:
subMenu - this item's new sub-menu

setText

public void setText(String text)
Deprecated. 
Specified by:
setText in interface com.google.gwt.user.client.ui.HasText


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.