|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectecologylab.generic.Debug
ecologylab.xml.ElementState
ecologylab.appframework.types.prefs.MetaPref<T>
public abstract class MetaPref<T>
Metadata about a Preference. Defines information to enable editing the Preference.
| Nested Class Summary |
|---|
| Field Summary |
|---|
| Fields inherited from class ecologylab.xml.ElementState |
|---|
CDATA, NORMAL, UTF16, UTF16_LE, UTF8 |
| Fields inherited from interface ecologylab.appframework.types.prefs.WidgetTypes |
|---|
CHECK_BOX, COLOR_CHOOSER, DROP_DOWN, FILE_CHOOSER, RADIO_BUTTONS, SLIDER, SPINNER, TEXT_AREA, TEXT_FIELD |
| Fields inherited from interface ecologylab.xml.XMLTranslationExceptionTypes |
|---|
FILE_NOT_FOUND, IO_EXCEPTION, NULL_PURL, UNKNOWN |
| Constructor Summary | |
|---|---|
MetaPref(ScalarType scalarType)
Instantiate. |
|
| Method Summary | |
|---|---|
Pref<T> |
getAssociatedPref()
Get the Pref object associated with this. |
java.lang.String |
getCategory()
Gets the category for a MetaPref. |
Choice<T> |
getChoiceByIndex(int index)
Get the Choice at the given index. |
Choice<T> |
getChoiceByValue(java.lang.String value)
Get a Choice from the list of choices, whose value matches the value passed in. |
java.lang.String |
getChoiceNameByIndex(int index)
Get Choice's name, for the choice at the given index. |
java.lang.String |
getChoiceNameByValue(java.lang.String value)
Get Choice's name, for a choice whose value that matches the given value. |
java.util.ArrayList<Choice<T>> |
getChoices()
Gets the Choices of a MetaPref. |
Pref<T> |
getDefaultPrefInstance()
Construct a new instance of the Pref that matches this. |
abstract T |
getDefaultValue()
Gets the default value of a MetaPref; type-specific behavior. |
java.lang.String |
getDescription()
Gets the description for a MetaPref. |
java.lang.String |
getHelpText()
Gets the help text for a MetaPref. |
java.lang.String |
getID()
Gets the ID of a MetaPref. |
int |
getIndexByChoice(Choice<T> choice)
Get the index of a given Choice. |
int |
getIndexByValue(java.lang.String value)
Get the index of a Choice with the given value. |
T |
getInstance(java.lang.String string)
Create an instance of our associated type, from a String. |
T |
getInstance(T value)
|
abstract T |
getMaxValue()
Gets the max value of the range of a MetaPref. |
abstract T |
getMinValue()
Gets the min value of the range of a MetaPref. |
ValueChangedListener |
getValueChangedListener()
|
boolean |
hasChoices()
Returns true if the metaPref has choices. |
static MetaPref |
lookup(java.lang.String id)
Look up a MetaPref by name in the map of all MetaPrefs |
void |
print()
Gives printed output showing id, description, category, helpText, widget, default value, and choices for a MetaPref. |
static void |
setValueChangedListener(java.lang.String metaPrefId,
ValueChangedListener valueChangedListener)
Set object that receives a callback when the value of a Pref is changed through the PrefsEditor. |
void |
setValueChangedListener(ValueChangedListener valueChangedListener)
Set object that receives a callback when the value of a Pref is changed through the PrefsEditor. |
boolean |
widgetIsCheckBox()
Returns whether or not a widget uses check boxes. |
boolean |
widgetIsColorChooser()
Returns whether or not a widget uses a color chooser. |
boolean |
widgetIsDropDown()
Returns whether or not a widget uses a drop down menu. |
boolean |
widgetIsFileChooser()
Returns whether or not a widget uses a file chooser. |
boolean |
widgetIsRadio()
Returns whether or not a widget uses radio buttons. |
boolean |
widgetIsSlider()
Returns whether or not a widget uses a slider. |
boolean |
widgetIsSpinner()
Returns whether or not a widget uses a spinner. |
boolean |
widgetIsTextField()
Returns whether or not a widget uses one or more text fields. |
| Methods inherited from class ecologylab.generic.Debug |
|---|
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MetaPref(ScalarType scalarType)
scalarType - TODO| Method Detail |
|---|
public abstract T getDefaultValue()
public abstract T getMinValue()
public abstract T getMaxValue()
public java.lang.String getCategory()
public java.lang.String getDescription()
public java.lang.String getHelpText()
public java.lang.String getID()
public java.util.ArrayList<Choice<T>> getChoices()
public boolean hasChoices()
public Choice<T> getChoiceByValue(java.lang.String value)
value - Value to find
public java.lang.String getChoiceNameByValue(java.lang.String value)
value -
public java.lang.String getChoiceNameByIndex(int index)
index -
public Choice<T> getChoiceByIndex(int index)
index -
public int getIndexByChoice(Choice<T> choice)
choice - Given choice
public int getIndexByValue(java.lang.String value)
value -
public void print()
public boolean widgetIsRadio()
public boolean widgetIsSlider()
public boolean widgetIsSpinner()
public boolean widgetIsTextField()
public boolean widgetIsCheckBox()
public boolean widgetIsDropDown()
public boolean widgetIsColorChooser()
public boolean widgetIsFileChooser()
public T getInstance(java.lang.String string)
string -
public T getInstance(T value)
public Pref<T> getDefaultPrefInstance()
public Pref<T> getAssociatedPref()
public void setValueChangedListener(ValueChangedListener valueChangedListener)
valueChangedListener -
public static void setValueChangedListener(java.lang.String metaPrefId,
ValueChangedListener valueChangedListener)
valueChangedListener - public static MetaPref lookup(java.lang.String id)
id - Name of MetaPref
public ValueChangedListener getValueChangedListener()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||