public class VisualGraph extends mxGraph
Automaton
,
Cospan
,
CospanDecomposition
,
Graph
mxGraph.mxICellVisitor
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
static String |
BDD_HIGH_EDGE_STYLE
The Default BDD Vertex Style To Indicate High Edges
|
static String |
BDD_LOW_EDGE_STYLE
The Default BDD Vertex Style To Indicate Low Edges
|
static String |
BDD_TERMINAL_ONE_STYLE
The Default BDD Vertex Style To Indicate The Terminal "One"
|
static String |
BDD_TERMINAL_ZERO_STYLE
The Default BDD Vertex Style To Indicate The Terminal "Zero"
|
static String |
BDD_VERTEX_STYLE
The Default BDD Vertex Style To Indicate Inner Nodes
|
static int |
BLACK
Black Color Index
|
static int |
BLUE
Blue Color Index
|
static String[] |
COLOR_STYLE
The list of available colors
|
static String |
COSPAN_EDGE_STYLE_RED
The Cospan Mapping Style Which Used Red Colored Arrows
|
static int |
CYAN
Cyan Color Index
|
static String |
DOT_FINAL_TOKEN
The DOT Token To Indicate Final States
|
static String |
DOT_INITIAL_FINAL_TOKEN
The DOT Token To Indicate States Which Are Both Initial And Final
|
static String |
DOT_INITIAL_TOKEN
The DOT Token To Indicate Initial States
|
static int |
GRAY
Gray Color Index
|
static int |
GREEN
Green Color Index
|
static String |
HYPERGRAPH_EDGE_STYLE
The Default Hypergraph Edge Style
|
static String |
HYPERGRAPH_INNER_OUTER_VERTEX_STYLE
The Hypergraph Vertex Style Used To Indicate Nodes Contained In Both The Inner And The Outer Interface
|
static String |
HYPERGRAPH_INNER_VERTEX_STYLE
The Hypergraph Vertex Style Used To Indicate Nodes Contained In The Inner Interface
|
static String |
HYPERGRAPH_OUTER_VERTEX_STYLE
The Hypergraph Vertex Style Used To Indicate Nodes Contained In The Outer Interface
|
static String |
HYPERGRAPH_TENTACLE_STYLE
The Default Hypergraph Tentacle Style
|
static String |
HYPERGRAPH_VERTEX_STYLE
The Default Hypergraph Vertex Style
|
static String |
INNER_INTERFACE_BACKGROUND_STYLE
The Default Background Style For The Inner Interface
|
static String |
INTERFACE_NO_BACKGROUND_STYLE
The Background Style For Interfaces Without Background
|
static String |
INTERFACE_VERTEX_STYLE
The Default Style For Interface Nodes
|
static String |
INTERFACE_WHITE_BACKGROUND_STYLE
The Background Style For Interfaces With A White Background
|
static String |
LABEL_STYLE
The Default Label Style
|
static int |
MAGENTA
Magenta Color Index
|
static String |
NO_VERTEX_STYLE
The "Empty Vertex" Style
|
static int |
ORANGE
Orange Color Index
|
static String |
OUTER_INTERFACE_BACKGROUND_STYLE
The Default Background Style For The Outer Interface
|
static int |
RED
Red Color Index
|
static int |
WHITE
White Color Index
|
static int |
YELLOW
Yellow Color Index
|
Constructor and Description |
---|
VisualGraph()
Creates a new
VisualGraph -object for the visualization of graphs. |
VisualGraph(mxIGraphModel model)
Creates a new
VisualGraph -object for the visualization of graphs
depending on the mxIGraphModel model. |
VisualGraph(mxIGraphModel model,
mxStylesheet stylesheet)
Creates a new
VisualGraph -object for the visualization of graphs
depending on the mxIGraphModel model and initialized with the
myStylesheet stylesheet. |
VisualGraph(mxStylesheet stylesheet)
Creates a new
VisualGraph -object for the visualization of graphs
initialized with the myStylesheet stylesheet. |
Modifier and Type | Method and Description |
---|---|
mxCell |
getVertexByName(String name)
Returns the
mxCell -object representing the vertex with the id name . |
static VisualGraph |
getVisualGraph(Automaton automaton,
CospanDecomposition decomposition)
Creates a graph visualization of the run of the automaton
automaton on
the decomposition decomposition . |
static VisualGraph |
getVisualGraph(Cospan cospan)
Converts a Raven cospan to its graph visualization.
|
static VisualGraph |
getVisualGraph(Graph graph)
Converts a Raven graph to its graph visualization.
|
Object |
insertVertex(Object parent,
String id,
Object value,
double x,
double y,
double width,
double height) |
Object |
insertVertex(Object parent,
String id,
Object value,
double x,
double y,
double width,
double height,
String style) |
boolean |
isCellSelectable(Object o) |
boolean |
isVertex(mxCell cell)
Checks whether the given cell is a vertex (of the hypergraph displayed by
this
ViusalGraph ). |
boolean |
setVertexStyle(String name,
String style)
Sets the style of the
mxCell -object representing the vertex with the id
name to the style given by style . |
addAllEdges, addCell, addCell, addCell, addCells, addCells, addCells, addCells, addEdge, addImageBundle, addPropertyChangeListener, addPropertyChangeListener, addSelectionCell, addSelectionCells, alignCells, alignCells, alignCells, cellConnected, cellLabelChanged, cellsAdded, cellsAdded, cellsFolded, cellsFolded, cellSizeUpdated, cellsMoved, cellsOrdered, cellsRemoved, cellsResized, cellsToggled, clearSelection, cloneCells, cloneCells, connectCell, connectCell, constrainChild, convertValueToString, createEdge, createGroupCell, createVertex, createVertex, disconnectGraph, drawCell, drawGraph, drawState, enterGroup, enterGroup, exitGroup, extendParent, findTreeRoots, findTreeRoots, findTreeRoots, flipEdge, foldCells, foldCells, foldCells, foldCells, getAllConnectionConstraints, getAllEdges, getAlternateEdgeStyle, getBorder, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBoxFromGeometry, getBoundsForCells, getBoundsForGroup, getCellBounds, getCellBounds, getCellBounds, getCellBounds, getCellContainmentArea, getCellGeometry, getCellsBeyond, getCellsForGroup, getCellStyle, getCellValidationError, getChangesRepaintThreshold, getChildCells, getChildCells, getChildEdges, getChildOffsetForCell, getChildVertices, getCloneableCells, getConnectionConstraint, getConnectionPoint, getConnections, getConnections, getConnections, getCurrentRoot, getDefaultLoopStyle, getDefaultOverlap, getDefaultParent, getDeletableCells, getDropTarget, getEdges, getEdges, getEdges, getEdges, getEdgesBetween, getEdgesBetween, getEdgeValidationError, getFoldableCells, getGraphBounds, getGridSize, getImage, getImageBundles, getImageBundles, getImageFromBundles, getIncomingEdges, getIncomingEdges, getLabel, getMaximumGraphBounds, getMinimumGraphSize, getModel, getMovableCells, getMultiplicities, getOpposites, getOpposites, getOrigin, getOutgoingEdges, getOutgoingEdges, getOverlap, getPaintBounds, getPreferredSizeForCell, getRemovedCellsForChanges, getSelectionCell, getSelectionCells, getSelectionCellsForChanges, getSelectionCount, getSelectionModel, getStartSize, getStylesheet, getTerminalForPort, getToolTipForCell, getTranslateForRoot, getView, graphModelChanged, groupCells, groupCells, groupCells, groupCells, home, insertEdge, insertEdge, insertVertex, isAllowDanglingEdges, isAllowLoops, isAllowNegativeCoordinates, isAllowOverlapParent, isAutoOrigin, isAutoSizeCell, isAutoSizeCells, isCellBendable, isCellCloneable, isCellCollapsed, isCellConnectable, isCellDeletable, isCellDisconnectable, isCellEditable, isCellFoldable, isCellLocked, isCellMovable, isCellResizable, isCellsBendable, isCellsCloneable, isCellsDeletable, isCellsDisconnectable, isCellsEditable, isCellSelected, isCellsLocked, isCellsMovable, isCellsResizable, isCellsSelectable, isCellVisible, isCloneInvalidEdges, isCollapseToPreferredSize, isConnectableEdges, isConstrainChild, isConstrainChildren, isDisconnectOnMove, isDropEnabled, isEdgeLabelsMovable, isEdgeValid, isEnabled, isExtendParent, isExtendParents, isExtendParentsOnAdd, isGridEnabled, isHtmlLabel, isHtmlLabels, isKeepEdgesInBackground, isKeepEdgesInForeground, isLabelClipped, isLabelMovable, isLabelsClipped, isLabelsVisible, isLoop, isMultigraph, isOrthogonal, isPort, isResetEdgesOnConnect, isResetEdgesOnMove, isResetEdgesOnResize, isResetViewOnRootChange, isSelectionEmpty, isSplitEnabled, isSplitTarget, isSwimlane, isSwimlaneNesting, isTerminalPointMovable, isValidAncestor, isValidConnection, isValidDropTarget, isValidRoot, isValidSource, isValidTarget, isVertexLabelsMovable, main, moveCells, moveCells, moveCells, orderCells, orderCells, processChange, processChanges, refresh, removeCells, removeCells, removeCells, removeCellsFromParent, removeCellsFromParent, removeImageBundle, removePropertyChangeListener, removePropertyChangeListener, removeSelectionCell, removeSelectionCells, repaint, repaint, resetEdge, resetEdges, resizeCell, resizeCells, selectAll, selectAll, selectCell, selectCells, selectCells, selectChildCell, selectEdges, selectEdges, selectNextCell, selectParentCell, selectPreviousCell, selectVertices, selectVertices, setAllowDanglingEdges, setAllowLoops, setAllowNegativeCoordinates, setAlternateEdgeStyle, setAutoOrigin, setAutoSizeCells, setBorder, setCellsBendable, setCellsCloneable, setCellsDeletable, setCellsDisconnectable, setCellsEditable, setCellsLocked, setCellsMovable, setCellsResizable, setCellsSelectable, setCellStyle, setCellStyle, setCellStyleFlags, setCellStyleFlags, setCellStyles, setCellStyles, setChangesRepaintThreshold, setCloneInvalidEdges, setCollapseToPreferredSize, setConnectableEdges, setConnectionConstraint, setConstrainChildren, setDefaultLoopStyle, setDefaultOverlap, setDefaultParent, setDisconnectOnMove, setDropEnabled, setEdgeLabelsMovable, setEnabled, setExtendParents, setExtendParentsOnAdd, setGridEnabled, setGridSize, setHtmlLabels, setKeepEdgesInBackground, setKeepEdgesInForeground, setLabelsClipped, setLabelsVisible, setMaximumGraphBounds, setMinimumGraphSize, setModel, setMultigraph, setMultiplicities, setOrigin, setResetEdgesOnConnect, setResetEdgesOnMove, setResetEdgesOnResize, setResetViewOnRootChange, setSelectionCell, setSelectionCells, setSelectionCells, setSplitEnabled, setStylesheet, setSwimlaneNesting, setVertexLabelsMovable, setView, snap, splitEdge, splitEdge, splitEdge, swapBounds, toggleCells, toggleCells, toggleCells, toggleCellStyle, toggleCellStyleFlags, toggleCellStyleFlags, toggleCellStyles, toggleCellStyles, translateCell, traverse, traverse, ungroupCells, ungroupCells, updateAlternateBounds, updateCellSize, updateCellSize, updateGroupBounds, updateGroupBounds, updateGroupBounds, updateGroupBounds, validateCell, validateEdge
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
public static final String DOT_FINAL_TOKEN
public static final String DOT_INITIAL_TOKEN
public static final String DOT_INITIAL_FINAL_TOKEN
public static final String LABEL_STYLE
public static final String NO_VERTEX_STYLE
public static final String HYPERGRAPH_VERTEX_STYLE
public static final String HYPERGRAPH_INNER_VERTEX_STYLE
public static final String HYPERGRAPH_OUTER_VERTEX_STYLE
public static final String HYPERGRAPH_INNER_OUTER_VERTEX_STYLE
public static final String HYPERGRAPH_EDGE_STYLE
public static final String HYPERGRAPH_TENTACLE_STYLE
public static final String BDD_TERMINAL_ZERO_STYLE
public static final String BDD_TERMINAL_ONE_STYLE
public static final String BDD_VERTEX_STYLE
public static final String BDD_HIGH_EDGE_STYLE
public static final String BDD_LOW_EDGE_STYLE
public static final String COSPAN_EDGE_STYLE_RED
public static final String INNER_INTERFACE_BACKGROUND_STYLE
public static final String OUTER_INTERFACE_BACKGROUND_STYLE
public static final String INTERFACE_VERTEX_STYLE
public static final String INTERFACE_NO_BACKGROUND_STYLE
public static final String INTERFACE_WHITE_BACKGROUND_STYLE
public static final int WHITE
public static final int BLACK
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int YELLOW
public static final int CYAN
public static final int ORANGE
public static final int MAGENTA
public static final int GRAY
public static final String[] COLOR_STYLE
public VisualGraph()
VisualGraph
-object for the visualization of graphs.public VisualGraph(mxIGraphModel model)
VisualGraph
-object for the visualization of graphs
depending on the mxIGraphModel
model.model
- the underlying graph modelpublic VisualGraph(mxStylesheet stylesheet)
VisualGraph
-object for the visualization of graphs
initialized with the myStylesheet
stylesheet.stylesheet
- the initial stylesheetpublic VisualGraph(mxIGraphModel model, mxStylesheet stylesheet)
VisualGraph
-object for the visualization of graphs
depending on the mxIGraphModel
model and initialized with the
myStylesheet
stylesheet.model
- the underlying graph modelstylesheet
- the initial stylesheetpublic static VisualGraph getVisualGraph(Graph graph) throws FileNotFoundException, IOException, InterruptedException
graph
- the graph which is to be visualizedFileNotFoundException
- thrown if the DOT executable can not be foundIOException
- thrown if an I/O exception is thrown during the execution of DOTInterruptedException
- thrown if DOT is interrupted during executionpublic static VisualGraph getVisualGraph(Cospan cospan) throws FileNotFoundException, IOException, InterruptedException
cospan
- the cospan which is to be visualizedFileNotFoundException
- thrown if the DOT executable can not be foundIOException
- thrown if an I/O exception is thrown during the execution of DOTInterruptedException
- thrown if DOT is interrupted during executionpublic static VisualGraph getVisualGraph(Automaton automaton, CospanDecomposition decomposition) throws FileNotFoundException, IOException, InterruptedException
automaton
on
the decomposition decomposition
.automaton
- the automaton used for the rundecomposition
- the cospan decomposition which is the input for this runFileNotFoundException
- thrown if the DOT executable can not be foundIOException
- thrown if an I/O exception is thrown during the execution of DOTInterruptedException
- thrown if DOT is interrupted during executionpublic Object insertVertex(Object parent, String id, Object value, double x, double y, double width, double height, String style)
insertVertex
in class mxGraph
public Object insertVertex(Object parent, String id, Object value, double x, double y, double width, double height)
insertVertex
in class mxGraph
public boolean isCellSelectable(Object o)
isCellSelectable
in class mxGraph
public boolean isVertex(mxCell cell)
ViusalGraph
).cell
- the cell to be checkedtrue
if the cell represents a vertex, false
otherwisepublic mxCell getVertexByName(String name)
mxCell
-object representing the vertex with the id name
.name
- the id of the vertexNullPointerException
- thrown if the id is null
IllegalArgumentException
- thrown if the id is emptypublic boolean setVertexStyle(String name, String style)
mxCell
-object representing the vertex with the id
name
to the style given by style
.name
- the id of the vertexstyle
- the name of the styletrue
if the vertex has been found, false
if no vertex could be foundNullPointerException
- thrown if the id is null
IllegalArgumentException
- thrown if the id is empty