bibliothek.extension.gui.dock.preference.preferences
Class DockPropertyPreference<V>

java.lang.Object
  extended by bibliothek.extension.gui.dock.preference.AbstractPreference<V>
      extended by bibliothek.extension.gui.dock.preference.DefaultPreference<V>
          extended by bibliothek.extension.gui.dock.preference.preferences.DockPropertyPreference<V>
Type Parameters:
V - the kind of value this preference uses
All Implemented Interfaces:
Preference<V>
Direct Known Subclasses:
EclipseIconPreference, KeyStrokeClosePreference, KeyStrokeExternalizePreference, KeyStrokeHidePreference, KeyStrokeInitSelectorPreference, KeyStrokeMaximizeChangePreference, KeyStrokeMaximizePreference, KeyStrokeMaximizePreference, KeyStrokeMinimizePreference, KeyStrokeNormalizePreference, ModifierMaskNoCombinationPreference, ModifierMaskScreenOnlyPreference

public class DockPropertyPreference<V>
extends DefaultPreference<V>

A Preference that can read and write its value from a DockProperties.

Author:
Benjamin Sigg

Constructor Summary
DockPropertyPreference(DockProperties properties, PropertyKey<V> key, Path type, Path path)
          Creates a new preference.
DockPropertyPreference(DockProperties properties, PropertyKey<V> key, java.lang.String label, Path type, Path path)
          Creates a new preference.
DockPropertyPreference(java.lang.String prefix, DockProperties properties, PropertyKey<V> key, V defaultValue, Path type, Path path)
          Creates a new preference.
 
Method Summary
 void read()
          Uses an unknown source to reload this preference.
 void write()
          Stores the contents of this preference at the location where it will be used.
 
Methods inherited from class bibliothek.extension.gui.dock.preference.DefaultPreference
addPreferenceListener, doOperation, getDefaultValue, getDescription, getLabel, getOperations, getPath, getTypePath, getValue, getValueInfo, isEnabled, isNatural, removePreferenceListener, setDefaultValue, setDescription, setDescriptionId, setLabel, setLabelId, setModel, setNatural, setValue, setValueInfo
 
Methods inherited from class bibliothek.extension.gui.dock.preference.AbstractPreference
fireChanged, hasListeners, listeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DockPropertyPreference

public DockPropertyPreference(DockProperties properties,
                              PropertyKey<V> key,
                              Path type,
                              Path path)
Creates a new preference.

Parameters:
properties - the properties from which this preference reads its values and to which it writes its values
key - the key of the value this preference reads from a DockProperties.
type - the type of values used in this preference
path - the unique path of this preference

DockPropertyPreference

public DockPropertyPreference(DockProperties properties,
                              PropertyKey<V> key,
                              java.lang.String label,
                              Path type,
                              Path path)
Creates a new preference.

Parameters:
properties - the properties from which this preference reads its values and to which it writes its values
key - the key of the value this preference reads from a DockProperties.
label - the text associated with this preference
type - the type of values used in this preference
path - the unique path of this preference

DockPropertyPreference

public DockPropertyPreference(java.lang.String prefix,
                              DockProperties properties,
                              PropertyKey<V> key,
                              V defaultValue,
                              Path type,
                              Path path)
Creates a new preference.

Parameters:
prefix - the prefix of the key used for the TextManager. The strings ".label" and ".description" will be added to prefix in order to generate two keys.
properties - the properties from which this preference reads its values and to which it writes its values
key - the key of the value this preference reads from a DockProperties.
defaultValue - the initial value of this preference
type - the type of values used in this preference
path - the unique path of this preference
Method Detail

read

public void read()
Description copied from interface: Preference
Uses an unknown source to reload this preference. If the underlying resource cannot be interpreted, or contains an invalid value, then this Preference should not change its value.


write

public void write()
Description copied from interface: Preference
Stores the contents of this preference at the location where it will be used.