|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.action.actions.AbstractStandardDockAction bibliothek.gui.dock.action.actions.GroupedDockAction<K,D> bibliothek.gui.dock.action.actions.GroupedDropDownItemAction<K,SimpleSelectableAction> bibliothek.gui.dock.action.actions.GroupedSelectableDockAction<K>
K
- the type of key to distinguish between groups of Dockablespublic abstract class GroupedSelectableDockAction<K>
An action that can change between selected and not selected.
Nested Class Summary | |
---|---|
static class |
GroupedSelectableDockAction.Check<K>
An action intended to use as type ActionType.CHECK |
static class |
GroupedSelectableDockAction.Radio<K>
An action intended to use as type ActionType.RADIO |
Constructor Summary | |
---|---|
GroupedSelectableDockAction(GroupKeyGenerator<? extends K> generator,
ActionType<SelectableDockAction> type)
Creates a new action. |
Method Summary | ||
---|---|---|
void |
addSelectableListener(SelectableDockActionListener listener)
Adds a listener to this action. |
|
protected SimpleSelectableAction |
createGroup(K key)
Creates a new group. |
|
protected abstract SimpleSelectableAction |
createGroup(SelectableDockActionListener listener)
Creates a new group and adds a listener to the group. |
|
|
createView(ViewTarget<V> target,
ActionViewConverter converter,
Dockable dockable)
Creates a view for this action, for the platform target and
with help of converter . |
|
protected void |
fireSelectedChanged(Dockable dockable)
Fires a change-event on all known listeners. |
|
protected void |
fireSelectedChanged(java.util.Set<Dockable> dockables)
Fires a change-event on all known listeners. |
|
javax.swing.Icon |
getDisabledSelectedIcon(java.lang.Object key)
Gets the icon that is shown when the group key
is selected and disabled. |
|
javax.swing.Icon |
getSelectedIcon(java.lang.Object key)
Gets the icon that is shown when the group named key
is in the selected-state. |
|
boolean |
isSelected(Dockable dockable)
Tells whether this DockAction is selected or not (in respect to the given dockable ). |
|
boolean |
isSelected(java.lang.Object key)
Gets the selected-state property of the group key . |
|
void |
removeSelectableListener(SelectableDockActionListener listener)
Removes a listener from this action. |
|
void |
setDisabledSelectedIcon(K key,
javax.swing.Icon icon)
Sets the icon that will be shown when the group
key is disabled and selected. |
|
void |
setGroup(K key,
Dockable dockable)
Assigns the dockable/code> to the group with the given |
|
void |
setSelected(Dockable dockable,
boolean selected)
Sets the selected state for dockable . |
|
void |
setSelected(K key,
boolean selected)
Sets the selected-state of the group key . |
|
void |
setSelectedIcon(K key,
javax.swing.Icon icon)
Sets the icon that will be shown when the group
named key is selected. |
Methods inherited from class bibliothek.gui.dock.action.actions.GroupedDropDownItemAction |
---|
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerable, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected |
Methods inherited from class bibliothek.gui.dock.action.actions.GroupedDockAction |
---|
bound, createGroupKey, ensureGroup, getAccelerator, getDisabledIcon, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getGenerator, getGroup, getGroup, getIcon, getIcon, getText, getText, getTooltip, getTooltipText, getTooltipText, groupExists, isEnabled, isEnabled, isKnown, isRemoveEmptyGroups, removeGroup, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setGenerator, setIcon, setRemoveEmptyGroups, setText, setTooltip, trigger, unbound |
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction |
---|
addDockActionListener, bind, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind |
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.dropdown.DropDownItemAction |
---|
isDropDownSelectable, isDropDownTriggerable |
Constructor Detail |
---|
public GroupedSelectableDockAction(GroupKeyGenerator<? extends K> generator, ActionType<SelectableDockAction> type)
generator
- a generator to create keys for Dockables which are not
yet in a group.type
- the type of this actionMethod Detail |
---|
public void setGroup(K key, Dockable dockable)
GroupedDockAction
dockable/code> to the group with the given key
.
- Overrides:
setGroup
in class GroupedDockAction<K,SimpleSelectableAction>
- Parameters:
key
- The name of the new groupdockable
- The Dockable
whose membership will be changed.
The dockable must already be in a group of this action.- See Also:
GroupedDockAction.createGroupKey(Dockable)
public <V> V createView(ViewTarget<V> target, ActionViewConverter converter, Dockable dockable)
DockAction
target
and
with help of converter
. Clients might use their own
code to create a new view, but the preferred way is to call
ActionViewConverter.createView(ActionType, DockAction, ViewTarget, Dockable)
with an ActionType
that fits to this DockAction.
createView
in interface DockAction
V
- the type of view requestedtarget
- The platform on which the view will be usedconverter
- A set of methods that can be used to create a viewdockable
- The Dockable for which the view will be shown. Note that
this action may not yet be bound
to this action.
public void addSelectableListener(SelectableDockActionListener listener)
SelectableDockAction
Dockable
changes.
addSelectableListener
in interface SelectableDockAction
listener
- the new listenerpublic void removeSelectableListener(SelectableDockActionListener listener)
SelectableDockAction
removeSelectableListener
in interface SelectableDockAction
listener
- the listener to removeprotected SimpleSelectableAction createGroup(K key)
GroupedDockAction
createGroup
in class GroupedDockAction<K,SimpleSelectableAction>
key
- the key of the new group
protected abstract SimpleSelectableAction createGroup(SelectableDockActionListener listener)
listener
- the listener to add
protected void fireSelectedChanged(Dockable dockable)
dockable
- the Dockable whose state has changedprotected void fireSelectedChanged(java.util.Set<Dockable> dockables)
dockables
- the Dockables whose state has been changedpublic boolean isSelected(Dockable dockable)
SelectableDockAction
dockable
).
isSelected
in interface SelectableDockAction
dockable
- The Dockable
for which this action may be selected
or not selected
true
if this DockAction is selcted, false
otherwisepublic void setSelected(Dockable dockable, boolean selected)
SelectableDockAction
dockable
.
setSelected
in interface SelectableDockAction
dockable
- the affected dockableselected
- the new statepublic void setSelected(K key, boolean selected)
key
.
If the group does not exist, it will be created.
key
- The name of the groupselected
- The new state of the grouppublic boolean isSelected(java.lang.Object key)
key
.
key
- The name of the group
java.lang.IllegalArgumentException
- If the group does not existsetSelected(Object, boolean)
public void setSelectedIcon(K key, javax.swing.Icon icon)
icon
that will be shown when the group
named key
is selected. If the group does not
exist, it will be created.
key
- The name of the groupicon
- The selected-icon, may be null
public javax.swing.Icon getSelectedIcon(java.lang.Object key)
key
is in the selected-state.
key
- The name of the group
null
java.lang.IllegalArgumentException
- if the group does not existGroupedDockAction.setDisabledIcon(Object, Icon)
public void setDisabledSelectedIcon(K key, javax.swing.Icon icon)
icon
that will be shown when the group
key
is disabled and selected. If the group
does not exist, it will be created.
key
- The name of the groupicon
- The icon to display, when the group is
selected and disabled, may be null
public javax.swing.Icon getDisabledSelectedIcon(java.lang.Object key)
key
is selected and disabled.
key
- The name of the group
null
java.lang.IllegalArgumentException
- if the group does not existsetDisabledSelectedIcon(Object, Icon)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |