bibliothek.gui.dock.action.dropdown
Interface DropDownView

All Known Implementing Classes:
AbstractDropDownFilter, BasicDropDownButtonHandler.ButtonView, BasicDropDownButtonHandler.SelectionView, DefaultDropDownFilter, DropDownFilter

public interface DropDownView

A connection between an drop-down-item and a view. Clients should use instances of this interface as if they access a button.

Author:
Benjamin Sigg

Method Summary
 void clearIcons()
          Clears all Icons, any field pointing to an Icon is set to null
 ActionContentModifier[] getIconContexts()
          Gets the ActionContentModifiers for which setIcon(ActionContentModifier, Icon) was called with a value other than null.
 void setDockableRepresentation(Dockable dockable)
          Sets the Dockable which is represented by the view.
 void setEnabled(boolean enabled)
          Sets the enabled-state of the button.
 void setIcon(ActionContentModifier modifier, Icon icon)
          Sets the icon of the button.
 void setSelected(boolean selected)
          Sets the selected-state of the button.
 void setText(String text)
          Sets the text of the button.
 void setTooltip(String tooltip)
          Sets the tooltip of the button.
 

Method Detail

setText

void setText(String text)
Sets the text of the button.

Parameters:
text - the text

setTooltip

void setTooltip(String tooltip)
Sets the tooltip of the button.

Parameters:
tooltip - the tooltip

setIcon

void setIcon(ActionContentModifier modifier,
             Icon icon)
Sets the icon of the button.

Parameters:
modifier - the context in which the icon is used, not null
icon - the icon

getIconContexts

ActionContentModifier[] getIconContexts()
Gets the ActionContentModifiers for which setIcon(ActionContentModifier, Icon) was called with a value other than null.

Returns:
the icons that were set

clearIcons

void clearIcons()
Clears all Icons, any field pointing to an Icon is set to null


setEnabled

void setEnabled(boolean enabled)
Sets the enabled-state of the button.

Parameters:
enabled - the state

setSelected

void setSelected(boolean selected)
Sets the selected-state of the button.

Parameters:
selected - the state

setDockableRepresentation

void setDockableRepresentation(Dockable dockable)
Sets the Dockable which is represented by the view.

Parameters:
dockable - the represented element, can be null