|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.core.FormSheet.FormButton
public static class FormSheet.FormButton
A button in the FormSheet's button bar.
FormSheet
Field Summary | |
---|---|
private static int |
DEFAULT_IMAGE
|
private static int |
DISABLED_IMAGE
|
private static int |
DISABLED_SELECTED_IMAGE
|
private Action |
m_aAction
The action associated with this button. |
protected java.awt.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. |
private boolean |
m_fEnabled
Can this button be clicked? |
private FormSheet |
m_fsOwner
The FormSheet owning this button. |
private boolean |
m_fVisible
Is this button visible? |
protected javax.swing.JButton |
m_jbPeer
The button's peer used to display the button. |
(package private) int |
m_nAddIndex
The index of this button in the add sequence of its FormSheet. |
private int |
m_nID
The unique ID used to identify the button in the FormSheet. |
private java.lang.Object |
m_oPeerLock
The monitor synchronizing access to the peers. |
private java.lang.String |
m_sCaption
The buttons caption. |
protected java.lang.String |
m_sName
The Button name |
protected java.lang.String |
m_sToolTip
The ToolTip of this Button. |
private static int |
SELECTED_IMAGE
|
Constructor Summary | |
---|---|
FormSheet.FormButton(java.lang.String sCaption,
int nID,
Action aAction)
Create a new, initially enabled FormButton. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.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. |
java.lang.String |
getCaption()
Get the caption of the button. |
javax.swing.ImageIcon |
getDefaultIcon()
Get the default icon of this Button. |
javax.swing.ImageIcon |
getDisabledIcon()
Get the disabled item of this Button. |
javax.swing.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. |
java.lang.String |
getName()
Get the name attribute of this button |
javax.swing.JButton |
getPeer()
Get the JButton peer of this button. |
protected java.lang.Object |
getPeerLock()
Return the monitor used to synchronized access to the peers. |
javax.swing.ImageIcon |
getSelectedIcon()
Get the selected icon of this Button. |
java.lang.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(java.lang.String sCaption)
Set the caption of the button. |
void |
setDefaultIcon(javax.swing.ImageIcon iiImageIcon)
Set the default icon of this MenuSheetItem. |
void |
setDisabledIcon(javax.swing.ImageIcon iiImageIcon)
Set the disabled icon of this MenuSheetItem. |
void |
setDisabledSelectedIcon(javax.swing.ImageIcon iiImageIcon)
Set the disabled selected icon of this MenuSheetItem. |
void |
setEnabled(boolean fEnabled)
Set the enabled state of the button. |
private void |
setIcon(javax.swing.ImageIcon iiImageIcon,
int nIndex)
|
void |
setMnemonic(char cMnemonic)
Set the mnemonic of this Button. |
void |
setName(java.lang.String name)
Set the awt name of thsi button |
void |
setSelectedIcon(javax.swing.ImageIcon iiImageIcon)
Set the selected icon of this MenuSheetItem. |
void |
setToolTipText(java.lang.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 |
---|
private java.lang.String m_sCaption
private int m_nID
protected transient javax.swing.JButton m_jbPeer
private FormSheet m_fsOwner
private Action m_aAction
private boolean m_fEnabled
private boolean m_fVisible
int m_nAddIndex
protected java.awt.Image[] m_aiImages
protected char m_cMnemonic
protected java.lang.String m_sToolTip
protected java.lang.String m_sName
private transient java.lang.Object m_oPeerLock
private static final int DEFAULT_IMAGE
private static final int SELECTED_IMAGE
private static final int DISABLED_IMAGE
private static final int DISABLED_SELECTED_IMAGE
Constructor Detail |
---|
public FormSheet.FormButton(java.lang.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 java.lang.Object getPeerLock()
private void setIcon(javax.swing.ImageIcon iiImageIcon, int nIndex)
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(java.lang.String sCaption)
sCaption
- the new caption.public java.lang.String getName()
public void setName(java.lang.String name)
the
- new namepublic void setMnemonic(char cMnemonic)
cMnemonic
- the new mnemonic.public void setToolTipText(java.lang.String s)
s
- the new ToolTip-Text.public void setDefaultIcon(javax.swing.ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon
- the new icon.public void setSelectedIcon(javax.swing.ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon
- the new icon.public void setDisabledIcon(javax.swing.ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon
- the new icon.public void setDisabledSelectedIcon(javax.swing.ImageIcon iiImageIcon)
If there is a peer it will reflect the changes immediately.
iiImageIcon
- the new icon.public java.lang.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 javax.swing.JButton getPeer()
public char getMnemonic()
public java.lang.String getToolTipText()
public javax.swing.ImageIcon getDefaultIcon()
public javax.swing.ImageIcon getSelectedIcon()
public javax.swing.ImageIcon getDisabledIcon()
public javax.swing.ImageIcon getDisabledSelectedIcon()
public Action setAction(Action aAction)
aAction
- the action to be performed, when this button is clicked.
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
setAction(org.salespointframework.core.Action)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |