|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.themes.basic.action.dropdown.SubDropDownHandler
public class SubDropDownHandler
A handler that connects non-selectable, non-triggerable items with a drop-down-button.
Constructor Summary | |
---|---|
SubDropDownHandler(MenuViewItem<JComponent> view)
Creates a new handler. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener listener)
Adds a listener which will be called if this view is triggered. |
void |
bind()
Binds this item to its action |
DockAction |
getAction()
Gets the action that is represented by this target. |
JComponent |
getItem()
Gets this item as component. |
boolean |
isSelectable()
Tells whether this item can be selected by the button. |
boolean |
isTriggerable(boolean selected)
Tells whether the item can be triggered if it is on the button or in the menu. |
void |
removeActionListener(ActionListener listener)
Removes a listener from this view. |
void |
setView(DropDownView view)
Sends the current settings of this item to the view. |
void |
triggered()
Invoked if the item is triggered from outside. |
void |
unbind()
Unbinds this item from its action |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubDropDownHandler(MenuViewItem<JComponent> view)
view
- the item as it will appear in the menuMethod Detail |
---|
public void triggered()
DropDownViewItem
triggered
in interface DropDownViewItem
public void setView(DropDownView view)
DropDownViewItem
setView
in interface DropDownViewItem
view
- the view, might be null
public boolean isSelectable()
DropDownViewItem
false
.
isSelectable
in interface DropDownViewItem
public boolean isTriggerable(boolean selected)
DropDownViewItem
isTriggerable
in interface DropDownViewItem
selected
- if true
, then this item is currently shown
directly on the main button, otherwise it is in the drop-down menu.
true
if the item can be triggeredpublic void addActionListener(ActionListener listener)
MenuViewItem
addActionListener
in interface MenuViewItem<JComponent>
listener
- the new listenerpublic void removeActionListener(ActionListener listener)
MenuViewItem
removeActionListener
in interface MenuViewItem<JComponent>
listener
- the listener to removepublic void bind()
ViewItem
bind
in interface ViewItem<JComponent>
public DockAction getAction()
ViewItem
getAction
in interface ViewItem<JComponent>
null
public JComponent getItem()
ViewItem
getItem
in interface ViewItem<JComponent>
public void unbind()
ViewItem
unbind
in interface ViewItem<JComponent>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |