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, java.lang.String menu, IDesktopUtils desktopUtils, SystemInputManager systemInputManager)
          Constructor.
 
Method Summary
 java.lang.String getActionName()
          Get Action name for action associated with menu item, if any.
 java.lang.String getActionParameter()
           
 java.lang.String getMenu()
          Get name of containing menu
 java.lang.String getName()
          Get name of the menu.
 DesktopWmProtos.DesktopWindowRect getRect()
           
 int getRow()
          Gets the row of the widget within its parent,
 java.lang.String getShortcut()
           
 java.lang.String getShortcutLetter()
           
 java.lang.String getSubMenu()
           
 java.lang.String getText()
           
 boolean hasSubMenu()
           
 boolean isBold()
           
 boolean isChecked()
           
 boolean isEnabled()
          Checks if menuitem is enabled.
 boolean isSeparator()
           
 java.lang.String toFullString()
           
 java.lang.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,
                     java.lang.String menu,
                     IDesktopUtils desktopUtils,
                     SystemInputManager systemInputManager)
Constructor.

Parameters:
info - QuickMenuItemInfo of the menu item
Method Detail

getName

public java.lang.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 java.lang.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 java.lang.String getActionParameter()
Returns:
String action parameter to the action of the menuitem, if any

getSubMenu

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

getText

public java.lang.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 java.lang.String getShortcutLetter()
Returns:
ShortcutLetter, or null if none

getShortcut

public java.lang.String getShortcut()
Returns:
shortcut of item

getRect

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toFullString

public java.lang.String toFullString()
Specified by:
toFullString in class OperaUIElement

getMenu

public java.lang.String getMenu()
Get name of containing menu

Returns:
name of the menu the menuItem is in


Copyright © 2011. All Rights Reserved.