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

java.lang.Object
  extended by bibliothek.extension.gui.dock.preference.AbstractPreference<V>
      extended by bibliothek.extension.gui.dock.preference.DefaultPreference<String>
          extended by bibliothek.extension.gui.dock.preference.preferences.ChoiceDockPropertyPreference<V>
Type Parameters:
V - the kind of value to store into the properties
All Implemented Interfaces:
Preference<String>
Direct Known Subclasses:
BubbleColorSchemePreference, EclipseTabPreference, TabContentFilterPreference, TabPlacementPreference

public class ChoiceDockPropertyPreference<V>
extends DefaultPreference<String>

A preference that offers a choice and write the value into a DockProperties.

Author:
Benjamin Sigg

Constructor Summary
ChoiceDockPropertyPreference(DockProperties properties, PropertyKey<V> key, Path path, DefaultChoice<V> choice)
          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

ChoiceDockPropertyPreference

public ChoiceDockPropertyPreference(DockProperties properties,
                                    PropertyKey<V> key,
                                    Path path,
                                    DefaultChoice<V> choice)
Creates a new preference.

Parameters:
properties - the properties to read and write from
key - the key for the property that gets accessed
path - the unique identifier of this preference
choice - the available choices
Method Detail

write

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


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.