|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.plaf.basic.BasicTransferable
com.jgraph.graph.GraphTransferable
An object that represents the clipboard contents for a graph selection. The object has three representations:
1. Richer: The cells, view attributes and connections for this selection are stored as separate datastructures, which can be inserted using the GraphModel.insert() method. 2. HTML: If one cell is selected, the userObject is returned as HTML. 3. Plain: The userObject of the selected cell is returned as plain text.
Field Summary | |
protected java.util.Map |
attributeMap
(Cell, Map) entries that hold the view attributes for the cells. |
protected java.awt.Rectangle |
bounds
Rectangle that defines the former bounds of the views. |
protected java.lang.Object[] |
cells
Selected cells. |
protected ConnectionSet |
cs
Object that describes the connection between cells. |
static java.awt.datatransfer.DataFlavor |
dataFlavor
Local Machine Reference Data Flavor. |
Constructor Summary | |
GraphTransferable(java.lang.Object[] cells,
ConnectionSet cs,
java.util.Map attrMap,
java.awt.Rectangle bounds)
Constructs a new transferable selection for cells ,
cs and attrMap . |
Method Summary | |
java.util.Map |
getAttributeMap()
Returns a map of (GraphCell, Map)-pairs that represent the view attributes for the respecive cells. |
java.awt.Rectangle |
getBounds()
|
java.lang.Object[] |
getCells()
Returns the cells that represent the selection. |
ConnectionSet |
getConnectionSet()
Returns the connections between cells (and possibly
other, unselected cells). |
java.lang.String |
getHTMLData()
Fetch the data in a text/html format. |
java.lang.String |
getPlainData()
Fetch the data in a text/plain format. |
java.lang.Object |
getRicherData(java.awt.datatransfer.DataFlavor flavor)
Fetch the data in a jvm-localreference format. |
java.awt.datatransfer.DataFlavor[] |
getRicherFlavors()
Returns the jvm-localreference flavors of the transferable. |
boolean |
isHTMLSupported()
Returns true if the transferable support a text/html format. |
boolean |
isPlainSupported()
Returns true if the transferable support a text/plain format. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clip,
java.awt.datatransfer.Transferable contents)
|
Methods inherited from class com.jgraph.plaf.basic.BasicTransferable |
getTransferData, getTransferDataFlavors, isDataFlavorSupported, isHTMLFlavor, isPlainFlavor, isRicherFlavor, isStringFlavor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.awt.datatransfer.DataFlavor dataFlavor
protected java.lang.Object[] cells
protected ConnectionSet cs
protected java.util.Map attributeMap
protected java.awt.Rectangle bounds
Constructor Detail |
public GraphTransferable(java.lang.Object[] cells, ConnectionSet cs, java.util.Map attrMap, java.awt.Rectangle bounds)
cells
,
cs
and attrMap
.
Method Detail |
public java.lang.Object[] getCells()
cells
that represent the selection.
public ConnectionSet getConnectionSet()
cells
(and possibly
other, unselected cells).
public java.util.Map getAttributeMap()
public java.awt.Rectangle getBounds()
public void lostOwnership(java.awt.datatransfer.Clipboard clip, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public java.awt.datatransfer.DataFlavor[] getRicherFlavors()
getRicherFlavors
in class BasicTransferable
public java.lang.Object getRicherData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException
getRicherData
in class BasicTransferable
java.awt.datatransfer.UnsupportedFlavorException
public boolean isPlainSupported()
isPlainSupported
in class BasicTransferable
public java.lang.String getPlainData()
getPlainData
in class BasicTransferable
public boolean isHTMLSupported()
isHTMLSupported
in class BasicTransferable
public java.lang.String getHTMLData()
getHTMLData
in class BasicTransferable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |