com.levigo.jadice.document.flavor
Class AbstractJadiceLocalDataFlavor

java.lang.Object
  extended by java.awt.datatransfer.DataFlavor
      extended by com.levigo.jadice.document.flavor.AbstractJadiceLocalDataFlavor
All Implemented Interfaces:
Externalizable, Serializable, Cloneable
Direct Known Subclasses:
JVMLocalDataFlavor, ReorderDataFlavor

public abstract class AbstractJadiceLocalDataFlavor
extends DataFlavor

A DataFlavor which is used for the transfer of Pages within jadice on the same JVM, e.g. via Drag & Drop. This flavor keeps track from which Document it was created so that the receiving side of can decide if it will support this flavor or not.

See Also:
isFromSameDocument(DataFlavor, Document), Serialized Form

Field Summary
 
Fields inherited from class java.awt.datatransfer.DataFlavor
imageFlavor, javaFileListFlavor, javaJVMLocalObjectMimeType, javaRemoteObjectMimeType, javaSerializedObjectMimeType, plainTextFlavor, stringFlavor
 
Constructor Summary
AbstractJadiceLocalDataFlavor(Document document)
          Construct a DataFlavor where the given document acts as the source
 
Method Summary
 boolean equals(DataFlavor that)
           
 int hashCode()
           
static boolean isFromSameDocument(DataFlavor flavor, Document document)
          Check whether the given Document is the source of the given DataFlavor.
 
Methods inherited from class java.awt.datatransfer.DataFlavor
clone, equals, equals, getDefaultRepresentationClass, getDefaultRepresentationClassAsString, getHumanPresentableName, getMimeType, getParameter, getPrimaryType, getReaderForText, getRepresentationClass, getSubType, getTextPlainUnicodeFlavor, isFlavorJavaFileListType, isFlavorRemoteObjectType, isFlavorSerializedObjectType, isFlavorTextType, isMimeTypeEqual, isMimeTypeEqual, isMimeTypeSerializedObject, isRepresentationClassByteBuffer, isRepresentationClassCharBuffer, isRepresentationClassInputStream, isRepresentationClassReader, isRepresentationClassRemote, isRepresentationClassSerializable, match, normalizeMimeType, normalizeMimeTypeParameter, readExternal, selectBestTextFlavor, setHumanPresentableName, toString, tryToLoadClass, writeExternal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractJadiceLocalDataFlavor

public AbstractJadiceLocalDataFlavor(Document document)
                              throws ClassNotFoundException
Construct a DataFlavor where the given document acts as the source

Parameters:
document - the Document for which to construct the flavor, must not be null
Throws:
ClassNotFoundException - not used, but declared due to the super constructor in class DataFlavor
Method Detail

equals

public boolean equals(DataFlavor that)
Overrides:
equals in class DataFlavor

hashCode

public int hashCode()
Overrides:
hashCode in class DataFlavor

isFromSameDocument

public static boolean isFromSameDocument(DataFlavor flavor,
                                         Document document)
Check whether the given Document is the source of the given DataFlavor.

Parameters:
flavor - the DataFlavor to check, must not be null.
document - the Document to check, must not be null.
Returns:
true iff the given flavor is a AbstractJadiceLocalDataFlavor and its source is the given Document.


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.