|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object yext.export.datatransfer.VisualTransferable
public class VisualTransferable
A transferable implementation for transferring a Graph2DView
's
contents EMF representation. This transferable can be used to copy a graph
to the System Clipboard for convenient transfer to applications which can
display EMF content.
For example, on Windows an EMF depicting a graph can be easily
imported into Word using this approach.
Additionally, DataFlavor.imageFlavor
is
supported to retrieve the transfer data as a Image
object.
Optionally, several additional fallback data formats are provided for EMF
unaware use cases. To use these fallback data formats property
fallbackFlavorsEnabled
has to be set to true
by using the two argument constructor
VisualTransferable(y.view.Graph2DView, boolean)
appropriately.
The available fallback data formats depend on the version of the Java Runtime
Environment used.
Method getTransferDataFlavors()
should be used to check for
supported data formats in this case.
Field Summary | |
---|---|
static DataFlavor |
emfFlavor
The DataFlavor representing a EMF Image, where:
mimeType = "image/x-emf"
|
Constructor Summary | |
---|---|
VisualTransferable(Graph2DView view)
Constructs a new VisualTransferable for the given view. |
|
VisualTransferable(Graph2DView view,
boolean fallbackFlavorsEnabled)
Constructs a new VisualTransferable for the given view. |
Method Summary | |
---|---|
void |
addRenderingHint(RenderingHints.Key key,
Object value)
Adds a rendering hint key-value-pair, that is passed to the underlying rendering subsystem. |
Object |
getTransferData(DataFlavor dataFlavor)
|
DataFlavor[] |
getTransferDataFlavors()
|
boolean |
isDataFlavorSupported(DataFlavor dataFlavor)
|
boolean |
isFallbackFlavorsEnabled()
Returns true iff this transferable is configured to
support several image based data flavors for EMF unaware use cases. |
void |
lostOwnership(Clipboard clipboard,
Transferable transferable)
|
void |
removeRenderingHint(RenderingHints.Key key)
Removes a rendering hint key-value-pair, so that it is no longer passed to the underlying rendering subsystem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DataFlavor emfFlavor
DataFlavor
representing a EMF Image, where:
mimeType = "image/x-emf"
Constructor Detail |
---|
public VisualTransferable(Graph2DView view)
VisualTransferable
for the given view.
view
- the Graph2DView
whose visible
rectangle is to be represented as transfer
datapublic VisualTransferable(Graph2DView view, boolean fallbackFlavorsEnabled)
VisualTransferable
for the given view.
view
- the Graph2DView
whose visible
rectangle is to be represented as transfer
datafallbackFlavorsEnabled
- if true
, additional image
based data flavors are supported for EMF
unaware use cases.Method Detail |
---|
public Object getTransferData(DataFlavor dataFlavor) throws UnsupportedFlavorException, IOException
getTransferData
in interface Transferable
UnsupportedFlavorException
IOException
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
public boolean isDataFlavorSupported(DataFlavor dataFlavor)
isDataFlavorSupported
in interface Transferable
public void lostOwnership(Clipboard clipboard, Transferable transferable)
lostOwnership
in interface ClipboardOwner
public boolean isFallbackFlavorsEnabled()
true
iff this transferable is configured to
support several image based data flavors for EMF unaware use cases.
The available fallback data flavors depend on the version of the Java
Runtime Environment used.
Method getTransferDataFlavors()
should be used to check for
supported data flavors.
true
iff this transferable is configured to
support several image based DataFlavor
s for EMF unaware
use cases.public void addRenderingHint(RenderingHints.Key key, Object value)
key
- the key of the hint to be setvalue
- the value indicating preferences for the specified hint
categorypublic void removeRenderingHint(RenderingHints.Key key)
key
- the key of the hint to be remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |