Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.graphic.toolkit
Class TransferableGraphic  view TransferableGraphic download TransferableGraphic.java

java.lang.Object
  extended byjpicedt.graphic.toolkit.TransferableGraphic
All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner, java.awt.datatransfer.Transferable

public class TransferableGraphic
extends java.lang.Object
implements java.awt.datatransfer.Transferable, java.awt.datatransfer.ClipboardOwner

Wrapper for Element's that can be transfered to/from a Clipboard. Contrary to a BranchElement implementation : - this object stores a reference to a CLONE of the Element(s) of interest, not to the Element(s) itself (this allow the source Element to be further modified w/o affecting the content of this TransferableGraphic, which is necessary for proper ClipBoard behaviour) - As a result, Element's added to this TransferableGraphic have no parent, no view,...


Field Summary
private  jpicedt.graphic.model.Element[] content
           
private  java.lang.String formatted
           
static java.awt.datatransfer.DataFlavor JPICEDT_DATA_FLAVOR
          the DataFlavor for Element's
 
Constructor Summary
TransferableGraphic(jpicedt.graphic.model.Element[] elements, java.lang.String formatted)
          Construct a new TransferableGraphic from a clone of the given elements and the given String containing the formatted representation of the elements (this depends on the ContentType of of the caller).
 
Method Summary
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
          Returns the data in the specified DataFlavor.
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          This method returns a list of available data flavors for the data being transferred.
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
          Tests whether or not this data can be delivered in the specified data flavor.
 void lostOwnership(java.awt.datatransfer.Clipboard c, java.awt.datatransfer.Transferable contents)
          Notifies this object that it is no longer the owner of the content of the clipboard This implementation does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JPICEDT_DATA_FLAVOR

public static final java.awt.datatransfer.DataFlavor JPICEDT_DATA_FLAVOR
the DataFlavor for Element's


content

private jpicedt.graphic.model.Element[] content

formatted

private java.lang.String formatted
Constructor Detail

TransferableGraphic

public TransferableGraphic(jpicedt.graphic.model.Element[] elements,
                           java.lang.String formatted)
Construct a new TransferableGraphic from a clone of the given elements and the given String containing the formatted representation of the elements (this depends on the ContentType of of the caller).

Since:
jPicEdt 1.3.2
Method Detail

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
Description copied from interface: java.awt.datatransfer.Transferable
Returns the data in the specified DataFlavor.

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Since:
jPicEdt 1.3.2

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Description copied from interface: java.awt.datatransfer.Transferable
This method returns a list of available data flavors for the data being transferred. The array returned will be sorted from most preferred flavor at the beginning to least preferred at the end.

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Since:
jPicEdt 1.3.2

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Description copied from interface: java.awt.datatransfer.Transferable
Tests whether or not this data can be delivered in the specified data flavor.

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Since:
jPicEdt 1.3.2

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard c,
                          java.awt.datatransfer.Transferable contents)
Notifies this object that it is no longer the owner of the content of the clipboard This implementation does nothing.

Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
Since:
jPicEdt 1.3.2