public abstract class DefaultPreferenceSetting extends java.lang.Object implements PreferenceSetting
PreferenceSetting
implementations.
Handles the flag that indicates if a PreferenceSetting is and expert option or not.Modifier and Type | Field and Description |
---|---|
private boolean |
isExpert |
Constructor and Description |
---|
DefaultPreferenceSetting()
Constructs a new DefaultPreferenceSetting.
|
DefaultPreferenceSetting(boolean isExpert)
Constructs a new DefaultPreferenceSetting.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isExpert()
Called to know if the preferences tab has only to be displayed in expert mode.
|
protected static void |
saveBoolean(java.lang.String prefName,
javax.swing.JCheckBox cb)
Saves state from a
JCheckBox to a boolean preference. |
protected static void |
saveDouble(java.lang.String prefName,
javax.swing.JTextField tf)
Saves text from a
JTextField to a double preference. |
protected static void |
saveInt(java.lang.String prefName,
javax.swing.JTextField tf)
Saves text from a
JTextField to an integer preference. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addGui, ok
private final boolean isExpert
public DefaultPreferenceSetting()
public DefaultPreferenceSetting(boolean isExpert)
isExpert
- true, if it is an expert optionpublic boolean isExpert()
PreferenceSetting
isExpert
in interface PreferenceSetting
protected static void saveBoolean(java.lang.String prefName, javax.swing.JCheckBox cb)
JCheckBox
to a boolean preference.prefName
- preference namecb
- check boxprotected static void saveDouble(java.lang.String prefName, javax.swing.JTextField tf)
JTextField
to a double preference.prefName
- preference nametf
- text fieldprotected static void saveInt(java.lang.String prefName, javax.swing.JTextField tf)
JTextField
to an integer preference.prefName
- preference nametf
- text field