|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.common.action.CAction
bibliothek.gui.dock.common.intern.action.CDecorateableAction<A>
A - the kind of action managed by this CActionpublic class CDecorateableAction<A extends CommonDecoratableDockAction>
An action which has text, icons and other decorations.
| Constructor Summary | |
|---|---|
CDecorateableAction(A action)
Creates a new action. |
|
| Method Summary | |
|---|---|
void |
addDecorateableActionListener(CDecorateableActionListener listener)
Adds the observer listener to this action. |
KeyStroke |
getAccelerator()
Gets the combination of keys that will trigger this action. |
Icon |
getDisabledHoverIcon()
Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled. |
Icon |
getDisabledIcon()
Gets the disabled icon. |
Icon |
getDisabledPressedIcon()
Gets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled. |
Icon |
getHoverIcon()
Gets the icon which is used if the mouse is hovering over a button that represents this action. |
Icon |
getIcon()
Gest the icon of this action. |
Icon |
getPressedIcon()
Gets the icon which is used if the mouse is pressed over a button that represents this action. |
String |
getText()
Gets the text of this action. |
String |
getTooltip()
Gets the long description of this action. |
protected void |
init(A action)
Initializes this action, this method can be called only once. |
A |
intern()
Gets the internal representation of the action. |
boolean |
isEnabled()
Tells whether this action can be triggered by the user or not. |
boolean |
isShowTextOnButtons()
Tells whether the text of this action is shown on buttons. |
void |
removeDecorateableActionListener(CDecorateableActionListener listener)
Removes the observer listener from this action. |
void |
setAccelerator(KeyStroke accelerator)
Sets the combination of keys that will trigger this action if the user presses them. |
void |
setDisabledHoverIcon(Icon icon)
Sets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled. |
void |
setDisabledIcon(Icon icon)
Sets the icon of this action. |
void |
setDisabledPressedIcon(Icon icon)
Sets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled. |
void |
setEnabled(boolean enabled)
Enables or disables this action, a disabled action can't be triggered by the user. |
void |
setHoverIcon(Icon icon)
Sets the icon which is used if the mouse is hovering over a button that represents this action. |
void |
setIcon(Icon icon)
Sets the icon of this action. |
void |
setPressedIcon(Icon icon)
Sets the icon which is used if the mouse is pressed over a button that represents this action. |
void |
setShowTextOnButtons(boolean showTextOnButtons)
Sets whether the text of this action should be shown if this action is shown as a button. |
void |
setText(String text)
Sets the text of this action, the text will be visible when this action is shown in a menu. |
void |
setTooltip(String tooltip)
Sets a tooltip for this action. |
| Methods inherited from class bibliothek.gui.dock.common.action.CAction |
|---|
init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CDecorateableAction(A action)
action - the internal representation, can be null
if init(CommonDecoratableDockAction) is called later| Method Detail |
|---|
protected void init(A action)
action - the internal representationpublic void addDecorateableActionListener(CDecorateableActionListener listener)
listener to this action. The observer will be informed
when properties of this CDecorateableAction changed.
listener - the new observerpublic void removeDecorateableActionListener(CDecorateableActionListener listener)
listener from this action.
listener - the listener to removeaddDecorateableActionListener(CDecorateableActionListener)public void setText(String text)
text - the textpublic String getText()
public void setShowTextOnButtons(boolean showTextOnButtons)
showTextOnButtons - true if the text should be shown, false otherwisepublic boolean isShowTextOnButtons()
true if the text is shown, false otherwisesetShowTextOnButtons(boolean)public void setTooltip(String tooltip)
tooltip - the tooltippublic String getTooltip()
public void setIcon(Icon icon)
icon - the icon, can be nullpublic Icon getIcon()
public void setHoverIcon(Icon icon)
icon - the icon or nullpublic Icon getHoverIcon()
nullpublic void setPressedIcon(Icon icon)
icon - the icon or nullpublic Icon getPressedIcon()
nullpublic void setDisabledIcon(Icon icon)
icon - the disabled iconsetEnabled(boolean)public Icon getDisabledIcon()
public void setDisabledHoverIcon(Icon icon)
icon - the icon or nullpublic Icon getDisabledHoverIcon()
nullpublic void setDisabledPressedIcon(Icon icon)
icon - the icon or nullpublic Icon getDisabledPressedIcon()
nullpublic void setEnabled(boolean enabled)
enabled - true if this action should be triggerable
by the user.public boolean isEnabled()
true if this action can be triggeredpublic void setAccelerator(KeyStroke accelerator)
accelerator - the combination of keys, or nullpublic KeyStroke getAccelerator()
nullpublic A intern()
CAction
intern in class CAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||