V
- the graph vertex typeE
- the graph edge typepublic class JGraphModelAdapter<V,E>
extends org.jgraph.graph.DefaultGraphModel
Modifier and Type | Class and Description |
---|---|
static interface |
JGraphModelAdapter.CellFactory<VV,EE>
Creates the JGraph cells that reflect the respective JGraphT elements.
|
static class |
JGraphModelAdapter.DefaultCellFactory<VV,EE>
A simple default cell factory.
|
asksAllowsChildren, attributes, emptyIterator, listenerList, removeEmptyGroups, roots, transAddedCells, transEditAttrs, transEditCS, transEditPM, transRemovedCells, updateLevel
compoundEdit, listeners, realSource
Constructor and Description |
---|
JGraphModelAdapter(Graph<V,E> jGraphTGraph)
Constructs a new JGraph model adapter for the specified JGraphT graph.
|
JGraphModelAdapter(Graph<V,E> jGraphTGraph,
org.jgraph.graph.AttributeMap defaultVertexAttributes,
org.jgraph.graph.AttributeMap defaultEdgeAttributes)
Constructs a new JGraph model adapter for the specified JGraphT graph.
|
JGraphModelAdapter(Graph<V,E> jGraphTGraph,
org.jgraph.graph.AttributeMap defaultVertexAttributes,
org.jgraph.graph.AttributeMap defaultEdgeAttributes,
JGraphModelAdapter.CellFactory<V,E> cellFactory)
Constructs a new JGraph model adapter for the specified JGraphT graph.
|
Modifier and Type | Method and Description |
---|---|
static <V,E> org.jgraph.graph.AttributeMap |
createDefaultEdgeAttributes(Graph<V,E> jGraphTGraph)
Creates and returns a map of attributes to be used as defaults for edge attributes, depending
on the specified graph.
|
static org.jgraph.graph.AttributeMap |
createDefaultVertexAttributes()
Creates and returns a map of attributes to be used as defaults for vertex attributes.
|
JGraphModelAdapter.CellFactory<V,E> |
getCellFactory()
Returns the cell factory used to create the JGraph cells.
|
org.jgraph.graph.AttributeMap |
getDefaultEdgeAttributes()
Returns the default edge attributes used for creating new JGraph edges.
|
org.jgraph.graph.AttributeMap |
getDefaultVertexAttributes()
Returns the default vertex attributes used for creating new JGraph vertices.
|
org.jgraph.graph.DefaultEdge |
getEdgeCell(E jGraphTEdge)
Returns the JGraph edge cell that corresponds to the specified JGraphT edge.
|
org.jgraph.graph.DefaultGraphCell |
getVertexCell(Object jGraphTVertex)
Returns the JGraph vertex cell that corresponds to the specified JGraphT vertex.
|
org.jgraph.graph.DefaultPort |
getVertexPort(Object jGraphTVertex)
Returns the JGraph port cell that corresponds to the specified JGraphT vertex.
|
void |
setDefaultEdgeAttributes(org.jgraph.graph.AttributeMap defaultEdgeAttributes)
Sets the default edge attributes used for creating new JGraph edges.
|
void |
setDefaultVertexAttributes(org.jgraph.graph.AttributeMap defaultVertexAttributes)
Sets the default vertex attributes used for creating new JGraph vertices.
|
acceptsSource, acceptsTarget, addGraphModelListener, beginUpdate, cellsChanged, cloneCell, cloneCell, cloneCell, cloneCells, cloneUserObject, connect, contains, containsEdgeBetween, createEdit, createLayerEdit, createRemoveEdit, edges, edit, edit, endUpdate, execute, fireGraphChanged, getAll, getAttributes, getAttributes, getChild, getChildCount, getConnectionSet, getDescendants, getEdges, getEdges, getEdgesBetween, getGraphModelListeners, getIncomingEdges, getIndexOfChild, getIndexOfRoot, getOpposite, getOutgoingEdges, getParent, getRootAt, getRootCount, getRoots, getRoots, getRoots, getRootsAsCollection, getSource, getSourceVertex, getTarget, getTargetVertex, getTopmostCells, getUpdateLevel, getUserObject, getValue, handleAttributes, handleConnection, handleConnectionSet, handleInsert, handleParentMap, handleRemove, hasAncestorIn, insert, isEdge, isGroup, isLeaf, isPort, isRemoveEmptyGroups, isVertex, order, remove, removeGraphModelListener, setParent, setRemoveEmptyGroups, setSourcePort, setTargetPort, toBack, toFront, updateTransaction, valueForCellChanged
_postEdit, addUndoableEditListener, createCompoundEdit, getUndoableEditListeners, postEdit, removeUndoableEditListener, toString
public JGraphModelAdapter(Graph<V,E> jGraphTGraph)
jGraphTGraph
- the JGraphT graph for which JGraph model adapter to be created.
null
is NOT permitted.public JGraphModelAdapter(Graph<V,E> jGraphTGraph, org.jgraph.graph.AttributeMap defaultVertexAttributes, org.jgraph.graph.AttributeMap defaultEdgeAttributes)
jGraphTGraph
- the JGraphT graph for which JGraph model adapter to be created.
null
is NOT permitted.defaultVertexAttributes
- a default map of JGraph attributes to format vertices.
null
is NOT permitted.defaultEdgeAttributes
- a default map of JGraph attributes to format edges.
null
is NOT permitted.public JGraphModelAdapter(Graph<V,E> jGraphTGraph, org.jgraph.graph.AttributeMap defaultVertexAttributes, org.jgraph.graph.AttributeMap defaultEdgeAttributes, JGraphModelAdapter.CellFactory<V,E> cellFactory)
jGraphTGraph
- the JGraphT graph for which JGraph model adapter to be created.
null
is NOT permitted.defaultVertexAttributes
- a default map of JGraph attributes to format vertices.
null
is NOT permitted.defaultEdgeAttributes
- a default map of JGraph attributes to format edges.
null
is NOT permitted.cellFactory
- a JGraphModelAdapter.CellFactory
to be used to create the JGraph cells.
null
is NOT permitted.IllegalArgumentException
- in case a parameter is not permittedpublic static <V,E> org.jgraph.graph.AttributeMap createDefaultEdgeAttributes(Graph<V,E> jGraphTGraph)
V
- the graph vertex typeE
- the graph edge typejGraphTGraph
- the graph for which default edge attributes to be created.public static org.jgraph.graph.AttributeMap createDefaultVertexAttributes()
public JGraphModelAdapter.CellFactory<V,E> getCellFactory()
public void setDefaultEdgeAttributes(org.jgraph.graph.AttributeMap defaultEdgeAttributes)
defaultEdgeAttributes
- the default edge attributes to set.public org.jgraph.graph.AttributeMap getDefaultEdgeAttributes()
public void setDefaultVertexAttributes(org.jgraph.graph.AttributeMap defaultVertexAttributes)
defaultVertexAttributes
- the default vertex attributes to set.public org.jgraph.graph.AttributeMap getDefaultVertexAttributes()
public org.jgraph.graph.DefaultEdge getEdgeCell(E jGraphTEdge)
null
.jGraphTEdge
- a JGraphT edge of the JGraphT graph.null
if no corresponding cell found.public org.jgraph.graph.DefaultGraphCell getVertexCell(Object jGraphTVertex)
null
.jGraphTVertex
- a JGraphT vertex of the JGraphT graph.null
if no corresponding cell found.public org.jgraph.graph.DefaultPort getVertexPort(Object jGraphTVertex)
null
.jGraphTVertex
- a JGraphT vertex of the JGraphT graph.null
if no corresponding cell found.Copyright © 2017. All rights reserved.