|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sale.FormSheet.FormButton
A button in the FormSheet's button bar.
FormSheet
,
Serialized FormField Summary | |
protected Image[] |
m_aiImages
The Images associated with the icons of this Button( [0]:DefaultImage, [1]:PressedImage, [2]:DisabledImage, [3]:PressedDiabledImage ). |
protected char |
m_cMnemonic
The Mnemonic of this Button. |
protected JButton |
m_jbPeer
The button's peer used to display the button. |
protected String |
m_sToolTip
The ToolTip of this Button. |
Constructor Summary | |
FormSheet.FormButton(String sCaption,
int nID,
Action aAction)
Create a new, initially enabled FormButton. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
ActionListener interface method, invoked when the peer was clicked. |
void |
attach(FormSheet fs)
Notify this button that it has been attached to, or detached from, a FormSheet. |
String |
getCaption()
Get the caption of the button. |
ImageIcon |
getDefaultIcon()
Get the default icon of this Button. |
ImageIcon |
getDisabledIcon()
Get the disabled item of this Button. |
ImageIcon |
getDisabledSelectedIcon()
Get the disabled selected item of this Button. |
FormSheet |
getFormSheet()
Get the FormSheet this button is attached to. |
int |
getID()
Get the unique ID of this button. |
char |
getMnemonic()
Get the Mnemonic of this Button. |
JButton |
getPeer()
Get the JButton peer of this button. |
protected Object |
getPeerLock()
Return the monitor used to synchronized access to the peers. |
ImageIcon |
getSelectedIcon()
Get the selected icon of this Button. |
String |
getToolTipText()
Get the ToolTip of this Button. |
void |
hide()
Hook method called when the FormSheet is hidden. |
boolean |
isEnabled()
Return the enabled state of this button. |
boolean |
isVisible()
Return the visible state of this button. |
Action |
setAction(Action aAction)
Set the action that is performed when this button is clicked. |
void |
setCaption(String sCaption)
Set the caption of the button. |
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 the button. |
void |
setMnemonic(char cMnemonic)
Set the mnemonic of this Button. |
void |
setSelectedIcon(ImageIcon iiImageIcon)
Set the selected icon of this MenuSheetItem. |
void |
setToolTipText(String s)
Set the ToolTip of this Button. |
void |
setVisible(boolean fVisible)
Set the visible state of the button. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient JButton m_jbPeer
protected Image[] m_aiImages
protected char m_cMnemonic
protected String m_sToolTip
Constructor Detail |
public FormSheet.FormButton(String sCaption, int nID, Action aAction)
sCaption
- the caption of the button.nID
- a unique ID that can be used to identify the button in its FormSheet.aAction
- an action to perform when the button was clicked.Method Detail |
protected Object getPeerLock()
public void attach(FormSheet fs)
fs
- the FormSheet the button has been attached to. If null
,
the button has been detached from a FormSheet.public FormSheet getFormSheet()
public void hide()
public void setCaption(String sCaption)
sCaption
- the new caption.public void setMnemonic(char cMnemonic)
cMnemonic
- the new mnemonic.public void setToolTipText(String s)
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 String getCaption()
public void setEnabled(boolean fEnabled)
fEnabled
- the new enabled state of the button.public boolean isEnabled()
public void setVisible(boolean fVisible)
fVisible
- the new enabled state of the button.public boolean isVisible()
public int getID()
public JButton getPeer()
public char getMnemonic()
public String getToolTipText()
public ImageIcon getDefaultIcon()
public ImageIcon getSelectedIcon()
public ImageIcon getDisabledIcon()
public ImageIcon getDisabledSelectedIcon()
public Action setAction(Action aAction)
aAction
- the action to be performed, when this button is clicked.
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
setAction(sale.Action)
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |