org.argouml.uml.reveng
Interface SettingsTypes.UniqueSelection

All Superinterfaces:
SettingsTypes.Setting
All Known Subinterfaces:
SettingsTypes.UniqueSelection2
All Known Implementing Classes:
Setting.UniqueSelection
Enclosing interface:
SettingsTypes

public static interface SettingsTypes.UniqueSelection
extends SettingsTypes.Setting

A generic type that has multiple options, from all these options the user can choose only one option (the selected option).

There can be a default pre-selected option.


Field Summary
static int UNDEFINED_SELECTION
          Selection is undefined.
 
Method Summary
 int getDefaultSelection()
          This is the default selected option, if the user doesn't choose other option then this will be the selected option.
 java.util.List<java.lang.String> getOptions()
          Returns the available options from which the user can pick one.
 int getSelection()
           
 boolean setSelection(int selection)
          This is how the user can choose an option.
 
Methods inherited from interface org.argouml.uml.reveng.SettingsTypes.Setting
getLabel
 

Field Detail

UNDEFINED_SELECTION

static final int UNDEFINED_SELECTION
Selection is undefined.

See Also:
Constant Field Values
Method Detail

getOptions

java.util.List<java.lang.String> getOptions()
Returns the available options from which the user can pick one.

Returns:
a list with Strings that identifies the options

getDefaultSelection

int getDefaultSelection()
This is the default selected option, if the user doesn't choose other option then this will be the selected option.

Returns:
the 0 based index of the default option as is in the list returned by getOptions() or UNDEFINED_SELECTION if there is no default option

setSelection

boolean setSelection(int selection)
This is how the user can choose an option.

Parameters:
selection - the 0 based index of the default option as is in the list returned by getOptions()
Returns:
true if was successful or false if the selection is out of bounds

getSelection

int getSelection()
Returns:
the current selection


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook