com.opera.core.systems
Class QuickMenuItem

java.lang.Object
  extended by com.opera.core.systems.OperaUIElement
      extended by com.opera.core.systems.QuickMenuItem

public class QuickMenuItem
extends OperaUIElement

Represents a menuitem in a menu in the Opera desktop UI.

Author:
Karianne Ekern

Constructor Summary
QuickMenuItem(DesktopWmProtos.QuickMenuItemInfo info, String menu, IDesktopUtils desktopUtils, SystemInputManager systemInputManager)
          Constructor.
 
Method Summary
 String getActionName()
          Get Action name for action associated with menu item, if any.
 String getActionParameter()
           
 String getMenu()
          Get name of containing menu
 String getName()
          Get name of the menu.
 DesktopWmProtos.DesktopWindowRect getRect()
           
 int getRow()
          Gets the row of the widget within its parent,
 String getShortcut()
           
 String getShortcutLetter()
           
 String getSubMenu()
           
 String getText()
           
 boolean hasSubMenu()
           
 boolean isBold()
           
 boolean isChecked()
           
 boolean isEnabled()
          Checks if menuitem is enabled.
 boolean isSeparator()
           
 String toFullString()
           
 String toString()
           
 
Methods inherited from class com.opera.core.systems.OperaUIElement
click, getCenterLocation, getDesktopUtils, getLocation, getSize, getSystemInputManager, hover, isVisible, verifyContainsText, verifyText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuickMenuItem

public QuickMenuItem(DesktopWmProtos.QuickMenuItemInfo info,
                     String menu,
                     IDesktopUtils desktopUtils,
                     SystemInputManager systemInputManager)
Constructor.

Parameters:
info - QuickMenuItemInfo of the menu item
Method Detail

getName

public String getName()
Get name of the menu. This is a constructed name, it is either - for items with an action, its action - for items with an action that has a parameter (such as Open link, 'bookmarkurl') "action, parameter" - for items that opens a submenu, its submenuname - for separators, 'Separator'

Returns:
name of menuItem

getActionName

public String getActionName()
Get Action name for action associated with menu item, if any.

Returns:
action name of action associated with the item, returns empty string for an item with no associated action

hasSubMenu

public boolean hasSubMenu()
Returns:
true if item opens a submenu

getActionParameter

public String getActionParameter()
Returns:
String action parameter to the action of the menuitem, if any

getSubMenu

public String getSubMenu()
Returns:
name of submenu, if any

getText

public String getText()
Specified by:
getText in class OperaUIElement
Returns:
text of menuitem

isEnabled

public boolean isEnabled()
Checks if menuitem is enabled.

Returns:
true if enabled, else false

isChecked

public boolean isChecked()
Returns:
true if item is checked, else false

isSeparator

public boolean isSeparator()
Returns:
true if item is a separator item, else false

isBold

public boolean isBold()
Returns:
true if the item text is bold, else false

getRow

public int getRow()
Gets the row of the widget within its parent,

Returns:
row of menuitem within menu

getShortcutLetter

public String getShortcutLetter()
Returns:
ShortcutLetter, or null if none

getShortcut

public String getShortcut()
Returns:
shortcut of item

getRect

public DesktopWmProtos.DesktopWindowRect getRect()
Specified by:
getRect in class OperaUIElement
Returns:
DesktopWindowRect of the menuitem

toString

public String toString()
Overrides:
toString in class Object

toFullString

public String toFullString()
Specified by:
toFullString in class OperaUIElement

getMenu

public String getMenu()
Get name of containing menu

Returns:
name of the menu the menuItem is in


Copyright © 2012. All Rights Reserved.