org.graffiti.plugin.tool
Class ToolPreferences

java.lang.Object
  extended by org.graffiti.plugin.tool.ToolPreferences

public class ToolPreferences
extends Object

The preferences of a Tool. Delegates to Preferences. Writes to the preferences tree are automatically flushed. If a Tool has been deleted, the changes are ignored.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner

Constructor Summary
ToolPreferences(Preferences preferences)
          Constructs a ToolPreferences object wrapping the specified preferences node.
 
Method Summary
(package private)  void delete()
          Is called when the tool, whose preferences are maintained by this object, is deleted.
 String get(String key, String def)
          See Preferences.get(String, String).
 boolean getBoolean(String key, boolean def)
          See Preferences.getBoolean(String, boolean).
 byte[] getByteArray(String key, byte[] def)
          See Preferences.getByteArray(String, byte[]).
 double getDouble(String key, double def)
          See Preferences.getDouble(String, double).
 float getFloat(String key, float def)
          See Preferences.getFloat(String, float).
 int getInt(String key, int def)
          See Preferences.getInt(String, int).
 long getLong(String key, long def)
          See Preferences.getLong(String, long).
 void put(String key, String value)
          See Preferences.put(String, String).
 void putBoolean(String key, boolean value)
          See Preferences.putBoolean(String, boolean).
 void putByteArray(String key, byte[] value)
          See Preferences.putByteArray(String, byte[]).
 void putDouble(String key, double value)
          See Preferences.putDouble(String, double).
 void putFloat(String key, float value)
          See Preferences.putFloat(String, float).
 void putInt(String key, int value)
          See Preferences.putInt(String, int).
 void putLong(String key, long value)
          See Preferences.putLong(String, long).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolPreferences

ToolPreferences(Preferences preferences)
Constructs a ToolPreferences object wrapping the specified preferences node.

Parameters:
preferences - the preferences node that stores the preferences of the tool.
Method Detail

put

public void put(String key,
                String value)
See Preferences.put(String, String).


putBoolean

public void putBoolean(String key,
                       boolean value)
See Preferences.putBoolean(String, boolean).


putByteArray

public void putByteArray(String key,
                         byte[] value)
See Preferences.putByteArray(String, byte[]).


putDouble

public void putDouble(String key,
                      double value)
See Preferences.putDouble(String, double).


putFloat

public void putFloat(String key,
                     float value)
See Preferences.putFloat(String, float).


putInt

public void putInt(String key,
                   int value)
See Preferences.putInt(String, int).


putLong

public void putLong(String key,
                    long value)
See Preferences.putLong(String, long).


delete

void delete()
Is called when the tool, whose preferences are maintained by this object, is deleted.


get

public String get(String key,
                  String def)
See Preferences.get(String, String).


getBoolean

public boolean getBoolean(String key,
                          boolean def)
See Preferences.getBoolean(String, boolean).


getByteArray

public byte[] getByteArray(String key,
                           byte[] def)
See Preferences.getByteArray(String, byte[]).


getDouble

public double getDouble(String key,
                        double def)
See Preferences.getDouble(String, double).


getFloat

public float getFloat(String key,
                      float def)
See Preferences.getFloat(String, float).


getInt

public int getInt(String key,
                  int def)
See Preferences.getInt(String, int).


getLong

public long getLong(String key,
                    long def)
See Preferences.getLong(String, long).



Generated at 2012-05-30 11:00:36 PM CEST