bibliothek.gui.dock.action.actions
Interface SharingStandardDockAction

All Superinterfaces:
DockAction, StandardDockAction
All Known Subinterfaces:
CommonDecoratableDockAction, CommonDropDownItem, CommonSelectableAction, SharingDropDownDockAction, SharingDropDownItemAction, SharingSelectableDockAction
All Known Implementing Classes:
AbstractSimpleDropDownAction, CCloseAction.Action, CExtendedModeAction.Action, CloseAction, CommonSimpleButtonAction, CommonSimpleCheckAction, CommonSimpleDropDownAction, CommonSimpleMenuAction, CommonSimpleRadioAction, CPanelPopup.PanelPopup, DockFrontend.Hider, ExternalizedModeAction, FlapDockDirection, LocationModeAction, MaximizedModeAction, MinimizedModeAction, NormalModeAction, RenameAction, RenameAction.RenameDefaultDockable, RenameAction.RenameFlapDockStation, RenameAction.RenameSplitDockStation, RenameAction.RenameStackDockStation, SimpleButtonAction, SimpleDockAction, SimpleDropDownAction, SimpleDropDownItemAction, SimpleMenuAction, SimpleSelectableAction, SimpleSelectableAction.Check, SimpleSelectableAction.Radio, StationChildrenActionSource.FocusAction

@FrameworkOnly
public interface SharingStandardDockAction
extends StandardDockAction

A SharingStandardDockAction is a StandardDockAction whose properties are shared by all Dockables and whose properties can be modified by the client.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.action.DockAction
BUTTON_CONTENT_FILTER
 
Method Summary
 KeyStroke getAccelerator()
          Gets the type of KeyEvent that must happen to trigger this action.
 Icon getDisabledIcon()
          Gets the icon that is shown when this action is not enabled.
 Dockable getDockableRepresentation()
          Gets the Dockable which is represented by this DockAction.
 Icon getIcon()
          Gets the default-icon that is shown for this action.
 Icon getIcon(ActionContentModifier modifier)
          Gets the icon that is used if the conditions of modifier are met.
 String getText()
          Gets the text that is shown for this action.
 String getTooltip()
          Gets the first part of the toopltip-text that is shown for this action.
 String getTooltipText()
          Gets the text that should be shown as tooltip of this action.
 boolean isEnabled()
          Gets the enabled-state for this action.
 void setAccelerator(KeyStroke accelerator)
          Sets the type of event that will trigger this action.
 void setDisabledIcon(Icon disabledIcon)
          Sets an icon that will be shown when this action is not enabled.
 void setDockableRepresentation(Dockable dockable)
          Sets the Dockable which is represented by this DockAction.
 void setEnabled(boolean enabled)
          Sets the enabled-state of this action.
 void setIcon(ActionContentModifier modifier, Icon icon)
          Sets the icon which is to be used if the conditions of modifier are met.
 void setIcon(Icon icon)
          Sets the default-icon for this action.
 void setText(String text)
          Sets the text which is shown for this action.
 void setTooltip(String tooltip)
          Sets the first part of the tooltip-text which is shown for this action.
 
Methods inherited from interface bibliothek.gui.dock.action.StandardDockAction
addDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListener
 
Methods inherited from interface bibliothek.gui.dock.action.DockAction
bind, createView, trigger, unbind
 

Method Detail

getText

String getText()
Gets the text that is shown for this action.

Returns:
The text of this action, may be null
See Also:
setText(String)

setText

void setText(String text)
Sets the text which is shown for this action.

Parameters:
text - The text to show, or null

setTooltip

void setTooltip(String tooltip)
Sets the first part of the tooltip-text which is shown for this action.

Parameters:
tooltip - The client defined part of the tooltip for this action

getTooltip

String getTooltip()
Gets the first part of the toopltip-text that is shown for this action.

Returns:
The client defined part of the tooltip
See Also:
setTooltip(String)

getTooltipText

String getTooltipText()
Gets the text that should be shown as tooltip of this action. This text contains the value of getTooltip(), but also additional information like the accelerator

Returns:
the full tooltip text

isEnabled

boolean isEnabled()
Gets the enabled-state for this action. Only an action that is enabled can be triggered.

Returns:
true if this action can be triggered, false otherwise
See Also:
setEnabled(boolean)

setEnabled

void setEnabled(boolean enabled)
Sets the enabled-state of this action. This action can be triggered only if it is enabled.

Parameters:
enabled - The state

getIcon

Icon getIcon()
Gets the default-icon that is shown for this action.

Returns:
The icon, may be null
See Also:
setIcon(Icon)

setIcon

void setIcon(Icon icon)
Sets the default-icon for this action. This icon will be shown when no other icon fits the current states of the action.

Parameters:
icon - The icon, can be null

getDisabledIcon

Icon getDisabledIcon()
Gets the icon that is shown when this action is not enabled.

Returns:
The disabled-icon, may be null
See Also:
setDisabledIcon(Icon), isEnabled()

setDisabledIcon

void setDisabledIcon(Icon disabledIcon)
Sets an icon that will be shown when this action is not enabled.

Parameters:
disabledIcon - The disabled-icon, can be null
See Also:
setEnabled(boolean)

getIcon

Icon getIcon(ActionContentModifier modifier)
Gets the icon that is used if the conditions of modifier are met.

Parameters:
modifier - the key for the icon
Returns:
the icon or null

setIcon

void setIcon(ActionContentModifier modifier,
             Icon icon)
Sets the icon which is to be used if the conditions of modifier are met.

Parameters:
modifier - the key of the icon
icon - the new icon or null

setDockableRepresentation

void setDockableRepresentation(Dockable dockable)
Sets the Dockable which is represented by this DockAction. Some views of this DockAction will register themselves as DockElementRepresentative representing dockable.

Parameters:
dockable - the new representation, can be null

getDockableRepresentation

Dockable getDockableRepresentation()
Gets the Dockable which is represented by this DockAction.

Returns:
the element, can be null
See Also:
StandardDockAction.getDockableRepresentation(Dockable)

getAccelerator

KeyStroke getAccelerator()
Gets the type of KeyEvent that must happen to trigger this action.

Returns:
the type of event or null

setAccelerator

void setAccelerator(KeyStroke accelerator)
Sets the type of event that will trigger this action.

Parameters:
accelerator - the type of event or null.