bibliothek.gui.dock.themes.basic.action.dropdown
Interface DropDownViewItem

All Superinterfaces:
MenuViewItem<javax.swing.JComponent>, ViewItem<javax.swing.JComponent>
All Known Implementing Classes:
AbstractDropDownHandler, ButtonDropDownHandler, SelectableDropDownHandler, SelectableDropDownHandler.Check, SelectableDropDownHandler.Radio, SubDropDownHandler

public interface DropDownViewItem
extends MenuViewItem<javax.swing.JComponent>

An item that is shown in the menu of a drop-down-button and can be selected by the button.

Author:
Benjamin Sigg

Method Summary
 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 setView(DropDownView view)
          Sends the current settings of this item to the view.
 void triggered()
          Invoked if the item is triggered from outside.
 
Methods inherited from interface bibliothek.gui.dock.themes.basic.action.menu.MenuViewItem
addActionListener, removeActionListener
 
Methods inherited from interface bibliothek.gui.dock.action.view.ViewItem
bind, getAction, getItem, unbind
 

Method Detail

triggered

void triggered()
Invoked if the item is triggered from outside. The item should call the method of its action, that causes the action to execute its natural code (for example: a checkbox may change their selected-state).


setView

void setView(DropDownView view)
Sends the current settings of this item to the view. The values can be changed as long as the view is registered.

Parameters:
view - the view, might be null

isSelectable

boolean isSelectable()
Tells whether this item can be selected by the button. The selected item is shown directly on the button. Special items like a separator should return false.

Returns:
whether the item can be selected

isTriggerable

boolean isTriggerable(boolean selected)
Tells whether the item can be triggered if it is on the button or in the menu.

Parameters:
selected - whether the item is selected or in the menu
Returns:
true if the item can be triggered