|
||||||||||
| 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
bibliothek.gui.dock.action.actions.AbstractSimpleDropDownAction
public abstract class AbstractSimpleDropDownAction
A dropdown action based on one DockActionSource which has to be specified
by a subclass.
| Field Summary |
|---|
| Fields inherited from interface bibliothek.gui.dock.action.DockAction |
|---|
BUTTON_CONTENT_FILTER |
| Constructor Summary | |
|---|---|
AbstractSimpleDropDownAction(boolean monitorDisabling)
Creates a new action |
|
| Method Summary | ||
|---|---|---|
void |
addDropDownActionListener(DropDownActionListener listener)
Adds a listener to this action. |
|
|
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 |
fireSelectionChanged()
Informs all listeners that the selection has changed. |
|
DropDownFilterFactory |
getFilter(Dockable dockable)
Gets a filter that chooses the values that will be shown for this action and its selection. |
|
protected DropDownActionListener[] |
getListeners()
Gets an array of all listeners that are registered to this action. |
|
DockAction |
getSelection()
Returns the currently selected action. |
|
DockAction |
getSelection(Dockable dockable)
Gets the last selected action, which may be null. |
|
protected abstract DockActionSource |
getSubActions()
Gets the DockActionSource which contains all the actions of this dropdown menu. |
|
DockActionSource |
getSubActions(Dockable dockable)
Gets the actions that should be shown for this action. |
|
void |
removeDropDownActionListener(DropDownActionListener listener)
Removes a listener from this action. |
|
void |
setFilter(DropDownFilterFactory filter)
Sets the filter that will be used to filter text, icon, tooltips, etc. |
|
void |
setSelection(Dockable dockable,
DockAction selection)
Sets the current selection. |
|
void |
setSelection(DockAction selection)
Changes the selection of this drop-down-action. |
|
boolean |
trigger(Dockable dockable)
Does the appropriate action that can be done respecting the current state of this action. |
|
| Methods inherited from class bibliothek.gui.dock.action.actions.SimpleDockAction |
|---|
bound, getAccelerator, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getIcon, getIcon, getIcon, getIconContexts, getText, getText, getTooltip, getTooltipText, getTooltipText, isEnabled, isEnabled, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltip, trigger, unbound |
| Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction |
|---|
addDockActionListener, bind, 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.StandardDockAction |
|---|
addDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListener |
| Methods inherited from interface bibliothek.gui.dock.action.DockAction |
|---|
bind, unbind |
| Constructor Detail |
|---|
public AbstractSimpleDropDownAction(boolean monitorDisabling)
monitorDisabling - whether the current DisablingStrategy should be monitored| Method Detail |
|---|
public <V> V createView(ViewTarget<V> target,
ActionViewConverter converter,
Dockable dockable)
DockActiontarget 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 DockActionV - 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 DockAction getSelection(Dockable dockable)
DropDownActionnull.
getSelection in interface DropDownActiondockable - the Dockable for which the last action is requested
nullpublic DockAction getSelection()
null
public void setSelection(Dockable dockable,
DockAction selection)
DropDownActionselection should
be part of the menu
it should be selectable. The behavior of this method is not
defined if those two conditions are not fulfilled.
setSelection in interface DropDownActiondockable - the dockable for which the selection has been changedselection - the new selection, may be nullpublic void setSelection(DockAction selection)
selection - the newly selected actionpublic void setFilter(DropDownFilterFactory filter)
filter - the filter, not nullpublic DropDownFilterFactory getFilter(Dockable dockable)
DropDownAction
getFilter in interface DropDownActiondockable - the dockable for which all values will be used
protected abstract DockActionSource getSubActions()
DockActionSource which contains all the actions of this dropdown menu.
nullpublic DockActionSource getSubActions(Dockable dockable)
DropDownAction
getSubActions in interface DropDownActiondockable - the Dockable for which the actions are requested
public void addDropDownActionListener(DropDownActionListener listener)
DropDownAction
addDropDownActionListener in interface DropDownActionlistener - the listenerpublic void removeDropDownActionListener(DropDownActionListener listener)
DropDownAction
removeDropDownActionListener in interface DropDownActionlistener - the listener to removeprotected DropDownActionListener[] getListeners()
protected void fireSelectionChanged()
public boolean trigger(Dockable dockable)
DockAction
trigger in interface DockActiondockable - the element for which this action is called
true if this action could do anything, false
if this action was not able to react in any way to the event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||