|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.TransferHandler
org.jgraph.graph.GraphTransferHandler
com.jgraph.pad.graph.JGraphpadTransferHandler
Transfer handler for graphs that accepts external files and text.
| Field Summary | |
protected Object |
prototype
Holds the prototype which is used to create new vertices. |
| Fields inherited from class org.jgraph.graph.GraphTransferHandler |
alwaysReceiveAsCopyAction, in, inCount, out |
| Fields inherited from class javax.swing.TransferHandler |
COPY, COPY_OR_MOVE, MOVE, NONE |
| Constructor Summary | |
JGraphpadTransferHandler(Object prototype)
Constructs a new transfer handler for the specified prototype. |
|
| Method Summary | |
boolean |
canImport(JComponent comp,
DataFlavor[] flavors)
Extends the parent implementation to accept text and DataFlavor.javaFileListFlavor flavors. |
protected Object |
createCell(org.jgraph.graph.GraphModel model,
Object userObject)
Constructs a new cell from prototype using the specified model
and assigns it the new user object. |
protected Point2D |
getInsertionLocation(org.jgraph.JGraph graph)
Helper method to return the insertion location for a drop operation in the specified graph. |
protected String |
getString(Reader reader)
Helper method to read the specified reader into a string. |
boolean |
importDataImpl(JComponent comp,
Transferable t)
Overrides the parent implementation to import transferable data. |
protected void |
insertValues(org.jgraph.JGraph graph,
Point2D p,
Object[] values)
Inserts the specified list of values into the specified graph. |
| Methods inherited from class org.jgraph.graph.GraphTransferHandler |
create, createTransferable, createTransferable, createTransferableForGraph, exportDone, getInsertionOffset, getSourceActions, handleExternalDrop, importData, isAlwaysReceiveAsCopyAction, setAlwaysReceiveAsCopyAction |
| Methods inherited from class javax.swing.TransferHandler |
exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient Object prototype
| Constructor Detail |
public JGraphpadTransferHandler(Object prototype)
prototype - The prototype to be used to create new cells.| Method Detail |
protected Object createCell(org.jgraph.graph.GraphModel model,
Object userObject)
prototype using the specified model
and assigns it the new user object.
model - The model to use for cloning the prototype.userObject - The user object to be assigned to the clone.
public boolean canImport(JComponent comp,
DataFlavor[] flavors)
DataFlavor.javaFileListFlavor flavors.
comp - The component to drop the transferable to.flavors - The supported data flavors of the transferable.
public boolean importDataImpl(JComponent comp,
Transferable t)
GraphTransferHandler.importData(JComponent, Transferable) method
because the return value has a different semantic. This implementation
silently ignores all exceptions.
comp - The component to drop the transferable to.t - The transferable data to be inserted into the component.
protected Point2D getInsertionLocation(org.jgraph.JGraph graph)
BasicGraphUI.getInsertionLocation() or a dummy point if the
insertion location is not available in the graph ui.
graph - The graph to determine the insertion location for.
protected String getString(Reader reader)
throws IOException
reader - The reader to read into the string.
IOException
protected void insertValues(org.jgraph.JGraph graph,
Point2D p,
Object[] values)
graph - The graph to insert the cells into.p - The point at which to insert the cells.values - The list of values to be inserted.
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||