|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.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 menu| Method Detail |
|---|
public void triggered()
DropDownViewItem
triggered in interface DropDownViewItempublic void setView(DropDownView view)
DropDownViewItem
setView in interface DropDownViewItemview - the view, might be nullpublic boolean isSelectable()
DropDownViewItemfalse.
isSelectable in interface DropDownViewItempublic boolean isTriggerable(boolean selected)
DropDownViewItem
isTriggerable in interface DropDownViewItemselected - 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>nullpublic JComponent getItem()
ViewItem
getItem in interface ViewItem<JComponent>nullpublic void unbind()
ViewItem
unbind in interface ViewItem<JComponent>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||