|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.swingViewer.GraphRendererBase
org.graphstream.ui.swingViewer.basicRenderer.SwingBasicGraphRenderer
public class SwingBasicGraphRenderer
A very simple view of the graph that respect only a subset of CSS.
This is a minimal implementation of a renderer that only supports a subset of the CSS :
Constructor Summary | |
---|---|
SwingBasicGraphRenderer()
|
Method Summary | |
---|---|
ArrayList<GraphicElement> |
allNodesOrSpritesIn(double x1,
double y1,
double x2,
double y2)
Search for all the nodes and sprites contained inside the rectangle (x1,y1)-(x2,y2). |
void |
close()
|
void |
elementStyleChanged(Element element,
StyleGroup oldStyle,
StyleGroup style)
The style of the element changed. |
GraphicElement |
findNodeOrSpriteAt(double x,
double y)
Search for the first node or sprite (in that order) that contains the point at coordinates (x, y). |
Camera |
getCamera()
Get a camera object to provide control commands on the view. |
void |
moveElementAtPx(GraphicElement element,
double x,
double y)
Force an element to move at the given location in pixels. |
void |
open(GraphicGraph graph,
Container renderingSurface)
|
void |
render(Graphics2D g,
int width,
int height)
Redisplay or update the graph. |
void |
screenshot(String filename,
int width,
int height)
|
void |
setBackLayerRenderer(LayerRenderer renderer)
Set a layer renderer that will be called each time the graph needs to be redrawn before the graph is rendered. |
void |
setForeLayoutRenderer(LayerRenderer renderer)
Set a layer renderer that will be called each time the graph needs to be redrawn after the graph is rendered. |
Methods inherited from class org.graphstream.ui.swingViewer.GraphRendererBase |
---|
beginSelectionAt, endSelectionAt, getRenderingSurface, selectionGrowsAt |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwingBasicGraphRenderer()
Method Detail |
---|
public void open(GraphicGraph graph, Container renderingSurface)
open
in interface GraphRenderer
open
in class GraphRendererBase
public void close()
close
in interface GraphRenderer
close
in class GraphRendererBase
public Camera getCamera()
GraphRenderer
public ArrayList<GraphicElement> allNodesOrSpritesIn(double x1, double y1, double x2, double y2)
GraphRenderer
x1
- The rectangle lowest point abscissa.y1
- The rectangle lowest point ordinate.x2
- The rectangle highest point abscissa.y2
- The rectangle highest point ordinate.
public GraphicElement findNodeOrSpriteAt(double x, double y)
GraphRenderer
x
- The point abscissa.y
- The point ordinate.
public void render(Graphics2D g, int width, int height)
GraphRenderer
public void moveElementAtPx(GraphicElement element, double x, double y)
GraphRenderer
element
- The element.x
- The requested position abscissa in pixels.y
- The requested position ordinate in pixels.public void screenshot(String filename, int width, int height)
public void setBackLayerRenderer(LayerRenderer renderer)
GraphRenderer
renderer
- The renderer (or null to remove it).public void setForeLayoutRenderer(LayerRenderer renderer)
GraphRenderer
renderer
- The renderer (or null to remove it).public void elementStyleChanged(Element element, StyleGroup oldStyle, StyleGroup style)
StyleGroupListener
element
- The element.oldStyle
- The old style.style
- The changed style or the new style of the element.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |