Documentation of 'org.jgraph.graph.GraphTransferable' Java class
GraphTransferable
org.jgraph.graph

Class GraphTransferable

  • All Implemented Interfaces:
    java.awt.datatransfer.ClipboardOwner, java.awt.datatransfer.Transferable, java.io.Serializable, javax.swing.plaf.UIResource


    public class GraphTransferable
    extends BasicGraphTransferable
    implements java.io.Serializable, java.awt.datatransfer.ClipboardOwner
    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.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.awt.datatransfer.DataFlavor dataFlavor
      Local Machine Reference Data Flavor.
    • Constructor Summary

      Constructors 
      Constructor and Description
      GraphTransferable(java.lang.Object[] cells, java.util.Map attrMap, java.awt.geom.Rectangle2D bounds, ConnectionSet cs, ParentMap pm)
      Constructs a new transferable selection for cells, csand attrMap.
    • Field Detail

      • dataFlavor

        public static java.awt.datatransfer.DataFlavor dataFlavor
        Local Machine Reference Data Flavor.
    • Constructor Detail

      • GraphTransferable

        public GraphTransferable(java.lang.Object[] cells,
                                 java.util.Map attrMap,
                                 java.awt.geom.Rectangle2D bounds,
                                 ConnectionSet cs,
                                 ParentMap pm)
        Constructs a new transferable selection for cells, csand attrMap.
    • Method Detail

      • getCells

        public java.lang.Object[] getCells()
        Returns the cells that represent the selection.
      • getConnectionSet

        public ConnectionSet getConnectionSet()
        Returns the connections between cells (and possibly other, unselected cells).
      • getParentMap

        public ParentMap getParentMap()
      • getAttributeMap

        public java.util.Map getAttributeMap()
        Returns a map of (GraphCell, Map)-pairs that represent the view attributes for the respecive cells.
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
      • lostOwnership

        public void lostOwnership(java.awt.datatransfer.Clipboard clip,
                                  java.awt.datatransfer.Transferable contents)
        Specified by:
        lostOwnership in interface java.awt.datatransfer.ClipboardOwner
      • getRicherFlavors

        public java.awt.datatransfer.DataFlavor[] getRicherFlavors()
        Returns the jvm-localreference flavors of the transferable.
      • getRicherData

        public java.lang.Object getRicherData(java.awt.datatransfer.DataFlavor flavor)
                                       throws java.awt.datatransfer.UnsupportedFlavorException
        Fetch the data in a jvm-localreference format.
        Throws:
        java.awt.datatransfer.UnsupportedFlavorException
      • isPlainSupported

        public boolean isPlainSupported()
        Returns true if the transferable support a text/plain format.
      • getPlainData

        public java.lang.String getPlainData()
        Fetch the data in a text/plain format.
      • isHTMLSupported

        public boolean isHTMLSupported()
        Returns true if the transferable support a text/html format.
      • getHTMLData

        public java.lang.String getHTMLData()
        Fetch the data in a text/html format.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.