public abstract class AbstractGridLayout extends Object implements GraphGridLayoutManager, Runnable
| Constructor and Description |
|---|
AbstractGridLayout(VisualGraph vgraph)
Creates a GraphLayoutManager object, specifying vgraph as the
VisualGraph object to be laid out.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drawLayout()
This method is called to actually paint or draw the layout of the graph.
|
VisualVertex |
generalPosition(List connectedset,
Grid grid)
Lays out the visual vertices of the specified connected set general position,
meaning that only one visual vertex reside on each grid line.
|
boolean |
getDrawgrid()
Determines if the grid is to be drawn.
|
Grid |
getGrid()
Returns the grid object where the visual vertices are laid out.
|
Point |
getStartAt()
Returns the starting position where the grid will be drawn.
|
int |
getXGridDistance()
Returns the distance between horizontal grid lines.
|
int |
getYGridDistance()
Returns the distance between vertical grid lines.
|
boolean |
isInitialized()
Determines if the graph has been initially laid out.
|
void |
layout()
Partial implementation of the layout() method
of GraphLayoutManager.
|
void |
medianPlacement()
Positions all vertices in median placement, starting with the
first vertex in the graph.
|
void |
run() |
void |
setDrawGrid(boolean isdrawgrid)
This method sets or unsets the drawing of the grid
|
void |
setGraphLayoutListener(GraphLayoutListener listener)
Sets the listener object that receives notification whenever a
vertex in the graph is laid out, either intermediately or for its
final position, by the layout manager.
|
void |
setStartAt(Point startAt)
This method sets the point at which the grid starts.
|
void |
setXGridDistance(int xGridDistance)
This method sets the distance between vertical grids
|
void |
setYGridDistance(int yGridDistance)
This method sets the distance between horizontal grids
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEdge, addVertex, removeEdge, removeVertex, routeEdgepublic AbstractGridLayout(VisualGraph vgraph)
public void setStartAt(Point startAt)
setStartAt in interface GraphGridLayoutManagerstartAt - Point object indicating the upper left corner of the grid.public void setXGridDistance(int xGridDistance)
setXGridDistance in interface GraphGridLayoutManagerxGridDistance - Distance between vertical gridspublic void setYGridDistance(int yGridDistance)
setYGridDistance in interface GraphGridLayoutManagerxGridDistance - Distance between horizontal gridspublic void setDrawGrid(boolean isdrawgrid)
setDrawGrid in interface GraphGridLayoutManagerisdrawgrid - Boolean: If true, the grid will be drawn on the next
paint operation. Otherwise, the grid will not be drawn.public Point getStartAt()
getStartAt in interface GraphGridLayoutManagerpublic int getXGridDistance()
getXGridDistance in interface GraphGridLayoutManagerpublic int getYGridDistance()
getYGridDistance in interface GraphGridLayoutManagerpublic boolean getDrawgrid()
getDrawgrid in interface GraphGridLayoutManagerpublic Grid getGrid()
getGrid in interface GraphGridLayoutManagerpublic void setGraphLayoutListener(GraphLayoutListener listener)
listener - The listener object that will received such notifications.
Any previous listener will no longer receive notification.public void layout()
layout in interface GraphLayoutManagerpublic void drawLayout()
GraphLayoutManagerdrawLayout in interface GraphLayoutManagerpublic boolean isInitialized()
isInitialized in interface GraphLayoutManagerpublic VisualVertex generalPosition(List connectedset, Grid grid)
connectedset - List of VisualVertex that are connected to each othergrid - Grid object where the visual vertices in the connected set
will be laid out for general position.public void medianPlacement()
Copyright © 2019 JULIE Lab, Germany. All rights reserved.