|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsale.MenuSheetObject
sale.MenuSheetItem
A MenuSheetItem that has a label and an associated action.
Action,
MenuSheet,
MenuSheetSeparator,
Serialized Form| Field Summary | |
protected Action |
m_aAction
The action associated with this MenuSheetItem. |
protected ImageIcon[] |
m_aiImages
The Images associated with the icons of this MenuSheetItem( [0]:DefaultImage, [1]:PressedImage, [2]:DisabledImage, [3]:PressedDiabledImage ). |
protected char |
m_cMnemonic
The Mnemonic of this MenuSheetItem. |
protected JMenuItem |
m_jmiPeer
The JMenuItem peer. |
protected JMenu |
m_jmMenuPeer
The JMenu peer. |
protected KeyStroke |
m_ksKeyStroke
The KeyStroke of this MenuSheetItem. |
protected String |
m_sToolTip
The ToolTip of this MenuSheeItemt. |
| Fields inherited from class sale.MenuSheetObject |
m_msParent, m_pAttached, m_spAttached |
| Constructor Summary | |
MenuSheetItem(String sCaption,
Action aAction)
Creates a new MenuSheetItem with caption and action. |
|
MenuSheetItem(String sCaption,
String sTag,
Action aAction)
Creates a new MenuSheetItem with caption, tag and action; initially enabled. |
|
MenuSheetItem(String sCaption,
String sTag,
Action aAction,
char cMnemonic)
Creates a new MenuSheetItem with caption, tag, an action and a mnemonic. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Hook method called whenever the user selects the MenuSheetItem. |
KeyStroke |
getAccelerator()
Get the accelerator of this MenuSheetItem. |
protected Object |
getActionLock()
Return the monitor used to synchronized access to the m_aAction. |
ImageIcon |
getDefaultIcon()
Get the default icon of this MenuSheetItem. |
ImageIcon |
getDisabledIcon()
Get the disabled item of this MenuSheetItem. |
ImageIcon |
getDisabledSelectedIcon()
Get the disabled selected item of this MenuSheetItem. |
JMenu |
getMenuPeer()
Return the JMenu peer for this MenuSheetItem. |
char |
getMnemonic()
Get the Mnemonic of this MenuSheetItem. |
JMenuItem |
getPeer()
Get the JMenuItem peer of the MenuSheetItem. |
protected Object |
getPeerLock()
Return the monitor used to synchronized access to the peers. |
ImageIcon |
getSelectedIcon()
Get the selected icon of this MenuSheetItem. |
String |
getToolTipText()
Get the ToolTip of this MenuSheetItem. |
boolean |
isEnabled()
Return the current enabled state of this MenuSheetItem. |
void |
setAccelerator(KeyStroke ks)
Set the accelerator of this MenuSheetItem. |
Action |
setAction(Action aAction)
Set the action to perform when this item is selected. |
void |
setCaption(String sCaption)
Set the caption of this MenuSheetItem. |
void |
setDefaultIcon(ImageIcon iiImageIcon)
Set the default icon of this MenuSheetItem. |
void |
setDisabledIcon(ImageIcon iiImageIcon)
Set the disabled icon of this MenuSheetItem. |
void |
setDisabledSelectedIcon(ImageIcon iiImageIcon)
Set the disabled selected icon of this MenuSheetItem. |
void |
setEnabled(boolean fEnabled)
Set the enabled state of this MenuSheetItem. |
void |
setMnemonic(char cMnemonic)
Set the mnemonic of this MenuSheetItem. |
void |
setSelectedIcon(ImageIcon iiImageIcon)
Set the selected icon of this MenuSheetItem. |
void |
setToolTipText(String s)
Set the ToolTip of this MenuSheetItem. |
void |
setVisible(boolean fVisible)
Mark the item visible or invisible. |
| Methods inherited from class sale.MenuSheetObject |
attach, attach, detachSaleProcess, detachSalesPoint, equals, getCaption, getParent, getTag, getTaggedItem, getTaggedItem, isSeparator, isVisible |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient JMenuItem m_jmiPeer
protected transient JMenu m_jmMenuPeer
protected Action m_aAction
protected ImageIcon[] m_aiImages
protected char m_cMnemonic
protected KeyStroke m_ksKeyStroke
protected String m_sToolTip
| Constructor Detail |
public MenuSheetItem(String sCaption,
String sTag,
Action aAction,
char cMnemonic)
sCaption - the caption of the new MenuSheetItem.sTag - the tag that will identify this MenuSheetItem.aAction - the action to perform when this MenuSheetItem is selected.cMnemonic - the mnemonic of the new MenuSheetItem
public MenuSheetItem(String sCaption,
String sTag,
Action aAction)
sCaption - the caption of the new MenuSheetItem.sTag - the tag that will identify this MenuSheetItem.aAction - the action to perform when this MenuSheetItem is selected.
public MenuSheetItem(String sCaption,
Action aAction)
sCaption - the caption of the new MenuSheetItem.aAction - the action to perform when this MenuSheetItem is selected.| Method Detail |
protected Object getPeerLock()
protected Object getActionLock()
public void setCaption(String sCaption)
setCaption in class MenuSheetObjectsCaption - the new caption.public void setEnabled(boolean fEnabled)
fEnabled - the new enabled state.public boolean isEnabled()
public void setVisible(boolean fVisible)
setVisible in class MenuSheetObjectfVisible - the visibility state of the MenuSheetObject.public Action setAction(Action aAction)
aAction - the action to perform when this item is selected.
public void setMnemonic(char cMnemonic)
If there is a peer it will reflect the changes immediately.
public void setAccelerator(KeyStroke ks)
If there is a peer it will reflect the changes immediately.
ks - the new keystroke.public void setToolTipText(String s)
If there is a peer it will reflect the changes immediately.
s - the new ToolTip-Text.public void setDefaultIcon(ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon - the new icon.public void setSelectedIcon(ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon - the new icon.public void setDisabledIcon(ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon - the new icon.public void setDisabledSelectedIcon(ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon - the new icon.public JMenuItem getPeer()
getPeer in class MenuSheetObjectpublic JMenu getMenuPeer()
getMenuPeer in class MenuSheetObjectpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenersetAction(sale.Action),
SalesPoint,
SaleProcesspublic char getMnemonic()
public KeyStroke getAccelerator()
public String getToolTipText()
public ImageIcon getDefaultIcon()
public ImageIcon getSelectedIcon()
public ImageIcon getDisabledIcon()
public ImageIcon getDisabledSelectedIcon()
|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||