public class CButton extends CDropDownItem<CommonSimpleButtonAction>
action()
is called.Modifier | Constructor and Description |
---|---|
|
CButton()
Creates the new button
|
protected |
CButton(CommonSimpleButtonAction action)
Creates and initializes this button.
|
|
CButton(String text,
Icon icon)
Creates a new button.
|
Modifier and Type | Method and Description |
---|---|
protected void |
action()
Invoked when the user clicks onto this button.
|
void |
addActionListener(ActionListener listener)
Adds
listener to this button, listener will be called
whenever this button it triggered. |
protected void |
fire()
Informs all
ActionListener s that this button was clicked. |
protected void |
init(CommonSimpleButtonAction action)
Initializes this action, this method can be called only once.
|
void |
removeActionListener(ActionListener listener)
Removes
listener from this button. |
isDropDownSelectable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
addDecorateableActionListener, getAccelerator, getDisabledHoverIcon, getDisabledIcon, getDisabledPressedIcon, getHoverIcon, getIcon, getPressedIcon, getText, getTooltip, intern, isAcceleratorGlobal, isEnabled, isShowTextOnButtons, removeDecorateableActionListener, setAccelerator, setAcceleratorIsGlobal, setDisabledHoverIcon, setDisabledIcon, setDisabledPressedIcon, setEnabled, setHoverIcon, setIcon, setPressedIcon, setShowTextOnButtons, setText, setTooltip
public CButton()
protected CButton(CommonSimpleButtonAction action)
action
- the action that represents this action, can be null
but then
subclasses have to call init(CommonSimpleButtonAction)
protected void init(CommonSimpleButtonAction action)
CDecorateableAction
init
in class CDecorateableAction<CommonSimpleButtonAction>
action
- the internal representationpublic void addActionListener(ActionListener listener)
listener
to this button, listener
will be called
whenever this button it triggered.listener
- the new listener, not null
public void removeActionListener(ActionListener listener)
listener
from this button.listener
- the listener to removeprotected void action()
fire()
.protected void fire()
ActionListener
s that this button was clicked.