|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.action.actions.AbstractStandardDockAction
bibliothek.gui.dock.action.actions.SimpleDockAction
public abstract class SimpleDockAction
A simple implementation of DockAction
. This action uses for
all associated Dockables
the same settings.
Field Summary | |
---|---|
private javax.swing.Icon |
disabledIcon
Icon shown if the action is not enabled |
private boolean |
enabled
Whether this action can be triggered or not |
private javax.swing.Icon |
icon
Icon shown if the action is enabled |
private java.lang.String |
text
Text of the action |
private java.lang.String |
tooltip
Tooltip for buttons showing this action |
Fields inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction |
---|
listeners |
Constructor Summary | |
---|---|
SimpleDockAction()
|
Method Summary | |
---|---|
javax.swing.Icon |
getDisabledIcon()
Gets the icon that is shown when this action is not enabled. |
javax.swing.Icon |
getDisabledIcon(Dockable dockable)
Gets the Icon of this DockAction, when this DockAction is shown together with dockable and is not enabled. |
javax.swing.Icon |
getIcon()
Gets the default-icon that is shown for this action. |
javax.swing.Icon |
getIcon(Dockable dockable)
Gets the Icon of this DockAction, when this DockAction is shown together with dockable . |
java.lang.String |
getText()
Gets the text that is shown for this action. |
java.lang.String |
getText(Dockable dockable)
Gets the text of this DockActon, when this DockAction is shown together with dockable . |
java.lang.String |
getTooltipText()
Gets the toopltip-text that is shown for this action. |
java.lang.String |
getTooltipText(Dockable dockable)
Gets a tooltip for this DockActon, when this DockAction is shown together with dockable . |
boolean |
isEnabled()
Gets the enabled-state for this action. |
boolean |
isEnabled(Dockable dockable)
Tells whether this DockAction can be triggered together with the dockable . |
void |
setDisabledIcon(javax.swing.Icon disabledIcon)
Sets an icon that will be shown when this action is not enabled. |
void |
setEnabled(boolean enabled)
Sets the enabled-state of this action. |
void |
setIcon(javax.swing.Icon icon)
Sets the default- icon for this action. |
void |
setText(java.lang.String text)
Sets the text which is shown for this action. |
void |
setTooltipText(java.lang.String tooltip)
Sets the tooltip-text which is shown for this action. |
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction |
---|
addDockActionListener, bind, binded, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBindeds, isBinded, removeDockActionListener, unbind, unbinded |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.action.DockAction |
---|
createView |
Field Detail |
---|
private javax.swing.Icon icon
private javax.swing.Icon disabledIcon
private java.lang.String text
private java.lang.String tooltip
private boolean enabled
Constructor Detail |
---|
public SimpleDockAction()
Method Detail |
---|
public javax.swing.Icon getIcon(Dockable dockable)
StandardDockAction
dockable
.
dockable
- The Dockable
for which the action-icon
should be chosen.
dockable
, or null
.public java.lang.String getText(Dockable dockable)
StandardDockAction
dockable
.
dockable
- The Dockable
for which the action-text
should be chosen.
dockable
, or null
.public java.lang.String getText()
null
setText(String)
public void setText(java.lang.String text)
text
which is shown for this action.
text
- The text to show, or null
public java.lang.String getTooltipText(Dockable dockable)
StandardDockAction
dockable
.
dockable
- The Dockable
for which the action-tooltip
should be chosen.
dockable
, or null
.public java.lang.String getTooltipText()
setTooltipText(String)
public void setTooltipText(java.lang.String tooltip)
tooltip
- The tooltip for this actionpublic boolean isEnabled(Dockable dockable)
StandardDockAction
dockable
.
dockable
- The Dockable
for which this action maybe
triggered.
true
if the user should be able to trigger
this action, false
otherwisepublic boolean isEnabled()
true
if this action can be triggered,
false
otherwisesetEnabled(boolean)
public void setEnabled(boolean enabled)
enabled
- The statepublic javax.swing.Icon getIcon()
null
setIcon(Icon)
public void setIcon(javax.swing.Icon icon)
icon
for this action. This icon
will be shown when no other icon fits the current states of
the action.
icon
- The icon, can be null
public javax.swing.Icon getDisabledIcon()
null
setDisabledIcon(Icon)
,
isEnabled()
public javax.swing.Icon getDisabledIcon(Dockable dockable)
StandardDockAction
dockable
and is not enabled.
dockable
- The Dockable
for which the action-icon
should be chosen.
dockable
, or null
.public void setDisabledIcon(javax.swing.Icon disabledIcon)
disabledIcon
- The disabled-icon, can be null
setEnabled(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |