public class NetGraphModel extends DefaultGraphModel implements java.lang.Comparable<NetGraphModel>
Modifier and Type | Class and Description |
---|---|
class |
NetGraphModel.NetGraphModelEdit |
DefaultGraphModel.EmptyIterator, DefaultGraphModel.GraphModelEdit, DefaultGraphModel.GraphModelLayerEdit
asksAllowsChildren, attributes, emptyIterator, listenerList, removeEmptyGroups, roots
Constructor and Description |
---|
NetGraphModel(NetGraph graph) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsIncomingFlows(YAWLCell vertex) |
boolean |
acceptsIncomingFlows(YAWLCell cell,
Edge edge) |
boolean |
acceptsSource(java.lang.Object edge,
java.lang.Object port)
Returns
true if port is a valid source for
edge . |
boolean |
acceptsTarget(java.lang.Object edge,
java.lang.Object port)
Returns
true if port is a valid target for
edge . |
boolean |
areConnected(YAWLCell sourceCell,
YAWLCell targetCell) |
boolean |
areConnectedAsSourceAndTarget(YAWLCell sourceCell,
YAWLCell targetCell) |
java.util.Map |
cloneCells(java.lang.Object[] cells)
Returns a map of (cell, clone)-pairs for all
cells . |
int |
compareTo(NetGraphModel otherModel) |
protected void |
connect(java.lang.Object edge,
java.lang.Object port,
boolean isSource,
boolean insert)
Connects or disconnects the edge and port in this model.
|
boolean |
connectionAllowable(Port source,
Port target)
Returns
true if a flow relation can validly be drawn
from the source port to the target port, false otherwise. |
protected DefaultGraphModel.GraphModelEdit |
createEdit(java.lang.Object[] inserted,
java.lang.Object[] removed,
java.util.Map attributes,
ConnectionSet cs,
ParentMap pm,
javax.swing.undo.UndoableEdit[] edits) |
boolean |
generatesOutgoingFlows(YAWLCell cell) |
boolean |
generatesOutgoingFlows(YAWLCell cell,
Edge edge) |
java.util.Set |
getConnectingFlows(java.lang.Object[] cells) |
YDecomposition |
getDecomposition() |
java.lang.String |
getExternalDataGateway() |
NetGraph |
getGraph() |
java.util.List<java.lang.Object> |
getLastClonedCells() |
java.lang.String |
getName() |
YAWLCell |
getSourceOf(Edge edge) |
YAWLCell |
getTargetOf(Edge edge) |
VertexContainer |
getVertexContainer(YAWLVertex vertex,
java.util.HashSet objectsToInsert,
ParentMap parentMap) |
boolean |
hasIncomingFlow(YAWLCell cell) |
boolean |
hasIncomingFlow(YAWLCell cell,
Edge edgeToIgnore) |
boolean |
hasOutgoingFlow(YAWLCell cell) |
boolean |
hasOutgoingFlow(YAWLCell cell,
Edge edgeToIgnore) |
boolean |
isRootNet() |
java.util.Set<java.lang.Object> |
removeCells(java.lang.Object[] cells) |
void |
setDecomposition(YDecomposition decomposition) |
void |
setExternalDataGateway(java.lang.String gateway) |
void |
setIsRootNet(boolean isRootNet) |
void |
setJoinDecorator(YAWLTask task,
int type,
int position) |
void |
setName(java.lang.String name) |
void |
setSplitDecorator(YAWLTask task,
int type,
int position) |
addGraphModelListener, beginUpdate, cellsChanged, cloneCell, cloneCell, cloneCell, cloneUserObject, contains, containsEdgeBetween, 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, valueForCellChanged
_postEdit, addUndoableEditListener, createCompoundEdit, getUndoableEditListeners, postEdit, removeUndoableEditListener, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addUndoableEditListener, removeUndoableEditListener
public NetGraphModel(NetGraph graph)
public NetGraph getGraph()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setIsRootNet(boolean isRootNet)
public boolean isRootNet()
public YDecomposition getDecomposition()
public void setDecomposition(YDecomposition decomposition)
public void setExternalDataGateway(java.lang.String gateway)
public java.lang.String getExternalDataGateway()
public java.util.Set getConnectingFlows(java.lang.Object[] cells)
public java.util.Set<java.lang.Object> removeCells(java.lang.Object[] cells)
public java.util.Map cloneCells(java.lang.Object[] cells)
DefaultGraphModel
cells
. In
the new array, all references are replaced with references to the cloned
cells (ie parent or anchor). This method does only include children which
are in cells
. Use JGraph.getDescendants to get a complete
list of all children.cloneCells
in interface GraphModel
cloneCells
in class DefaultGraphModel
public java.util.List<java.lang.Object> getLastClonedCells()
public boolean acceptsTarget(java.lang.Object edge, java.lang.Object port)
DefaultGraphModel
true
if port
is a valid target for
edge
. edge and port must be objects
previously obtained from this data source.acceptsTarget
in interface GraphModel
acceptsTarget
in class DefaultGraphModel
true
if port
is a valid target for
edge
.public boolean acceptsSource(java.lang.Object edge, java.lang.Object port)
DefaultGraphModel
true
if port
is a valid source for
edge
. edge and port must be objects
previously obtained from this data source.acceptsSource
in interface GraphModel
acceptsSource
in class DefaultGraphModel
true
if port
is a valid source for
edge
.protected void connect(java.lang.Object edge, java.lang.Object port, boolean isSource, boolean insert)
connect
in class DefaultGraphModel
public boolean connectionAllowable(Port source, Port target)
true
if a flow relation can validly be drawn
from the source port to the target port, false
otherwise.source
- The source porttarget
- The target porttrue
if connection allowed.public boolean areConnectedAsSourceAndTarget(YAWLCell sourceCell, YAWLCell targetCell)
public boolean acceptsIncomingFlows(YAWLCell vertex)
public boolean hasIncomingFlow(YAWLCell cell)
public boolean generatesOutgoingFlows(YAWLCell cell)
public boolean hasOutgoingFlow(YAWLCell cell)
public void setJoinDecorator(YAWLTask task, int type, int position)
public void setSplitDecorator(YAWLTask task, int type, int position)
public VertexContainer getVertexContainer(YAWLVertex vertex, java.util.HashSet objectsToInsert, ParentMap parentMap)
public int compareTo(NetGraphModel otherModel)
compareTo
in interface java.lang.Comparable<NetGraphModel>
protected DefaultGraphModel.GraphModelEdit createEdit(java.lang.Object[] inserted, java.lang.Object[] removed, java.util.Map attributes, ConnectionSet cs, ParentMap pm, javax.swing.undo.UndoableEdit[] edits)
createEdit
in class DefaultGraphModel