|
|||||||||
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 java.awt.Graphics |
area
|
private java.lang.String |
browser
|
private java.util.Vector<Cluster> |
clusters
|
private ScreenDisplay |
display
|
private boolean[] |
edgeAnnot
|
private java.util.Set<java.lang.Integer>[][] |
edgeMap
|
private int |
insetbottom
|
private int |
insetleft
|
private java.awt.Color |
write
|
private java.util.Set<java.lang.String>[] |
xMap
|
private int |
xSize
|
private java.util.Set<java.lang.String>[] |
yMap
|
private int |
ySize
|
Fields inherited from class ccvisu.WriterDataGraphics |
---|
backColor, blackCircle, fontSize, minVert, openURL, showEdges |
Fields inherited from class ccvisu.WriterData |
---|
endl, graph |
Constructor Summary | |
---|---|
WriterDataGraphicsDISP(GraphData graph,
float minVert,
int fontSize,
java.awt.Color backColor,
boolean blackCircle,
boolean showEdges,
boolean openURL,
boolean anim,
java.lang.String inputName,
java.lang.String browser)
Constructor. |
Method Summary | |
---|---|
void |
addCluster(Cluster clt)
add a new cluster in the list |
boolean |
getBlackCircle()
return true if black circles are drawn |
Cluster |
getCluster(int index)
return the cluster at the specified index |
Cluster |
getCluster(java.lang.String name)
return the cluster with the specified name |
ScreenDisplay |
getDisplay()
|
GraphData |
getGraphData()
|
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 |
boolean |
getshowEdges()
get showEdges |
java.awt.Color |
getWriteColor()
the color of the text |
private boolean |
guessBrowser(java.lang.String URL)
|
void |
hideAllLabels()
Hide all labels (vertice names). |
boolean |
isshowEdgesPossible()
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. |
void |
refreshCluster()
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 vertice 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 |
setBackColor(java.awt.Color back)
set backColor |
void |
setBlackCircle(boolean bc)
set blackCircle |
void |
setColorToAll(java.awt.Color color)
Set a color to all vertices Call-back method, invoked from within ScreenDisplay. |
void |
setGraphData(GraphData layout)
Sets the local graph representation (layout) to a new value. |
void |
setshowEdges(boolean se)
set showEdges |
void |
showAllLabels()
Show all labels (vertices and edges names). |
void |
showLabel(GraphVertex vertex,
boolean show)
show/hide the name of a vertex |
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 area,
int xCanvasSize,
int yCanvasSize,
int insetleft,
int insetbottom,
float minVert)
Writes the layout on the screen device (DISP output format). |
void |
writeEdge(int index,
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 |
writeGraphicsLayout(int size)
Write graphics layout. |
void |
writeVertex(GraphVertex curVertex,
int xPos,
int yPos,
int zPos,
int radius)
Writes a vertex on screen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ScreenDisplay display
private java.util.Set<java.lang.String>[] xMap
private java.util.Set<java.lang.String>[] yMap
private java.util.Set<java.lang.Integer>[][] edgeMap
private boolean[] edgeAnnot
private java.util.Vector<Cluster> clusters
private java.awt.Color write
private java.lang.String browser
private java.awt.Graphics area
private int insetleft
private int insetbottom
private int xSize
private int ySize
Constructor Detail |
---|
public WriterDataGraphicsDISP(GraphData graph, float minVert, int fontSize, java.awt.Color backColor, boolean blackCircle, boolean showEdges, boolean openURL, boolean anim, java.lang.String inputName, java.lang.String browser)
graph
- Graph representation, contains the positions of the vertices.minVert
- Diameter of the smallest vertex.fontSize
- Font size of vertex annotations.backColor
- Background color.blackCircle
- If true, draw black circle around each vertex.showEdges
- If true, draw the edges between the vertices (if possible).anim
- If true, the layout is already displayed
while the minimizer is still improving it,
and a simple mouse click on the canvas
updates the current layout on the screen.
If false, the layout is displayed only after
minimization is completed.inputName
- the windows titleopenURL
- is Opening nodes as url allowedbrowser
- the browser cmdMethod Detail |
---|
public void write()
write
in class WriterDataGraphics
public void writeGraphicsLayout(int size)
writeGraphicsLayout
in class WriterDataGraphics
size
- Size of output area (e.g., number of pixel).public void writeDISP(int size, java.awt.Graphics area, int xCanvasSize, int yCanvasSize, int insetleft, int insetbottom, float minVert)
ScreenDisplay
.
size
- Size of the output drawing quare.area
- The drawing area of the canvas.xCanvasSize
- Width of the canvas.yCanvasSize
- Height of the canvas.insetleft
- Left inset of the drawing frame.public void writeVertex(GraphVertex curVertex, int xPos, int yPos, int zPos, int radius)
writeVertex
in class WriterDataGraphics
curVertex
- 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(int index, int xPos1, int yPos1, int zPos1, int xPos2, int yPos2, int zPos2)
writeEdge
in class WriterDataGraphics
index
- index of the 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 void showAllLabels()
public void setColorToAll(java.awt.Color color)
public void hideAllLabels()
public void showLabel(GraphVertex vertex, boolean show)
vertex
- a vertexpublic 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 void setGraphData(GraphData layout)
layout
- Graph/layout representation to switch to.public GraphData getGraphData()
public ScreenDisplay getDisplay()
public void setBlackCircle(boolean bc)
public boolean getshowEdges()
public boolean isshowEdgesPossible()
public void setshowEdges(boolean se)
public boolean getBlackCircle()
public void setBackColor(java.awt.Color back)
public void addCluster(Cluster clt)
clt
- public void removeCluster(int index)
index
- public Cluster getCluster(int index)
index
-
public Cluster getCluster(java.lang.String name)
name
-
public int getNbOfCluster()
public void moveClusterUp(int index)
index
- public void moveClusterDown(int index)
index
- public void refreshCluster()
public java.awt.Color getWriteColor()
public void openURL(java.awt.Point p)
p
- Coordinatesprivate boolean guessBrowser(java.lang.String URL)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |