|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler<M,SelectableDockAction>
bibliothek.gui.dock.themes.basic.action.menu.SelectableMenuHandler<M>
M
- the type of menu-item handled by this handlerpublic abstract class SelectableMenuHandler<M extends JMenuItem>
A handler which ensures that the selected-state of a JMenuItem
and
a SelectableDockAction
are always the same.
Nested Class Summary | |
---|---|
static class |
SelectableMenuHandler.Check
A handler designed to handle actions of type ActionType.CHECK . |
static class |
SelectableMenuHandler.Radio
A handler designed to handle actions of type ActionType.RADIO . |
Field Summary |
---|
Fields inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler |
---|
action, dockable, item |
Constructor Summary | |
---|---|
SelectableMenuHandler(SelectableDockAction action,
Dockable dockable,
M item)
Creates a new handler |
Method Summary | |
---|---|
void |
addActionListener(ActionListener listener)
Adds a listener which will be called if this view is triggered. |
protected abstract boolean |
allowChange(boolean newValue)
Tells whether the new value newValue can be set through
the view or not. |
void |
bind()
Connects this handler to its action. |
void |
removeActionListener(ActionListener listener)
Removes a listener from this view. |
void |
unbind()
Disconnects this handler from its action |
Methods inherited from class bibliothek.gui.dock.themes.basic.action.menu.AbstractMenuHandler |
---|
getAction, getDockable, getItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectableMenuHandler(SelectableDockAction action, Dockable dockable, M item)
action
- the action to observedockable
- the dockable for which actions are dispatcheditem
- the item to manageMethod Detail |
---|
public void addActionListener(ActionListener listener)
MenuViewItem
listener
- the new listenerpublic void removeActionListener(ActionListener listener)
MenuViewItem
listener
- the listener to removepublic void bind()
AbstractMenuHandler
bind
in interface ViewItem<JComponent>
bind
in class AbstractMenuHandler<M extends JMenuItem,SelectableDockAction>
public void unbind()
AbstractMenuHandler
unbind
in interface ViewItem<JComponent>
unbind
in class AbstractMenuHandler<M extends JMenuItem,SelectableDockAction>
protected abstract boolean allowChange(boolean newValue)
newValue
can be set through
the view or not.
newValue
- the new value for the element
true
if the value is accepted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |