|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object easik.sketch.util.SketchAdapter.JGraphListener
private class SketchAdapter.JGraphListener
Inner class listening to the GraphModel. If something is changed in the GraphModel, this Listener gets notified and propagates the change back to the JGraphT graph, if it didn't originate there.
If this change contains changes that would make this an illegal JGraphT graph, like adding an edge that is incident with only one vertex, the illegal parts of the change are undone.
Field Summary | |
---|---|
private Sketch |
_ourSketch
The sketch |
Constructor Summary | |
---|---|
SketchAdapter.JGraphListener(Sketch inSketch)
Default constructor |
Method Summary | |
---|---|
private void |
filterEdgesAndVertices(java.lang.Object[] allCells,
java.util.Set jEdges,
java.util.Set jVertices)
Filters an array of JGraph GraphCell objects into edges and vertices. |
void |
graphChanged(org.jgraph.event.GraphModelEvent e)
This method is called for all JGraph changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Sketch _ourSketch
Constructor Detail |
---|
public SketchAdapter.JGraphListener(Sketch inSketch)
inSketch
- The sketchMethod Detail |
---|
public void graphChanged(org.jgraph.event.GraphModelEvent e)
graphChanged
in interface org.jgraph.event.GraphModelListener
e
- private void filterEdgesAndVertices(java.lang.Object[] allCells, java.util.Set jEdges, java.util.Set jVertices)
allCells
- Array of cells to be filtered. These are just plain
Objects in principle, but if they aren't GraphCells we can't
detect what they are. So we ignore the non-GraphCell
elements.jEdges
- Set to which all edges are added.jVertices
- Set to which all vertices are added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |