Package org.graphstream.ui.swing
Class BackendJ2D
java.lang.Object
org.graphstream.ui.swing.BackendJ2D
- All Implemented Interfaces:
Backend
,org.graphstream.ui.view.camera.Backend
public class BackendJ2D extends java.lang.Object implements Backend
-
Constructor Summary
Constructors Constructor Description BackendJ2D()
-
Method Summary
Modifier and Type Method Description void
beginTransform()
Shape
chooseEdgeArrowShape(Shape oldShape, org.graphstream.ui.graphicGraph.StyleGroup group)
Shape
chooseEdgeShape(Shape oldShape, org.graphstream.ui.graphicGraph.StyleGroup group)
GraphBackgroundRenderer
chooseGraphBackgroundRenderer()
Shape
chooseNodeShape(Shape oldShape, org.graphstream.ui.graphicGraph.StyleGroup group)
Shape
chooseSpriteShape(Shape oldShape, org.graphstream.ui.graphicGraph.StyleGroup group)
void
close()
Called after finished using this object.java.awt.Container
drawingSurface()
The drawing surface.void
endTransform()
java.awt.Graphics2D
graphics2D()
The Java2D graphics.org.graphstream.ui.geom.Point3
inverseTransform(double x, double y, double z)
org.graphstream.ui.geom.Point3
inverseTransform(org.graphstream.ui.geom.Point3 p)
void
open(java.awt.Container drawingSurface)
Called before any prior use of this back-end.void
popTransform()
void
prepareNewFrame(java.awt.Graphics2D g)
Setup the back-end for a new rendering session.void
pushTransform()
void
rotate(double angle, double ax, double ay, double az)
void
scale(double sx, double sy, double sz)
void
setAntialias(java.lang.Boolean on)
void
setGraphics2D(java.awt.Graphics2D g)
void
setIdentity()
void
setQuality(java.lang.Boolean on)
org.graphstream.ui.geom.Point3
transform(double x, double y, double z)
org.graphstream.ui.geom.Point3
transform(org.graphstream.ui.geom.Point3 p)
void
translate(double tx, double ty, double tz)
-
Constructor Details
-
BackendJ2D
public BackendJ2D()
-
-
Method Details
-
setGraphics2D
public void setGraphics2D(java.awt.Graphics2D g) -
open
public void open(java.awt.Container drawingSurface)Description copied from interface:Backend
Called before any prior use of this back-end. -
close
public void close()Description copied from interface:Backend
Called after finished using this object. -
prepareNewFrame
public void prepareNewFrame(java.awt.Graphics2D g)Description copied from interface:Backend
Setup the back-end for a new rendering session.- Specified by:
prepareNewFrame
in interfaceBackend
-
transform
public org.graphstream.ui.geom.Point3 transform(double x, double y, double z)- Specified by:
transform
in interfaceorg.graphstream.ui.view.camera.Backend
-
inverseTransform
public org.graphstream.ui.geom.Point3 inverseTransform(double x, double y, double z)- Specified by:
inverseTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
transform
public org.graphstream.ui.geom.Point3 transform(org.graphstream.ui.geom.Point3 p)- Specified by:
transform
in interfaceorg.graphstream.ui.view.camera.Backend
-
inverseTransform
public org.graphstream.ui.geom.Point3 inverseTransform(org.graphstream.ui.geom.Point3 p)- Specified by:
inverseTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
pushTransform
public void pushTransform()- Specified by:
pushTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
beginTransform
public void beginTransform()- Specified by:
beginTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
setIdentity
public void setIdentity()- Specified by:
setIdentity
in interfaceorg.graphstream.ui.view.camera.Backend
-
translate
public void translate(double tx, double ty, double tz)- Specified by:
translate
in interfaceorg.graphstream.ui.view.camera.Backend
-
rotate
public void rotate(double angle, double ax, double ay, double az)- Specified by:
rotate
in interfaceorg.graphstream.ui.view.camera.Backend
-
scale
public void scale(double sx, double sy, double sz)- Specified by:
scale
in interfaceorg.graphstream.ui.view.camera.Backend
-
endTransform
public void endTransform()- Specified by:
endTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
popTransform
public void popTransform()- Specified by:
popTransform
in interfaceorg.graphstream.ui.view.camera.Backend
-
setAntialias
public void setAntialias(java.lang.Boolean on)- Specified by:
setAntialias
in interfaceorg.graphstream.ui.view.camera.Backend
-
setQuality
public void setQuality(java.lang.Boolean on)- Specified by:
setQuality
in interfaceorg.graphstream.ui.view.camera.Backend
-
graphics2D
public java.awt.Graphics2D graphics2D()Description copied from interface:Backend
The Java2D graphics.- Specified by:
graphics2D
in interfaceBackend
-
chooseNodeShape
- Specified by:
chooseNodeShape
in interfaceBackend
-
chooseEdgeShape
- Specified by:
chooseEdgeShape
in interfaceBackend
-
chooseEdgeArrowShape
public Shape chooseEdgeArrowShape(Shape oldShape, org.graphstream.ui.graphicGraph.StyleGroup group)- Specified by:
chooseEdgeArrowShape
in interfaceBackend
-
chooseSpriteShape
- Specified by:
chooseSpriteShape
in interfaceBackend
-
chooseGraphBackgroundRenderer
- Specified by:
chooseGraphBackgroundRenderer
in interfaceBackend
-
drawingSurface
public java.awt.Container drawingSurface()Description copied from interface:Backend
The drawing surface. The drawing surface may be different than the one passed as argument to open(), the back-end is free to create a new surface as it sees fit.- Specified by:
drawingSurface
in interfaceBackend
-