public class SubDropDownHandler extends Object implements DropDownViewItem
| Constructor and Description |
|---|
SubDropDownHandler(MenuViewItem<JComponent> view)
Creates a new handler.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public SubDropDownHandler(MenuViewItem<JComponent> view)
view - the item as it will appear in the menupublic void triggered()
DropDownViewItemtriggered in interface DropDownViewItempublic void setView(DropDownView view)
DropDownViewItemsetView in interface DropDownViewItemview - the view, might be nullpublic boolean isSelectable()
DropDownViewItemfalse.isSelectable in interface DropDownViewItempublic boolean isTriggerable(boolean selected)
DropDownViewItemisTriggerable 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)
MenuViewItemaddActionListener in interface MenuViewItem<JComponent>listener - the new listenerpublic void removeActionListener(ActionListener listener)
MenuViewItemremoveActionListener in interface MenuViewItem<JComponent>listener - the listener to removepublic void bind()
ViewItembind in interface ViewItem<JComponent>public DockAction getAction()
ViewItemgetAction in interface ViewItem<JComponent>nullpublic JComponent getItem()
ViewItemgetItem in interface ViewItem<JComponent>nullpublic void unbind()
ViewItemunbind in interface ViewItem<JComponent>Copyright © 2017 Docking Frames. All rights reserved.