public abstract class PluginPreferences<T extends Options> extends Object
Options based preferences
that are displayed in the Geneious Preferences dialog.
PluginPreferences are provided by a plugin via GeneiousPlugin.getPluginPreferences().| Modifier | Constructor and Description |
|---|---|
protected |
PluginPreferences() |
| Modifier and Type | Method and Description |
|---|---|
void |
addActiveOptionsChangedListener(SimpleListener listener)
Adds a listener to be notified when the options returned by
getActiveOptions() have changed. |
void |
applyDisplayableOptions(T options)
Applies the values of some options previously returned from
getDisplayableOptions()
so that these option values will be used in future calls to getActiveOptions(). |
protected abstract T |
createOptions()
Creates a new instance of the options.
|
T |
getActiveOptions()
Get the option values that should be used by any code that wishes to depend on these options.
|
T |
getDisplayableOptions()
Get some options that can be displayed in user preferences.
|
Icon |
getTabIcon()
Get an icon displayed next to the name returned from
getTabName(). |
abstract String |
getTabName()
Get the name displayed in the heading of the tab for these options in the preferences pane.
|
void |
removeActiveOptionsChangedListener(SimpleListener listener)
Removes a listener previously added using
addActiveOptionsChangedListener(org.virion.jam.util.SimpleListener) |
protected abstract T createOptions()
Options.Option.setAdvanced(boolean) are not supported
by PluginPrefernces.public abstract String getTabName()
public Icon getTabIcon()
getTabName().
The default implementation returns null.getTabName() or null to display no icon.public final T getActiveOptions()
public final T getDisplayableOptions()
getActiveOptions().
This method implemenation creates a new instance of options every time it is invoked.public final void applyDisplayableOptions(T options)
getDisplayableOptions()
so that these option values will be used in future calls to getActiveOptions().options - the option values to apply.public void addActiveOptionsChangedListener(SimpleListener listener)
getActiveOptions() have changed.listener - the listener to be notifiedpublic void removeActiveOptionsChangedListener(SimpleListener listener)
addActiveOptionsChangedListener(org.virion.jam.util.SimpleListener)listener - the listener previously passed to addActiveOptionsChangedListener(org.virion.jam.util.SimpleListener)