Extension SDK 10.1.2

oracle.ide.util
Class MnemonicSolver.MenuLabel

java.lang.Object
  extended byoracle.ide.util.MnemonicSolver.MenuLabel
Enclosing class:
MnemonicSolver

public class MnemonicSolver.MenuLabel
extends java.lang.Object

MenuLabel class. Instances of this class encapsulate a menu label.


Constructor Summary
protected MnemonicSolver.MenuLabel(javax.swing.JMenuItem menuItem, boolean fixed)
          Constructor.
protected MnemonicSolver.MenuLabel(javax.swing.JMenuItem menuItem, java.lang.String text, boolean fixed)
          Constructor.
protected MnemonicSolver.MenuLabel(java.lang.String text)
          Constructor.
protected MnemonicSolver.MenuLabel(java.lang.String text, int mnemonic)
          Constructor.
protected MnemonicSolver.MenuLabel(java.lang.String text, int mnemonic, boolean fixed)
          Constructor.
 
Method Summary
 javax.swing.JMenuItem getMenuItem()
          Gets the JMenuItem associated with this menu label.
 int getMnemonic()
          Returns the menu label mnemonics.
 java.util.List getPotentialMnemonics()
          Gets the recommended mnemonics list.
 java.lang.String getText()
          Returns the menu text.
 void initMnemonic(int mnemonic)
          Sets the menu label mnemonics.
 boolean isFixed()
          Indicates whether this menu label allows changing its mnemonic.
 boolean isValidText(java.lang.String text)
          Checks if the specified text is not null and has length.
 void setFixed(boolean fixed)
          Set whether this menu label allows changing its mnmonic.
 void setMenuItem(javax.swing.JMenuItem menuItem)
          Sets the JMenuItem associated with this menu label.
 void setMnemonic(int mnemonic)
          Sets the menu label mnemonics.
 void setPotentialMnemonics(java.util.List potentialMnemonics)
          Sets the recommended mnemonics list.
 void setText(java.lang.String text)
          Sets the menu text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MnemonicSolver.MenuLabel

protected MnemonicSolver.MenuLabel(java.lang.String text)
Constructor.

Parameters:
text - The menu text.

MnemonicSolver.MenuLabel

protected MnemonicSolver.MenuLabel(java.lang.String text,
                                   int mnemonic)
Constructor.

Parameters:
text - The menu text.
mnemonic - The menu mnemonic.

MnemonicSolver.MenuLabel

protected MnemonicSolver.MenuLabel(java.lang.String text,
                                   int mnemonic,
                                   boolean fixed)
Constructor.

Parameters:
text - The menu text.
mnemonic - The menu mnemonic.
fixed - true if this menu label does not allow changing

MnemonicSolver.MenuLabel

protected MnemonicSolver.MenuLabel(javax.swing.JMenuItem menuItem,
                                   boolean fixed)
Constructor.

Parameters:
menuItem - The menu whose mnemonic needs resolution.
fixed - true if this menu label does not allow changing

MnemonicSolver.MenuLabel

protected MnemonicSolver.MenuLabel(javax.swing.JMenuItem menuItem,
                                   java.lang.String text,
                                   boolean fixed)
Constructor.

Parameters:
menuItem - The menu whose mnemonic needs resolution.
text - The menu text. Overrides the menuItem text.
fixed - true if this menu label does not allow changing
Method Detail

getText

public java.lang.String getText()
Returns the menu text.


setText

public void setText(java.lang.String text)
Sets the menu text.


getMnemonic

public int getMnemonic()
Returns the menu label mnemonics.


setMnemonic

public void setMnemonic(int mnemonic)
Sets the menu label mnemonics.


initMnemonic

public void initMnemonic(int mnemonic)
Sets the menu label mnemonics. If there is a JMenuItem, it also sets it on the menu item.


isFixed

public boolean isFixed()
Indicates whether this menu label allows changing its mnemonic.


setFixed

public void setFixed(boolean fixed)
Set whether this menu label allows changing its mnmonic.


getMenuItem

public javax.swing.JMenuItem getMenuItem()
Gets the JMenuItem associated with this menu label.


setMenuItem

public void setMenuItem(javax.swing.JMenuItem menuItem)
Sets the JMenuItem associated with this menu label.


getPotentialMnemonics

public java.util.List getPotentialMnemonics()
Gets the recommended mnemonics list.


setPotentialMnemonics

public void setPotentialMnemonics(java.util.List potentialMnemonics)
Sets the recommended mnemonics list.


isValidText

public boolean isValidText(java.lang.String text)
Checks if the specified text is not null and has length.


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.