bibliothek.extension.gui.dock.preference.preferences.choice
Interface Choice

All Known Implementing Classes:
BubbleColorSchemeChoice, ButtonContentChoice, DefaultChoice, EclipseTabChoice, TabContentFilterChoice, TabPlacementChoice, ThemeChoice

public interface Choice

A choice is a set of entries from which the user can choose one. Note that some components assume that a Choice is immutable.

Author:
Benjamin Sigg

Method Summary
 String getDefaultChoice()
          Gets the standard choice.
 String getId(int index)
          Gets a unique identifier for the index'th choice.
 String getText(int index)
          Gets a name for the index'th choice.
 boolean isNullEntryAllowed()
          Tells whether the user choose nothing.
 int size()
          Gets the number of available choices.
 

Method Detail

size

int size()
Gets the number of available choices.

Returns:
the number of choices

getText

String getText(int index)
Gets a name for the index'th choice.

Parameters:
index - the index of the choice
Returns:
the name of that choice, should be human readable

getId

String getId(int index)
Gets a unique identifier for the index'th choice.

Parameters:
index - the index of the choice
Returns:
the unique identifier

getDefaultChoice

String getDefaultChoice()
Gets the standard choice.

Returns:
the identifier of the standard choice, null is only allowed if isNullEntryAllowed() returns true

isNullEntryAllowed

boolean isNullEntryAllowed()
Tells whether the user choose nothing.

Returns:
whether the user can choose the null identifier