public abstract class Option<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Config<T> |
config |
protected T |
defaultValue |
| Modifier | Constructor and Description |
|---|---|
protected |
Option(OptionCategory category,
java.lang.String fieldName,
java.lang.String label,
T defaultValue)
Parent for all options.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
OptionCategory |
getCategory() |
T |
getDefaultValue() |
java.lang.String |
getFieldName() |
java.lang.String |
getLabel() |
int |
getSortOrder() |
void |
set(T value) |
Option<T> |
setSortOrder(int sortOrder)
Used for sorting in the options pane.
|
protected Option(OptionCategory category, java.lang.String fieldName, java.lang.String label, T defaultValue)
category - - The category.fieldName - - The field name.label - - the label, can be the display string or i18n key.defaultValue - - the default value.public OptionCategory getCategory()
public java.lang.String getFieldName()
public java.lang.String getLabel()
public T get()
public void set(T value)
public T getDefaultValue()
public int getSortOrder()