public class IOPSubgraph extends GraphItem
IOPGraph
. Started out life as a impoverished node.
In September 2014 it blossomed a bit.Modifier and Type | Field and Description |
---|---|
protected java.util.HashSet<java.lang.Integer> |
edges |
java.lang.String |
name |
protected java.util.HashSet<java.lang.Integer> |
nodes |
protected java.util.HashSet<java.lang.Integer> |
subgraphs |
protected boolean |
topLevel |
antiAliased, COMPARATOR, gid, glyphList, HIGHLIGHT, HIGHLIGHT_OFFSET
Modifier | Constructor and Description |
---|---|
protected |
IOPSubgraph(IOPGraph parent,
java.lang.String name,
boolean topLevel,
java.util.HashSet<java.lang.Integer> nodes,
java.util.HashSet<java.lang.Integer> edges,
java.util.HashSet<java.lang.Integer> subgraphs) |
|
IOPSubgraph(IOPSubgraph clone) |
|
IOPSubgraph(java.lang.String name,
boolean topLevel) |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(IOPEdge e) |
void |
addNode(IOPNode n) |
void |
addSubgraph(IOPSubgraph s) |
void |
dehighlight()
Revert highlighting to previous state (if any).
|
double |
distanceTo(java.awt.geom.Point2D p)
Calculate distance from this node to given point.
|
void |
flatten(IOPGraph parent,
java.util.Collection<java.lang.Integer> nodes,
java.util.Collection<java.lang.Integer> edges,
java.util.Collection<java.lang.Integer> subgraphs) |
void |
flattenEdges(IOPGraph parent,
java.util.Collection<java.lang.Integer> edges) |
void |
flattenNodes(IOPGraph parent,
java.util.Collection<java.lang.Integer> nodes) |
static java.lang.String |
gensymSubgraphName(IOPGraph owner) |
java.awt.geom.Point2D |
getCenter() |
double |
getHeight() |
java.lang.String |
getName() |
java.util.List<IOPNode> |
getNodes(IOPGraph parent) |
java.awt.geom.Point2D |
getPosition() |
double |
getWidth() |
void |
highlight()
Highlight this node or edge.
|
void |
paint(java.awt.Graphics2D g2d) |
void |
setCenter(java.awt.geom.Point2D center) |
void |
setRendering(g2d.graph.xdotparser.visitor.xDotSubgraph hints) |
java.lang.String |
toDotString(IOPGraph graph,
java.util.Collection<IOPNode> nodes,
java.util.Map<java.lang.Integer,IOPEdge> edges) |
java.lang.String |
toString() |
java.lang.String |
toString(boolean verbose) |
getBounds, gid, inside, intersects, isHighlighted, isSelected, setSelected, transform
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, rotate, rotate, scale, setKeyAction, setMouseAction, shear, translate, unsetMouseAction
_getAttribute, _setAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsChar, getAttributeAsClosure, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsShort, getAttributeAsString, getKeys, getStaticAttribute, getStaticKeys, isAttribute, isStaticAttribute, removeAllAttributes, removeAllStaticAttributes, removeAttribute, removeStaticAttribute, setAttribute, setStaticAttribute, showAttributes, showAttributes
public final java.lang.String name
protected boolean topLevel
protected final java.util.HashSet<java.lang.Integer> nodes
protected final java.util.HashSet<java.lang.Integer> edges
protected final java.util.HashSet<java.lang.Integer> subgraphs
public IOPSubgraph(java.lang.String name, boolean topLevel)
protected IOPSubgraph(IOPGraph parent, java.lang.String name, boolean topLevel, java.util.HashSet<java.lang.Integer> nodes, java.util.HashSet<java.lang.Integer> edges, java.util.HashSet<java.lang.Integer> subgraphs)
public IOPSubgraph(IOPSubgraph clone)
public static java.lang.String gensymSubgraphName(IOPGraph owner)
public void flatten(IOPGraph parent, java.util.Collection<java.lang.Integer> nodes, java.util.Collection<java.lang.Integer> edges, java.util.Collection<java.lang.Integer> subgraphs)
public void flattenNodes(IOPGraph parent, java.util.Collection<java.lang.Integer> nodes)
public void flattenEdges(IOPGraph parent, java.util.Collection<java.lang.Integer> edges)
public void setRendering(g2d.graph.xdotparser.visitor.xDotSubgraph hints)
public void addNode(IOPNode n)
public void addEdge(IOPEdge e)
public void addSubgraph(IOPSubgraph s)
public java.lang.String getName()
public java.awt.geom.Point2D getCenter()
public void setCenter(java.awt.geom.Point2D center)
public double getWidth()
public double getHeight()
public java.awt.geom.Point2D getPosition()
public double distanceTo(java.awt.geom.Point2D p)
distanceTo
in class GraphItem
p
- Point to compute distance topublic void highlight()
GraphItem
public void dehighlight()
GraphItem
dehighlight
in class GraphItem
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean verbose)