org.jzy3d.plot3d.primitives.graphs
Class AbstractDrawableGraph2d<V,E>
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.AbstractDrawable
-
- org.jzy3d.plot3d.primitives.graphs.AbstractDrawableGraph2d<V,E>
-
- All Implemented Interfaces:
- IDrawableGraph2d<V,E>, IGLRenderer, ISortableDraw
- Direct Known Subclasses:
- DefaultDrawableGraph2d
public abstract class AbstractDrawableGraph2d<V,E> extends AbstractDrawable implements IDrawableGraph2d<V,E>
An implementation based onPickableobjects should register mapping between vertex model and vertex representation throughPickSupport.registerPickableObject(IPickable pickable, V v)Registration should be done by overriding setGraphModel. One can later listen to picking events through:PickSupport.addVertexPickListener(IVertexPickListenerlistener)
-
-
Constructor Summary
Constructors Constructor and Description AbstractDrawableGraph2d()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclearHighlighted()voiddraw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Call OpenGL2 routines for rendering the object.IGraphFormatter<V,E>getGraphFormatter()IGraphLayout2d<V>getGraphLayout()IGraph<V,E>getGraphModel()Coord3dgetLabelSceneOffset()Coord2dgetLabelScreenOffset()booleanisEdgeHighlighted(E e)booleanisVertexHighlighted(V v)voidsetGraphFormatter(IGraphFormatter<V,E> formatter)voidsetGraphLayout(IGraphLayout2d<V> layout)voidsetGraphModel(IGraph<V,E> graph)voidsetGraphModel(IGraph<V,E> graph, PickingSupport picking)voidsetLabelSceneOffset(Coord3d labelSceneOffset)voidsetLabelScreenOffset(Coord2d labelOffset)voidsetVertexHighlighted(V v, boolean nodeDisplayed)-
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, applyGeometryTransform, dispose, doTransform, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString, updateBounds
-
-
-
-
Method Detail
-
getGraphFormatter
public IGraphFormatter<V,E> getGraphFormatter()
- Specified by:
getGraphFormatterin interfaceIDrawableGraph2d<V,E>
-
getGraphLayout
public IGraphLayout2d<V> getGraphLayout()
- Specified by:
getGraphLayoutin interfaceIDrawableGraph2d<V,E>
-
getGraphModel
public IGraph<V,E> getGraphModel()
- Specified by:
getGraphModelin interfaceIDrawableGraph2d<V,E>
-
setGraphFormatter
public void setGraphFormatter(IGraphFormatter<V,E> formatter)
- Specified by:
setGraphFormatterin interfaceIDrawableGraph2d<V,E>
-
setGraphLayout
public void setGraphLayout(IGraphLayout2d<V> layout)
- Specified by:
setGraphLayoutin interfaceIDrawableGraph2d<V,E>
-
setGraphModel
public void setGraphModel(IGraph<V,E> graph, PickingSupport picking)
- Specified by:
setGraphModelin interfaceIDrawableGraph2d<V,E>
-
setGraphModel
public void setGraphModel(IGraph<V,E> graph)
- Specified by:
setGraphModelin interfaceIDrawableGraph2d<V,E>
-
draw
public void draw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Description copied from class:AbstractDrawableCall OpenGL2 routines for rendering the object.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classAbstractDrawable- Parameters:
gl- GL2 contextglu- GLU contextcam- a reference to a shooting Camera.
-
getLabelScreenOffset
public Coord2d getLabelScreenOffset()
-
setLabelScreenOffset
public void setLabelScreenOffset(Coord2d labelOffset)
-
getLabelSceneOffset
public Coord3d getLabelSceneOffset()
-
setLabelSceneOffset
public void setLabelSceneOffset(Coord3d labelSceneOffset)
-
isEdgeHighlighted
public boolean isEdgeHighlighted(E e)
- Specified by:
isEdgeHighlightedin interfaceIDrawableGraph2d<V,E>
-
isVertexHighlighted
public boolean isVertexHighlighted(V v)
- Specified by:
isVertexHighlightedin interfaceIDrawableGraph2d<V,E>
-
setVertexHighlighted
public void setVertexHighlighted(V v, boolean nodeDisplayed)
- Specified by:
setVertexHighlightedin interfaceIDrawableGraph2d<V,E>
-
clearHighlighted
public void clearHighlighted()
- Specified by:
clearHighlightedin interfaceIDrawableGraph2d<V,E>
-
-
DMelt 3.0 © DataMelt by jWork.ORG