Preferences Editor

de.jppietsch.prefedit
Class Preference

java.lang.Object
  extended byde.jppietsch.prefedit.AbstractTransferable
      extended byde.jppietsch.prefedit.Preference
All Implemented Interfaces:
Transferable

public class Preference
extends AbstractTransferable

An immutable key/value pair which may be placed in the clipboard.

Version:
$Revision: 1.2 $
Author:
Jan-Peter Pietsch

Constructor Summary
Preference(Preferences somePreferences, String aKey)
          Constructs this Preference from a given preferences node and key.
 
Method Summary
 void cut()
          Copies this preference to the system clipboard and removes it from the preferences node.
protected  void doPaste(Preferences somePreferences)
          Adds this transferable to the given preferences.
protected  String humanPresentableClassName()
          Returns a human presentable name for this class.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class de.jppietsch.prefedit.AbstractTransferable
copy, flavor, getTransferData, getTransferDataFlavors, isDataFlavorSupported, paste
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Preference

public Preference(Preferences somePreferences,
                  String aKey)
Constructs this Preference from a given preferences node and key.

Parameters:
somePreferences - the preferences node.
aKey - the value's key.
Method Detail

toString

public String toString()
Returns a string representation of this object.

Returns:
A string representation of this object.

cut

public void cut()
Copies this preference to the system clipboard and removes it from the preferences node.

Overrides:
cut in class AbstractTransferable

humanPresentableClassName

protected String humanPresentableClassName()
Returns a human presentable name for this class.

Specified by:
humanPresentableClassName in class AbstractTransferable
Returns:
A human presentable name for the concrete class.

doPaste

protected void doPaste(Preferences somePreferences)
Adds this transferable to the given preferences.

Specified by:
doPaste in class AbstractTransferable
Parameters:
somePreferences - to which this is added.

Preferences Editor