|
Preferences Editor | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.jppietsch.prefedit.AbstractTransferable
A convenient base class for simple transferables which support only two data flavors for strings and objects local to a virtual machine.
| Constructor Summary | |
AbstractTransferable()
|
|
| Method Summary | |
void |
copy()
Puts this transferable to the system clipboard. |
void |
cut()
May be overwritten to remove this from somewhere. |
protected abstract void |
doPaste(Preferences somePreferences)
Adds this transferable to the given preferences. |
protected DataFlavor |
flavor()
Creates a special data flavor for this object. |
Object |
getTransferData(DataFlavor aFlavor)
Returns this object or a string representation of it. |
DataFlavor[] |
getTransferDataFlavors()
Returns an array of data flavors for this transferable. |
protected abstract String |
humanPresentableClassName()
Returns a human presentable name for this class. |
boolean |
isDataFlavorSupported(DataFlavor aFlavor)
Does this transferable support a given data flavor? |
static void |
paste(Preferences somePreferences)
Takes an instance of this class from the system clipboard. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractTransferable()
| Method Detail |
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor aFlavor)
isDataFlavorSupported in interface TransferableaFlavor - which is requested.
aFlavor.
public Object getTransferData(DataFlavor aFlavor)
throws UnsupportedFlavorException
getTransferData in interface TransferableaFlavor - how the result should taste.
UnsupportedFlavorExceptionpublic void copy()
public void cut()
copy().
public static void paste(Preferences somePreferences)
throws UnsupportedFlavorException,
IOException
somePreferences - is given to doPaste(Preferences).
UnsupportedFlavorException - If the clipboard contains something
else but not an
AbstractTransferable.
IOExceptionprotected DataFlavor flavor()
protected abstract String humanPresentableClassName()
flavor().
protected abstract void doPaste(Preferences somePreferences)
somePreferences - to which this is added.
|
Preferences Editor | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||