|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectccvisu.WriterData
ccvisu.WriterDataGraphics
ccvisu.WriterDataGraphicsDISP
public class WriterDataGraphicsDISP
Writer for displaying the layout on the screen device.
| Field Summary | |
|---|---|
private javax.swing.DefaultListModel |
clusters
|
private DisplayCriteria |
dispFilter
|
private FrameDisplay |
display
|
private java.util.Vector<java.util.Vector<java.util.Set<GraphEdge>>> |
edgeMap
|
private java.awt.Color |
frontColor
|
private int |
insetbottom
|
private int |
insetleft
|
private java.awt.Graphics |
mGraphics
|
private java.util.Vector<java.util.Set<java.lang.String>> |
xMap
|
private int |
xSize
|
private java.util.Vector<java.util.Set<java.lang.String>> |
yMap
|
private int |
ySize
|
| Fields inherited from class ccvisu.WriterDataGraphics |
|---|
options |
| Fields inherited from class ccvisu.WriterData |
|---|
endl, graph, out |
| Constructor Summary | |
|---|---|
WriterDataGraphicsDISP(java.io.PrintWriter out,
GraphData graph,
Options opt)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addCluster(Group clt)
add a new cluster in the list |
void |
adjustFrontColor()
adjust frontColor |
void |
filterEdges(int filterType)
|
void |
filterOff()
|
void |
filterVertices(int filterType)
|
Group |
getCluster(int index)
return the cluster at the specified index |
Group |
getCluster(java.lang.String name)
return the cluster with the specified name |
javax.swing.DefaultListModel |
getClusters()
|
FrameDisplay |
getDisplay()
|
GraphData |
getGraphData()
Gets the local graph representation (layout). |
java.util.Set<java.lang.String> |
getNames(java.awt.Point p)
Compute list of names of the vertices and edges at the given position. |
int |
getNbOfCluster()
get the number of cluster |
java.awt.Color |
getWriteColor()
the color of the text |
private boolean |
guessBrowser(java.lang.String URL)
|
boolean |
isEdgesAvailable()
get showEdges |
void |
markVertices(java.lang.String regEx)
Marks all vertices whose node names match the given regular expression. |
void |
moveClusterDown(int index)
move the cluster at index one place lower in the list => drawn later (more on top) |
void |
moveClusterUp(int index)
move the cluster at index one place higher in the list => cluster drawn sooner |
void |
openURL(java.awt.Point p)
Open the name of what is under the cursor as if it is an URL. |
private void |
paintArrow(java.awt.Graphics g,
int x0,
int y0,
int x1,
int y1)
|
void |
refreshClusters()
tells the cluster that the graph has changed => recompute some data |
void |
removeCluster(int index)
remove the cluster at the specified index |
void |
resetRestriction()
Reset vertex restriction that was set by restrictShowedVertices. |
void |
restrictShowedVertices(java.awt.Point pTopLeft,
java.awt.Point pBottomRight)
Restrict the set of vertices displayed on the screen to the vertices within the given rectangular (i.e., zoom). |
void |
setGraphData(GraphData layout)
Sets the local graph representation (layout) to a new value. |
int |
toggleNames(java.awt.Point p)
Toggle the showName flag of the vertices and edges at the given position. |
void |
write()
Nothing to do here. |
void |
writeDISP(int size,
java.awt.Graphics pGraphics,
int xCanvasSize,
int yCanvasSize,
int insetleft,
int insetbottom)
Writes the layout on the screen device (DISP output format). |
void |
writeEdge(GraphEdge edge,
int xPos1,
int yPos1,
int zPos1,
int xPos2,
int yPos2,
int zPos2)
Writes an edge. |
void |
writeFileLayout(java.lang.String fileName)
Writes layout to file using an implementation of class WriterData. |
void |
writeVertex(GraphVertex curVertex,
int xPos,
int yPos,
int zPos,
int radius)
Writes a vertex on screen. |
| Methods inherited from class ccvisu.WriterDataGraphics |
|---|
paintArrow, writeGraphicsLayout |
| Methods inherited from class ccvisu.WriterData |
|---|
mkQuoted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final FrameDisplay display
private java.util.Vector<java.util.Set<java.lang.String>> xMap
private java.util.Vector<java.util.Set<java.lang.String>> yMap
private java.util.Vector<java.util.Vector<java.util.Set<GraphEdge>>> edgeMap
private final javax.swing.DefaultListModel clusters
private java.awt.Color frontColor
private java.awt.Graphics mGraphics
private int insetleft
private int insetbottom
private int xSize
private int ySize
private DisplayCriteria dispFilter
| Constructor Detail |
|---|
public WriterDataGraphicsDISP(java.io.PrintWriter out,
GraphData graph,
Options opt)
graph - Graph representation, contains the positions of the vertices.| Method Detail |
|---|
public void write()
write in class WriterDataGraphics
public void writeDISP(int size,
java.awt.Graphics pGraphics,
int xCanvasSize,
int yCanvasSize,
int insetleft,
int insetbottom)
ScreenDisplay.
size - Size of the output drawing square.pGraphics - The drawing area of the canvas.xCanvasSize - Width of the canvas.yCanvasSize - Height of the canvas.insetleft - Left inset of the drawing frame.insetbottom - Bottom inset of the drawing frame.
public void writeVertex(GraphVertex curVertex,
int xPos,
int yPos,
int zPos,
int radius)
writeVertex in class WriterDataGraphicscurVertex - The vertex object, to access vertex attributes.xPos - x coordinate of the vertex.yPos - y coordinate of the vertex.zPos - z coordinate of the vertex.radius - Radius of the vertex.
public void writeEdge(GraphEdge edge,
int xPos1,
int yPos1,
int zPos1,
int xPos2,
int yPos2,
int zPos2)
writeEdge in class WriterDataGraphicsedge - an edge in graph.edgesxPos1 - x coordinate of the first point.yPos1 - y coordinate of the first point.zPos1 - z coordinate of the first point.xPos2 - x coordinate of the second point.yPos2 - y coordinate of the second point.zPos2 - z coordinate of the second point.public void writeFileLayout(java.lang.String fileName)
WriterData.
Call-back method, invoked from within ScreenDisplay.
fileName - Name of the output file to write the layout to.public void markVertices(java.lang.String regEx)
regEx - Regular expression.public int toggleNames(java.awt.Point p)
p - coordinates of the vertex.
public java.util.Set<java.lang.String> getNames(java.awt.Point p)
p - coordinates.
public void restrictShowedVertices(java.awt.Point pTopLeft,
java.awt.Point pBottomRight)
pTopLeft - coordinates of the top left corner of the rectangular.pBottomRight - coordinates of the bottom right corner of the rectangular.public void resetRestriction()
public GraphData getGraphData()
public void setGraphData(GraphData layout)
layout - Graph/layout representation to switch to.public boolean isEdgesAvailable()
public void adjustFrontColor()
public java.awt.Color getWriteColor()
public void addCluster(Group clt)
clt - public void removeCluster(int index)
index - public Group getCluster(int index)
index -
public Group getCluster(java.lang.String name)
name -
public javax.swing.DefaultListModel getClusters()
public int getNbOfCluster()
public void moveClusterUp(int index)
index - public void moveClusterDown(int index)
index - public void refreshClusters()
public void openURL(java.awt.Point p)
p - Coordinatesprivate boolean guessBrowser(java.lang.String URL)
private void paintArrow(java.awt.Graphics g,
int x0,
int y0,
int x1,
int y1)
public FrameDisplay getDisplay()
public void filterVertices(int filterType)
filterType - public void filterEdges(int filterType)
filterType - public void filterOff()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||