Interface Shape
- All Known Implementing Classes:
AngleShape
,AreaConnectorShape
,AreaOnConnectorShape
,AreaShape
,ArrowOnEdge
,BlobShape
,CircleOnEdge
,CircleShape
,ConnectorShape
,CrossShape
,CubicCurveShape
,DiamondOnEdge
,DiamondShape
,FreePlaneEdgeShape
,FreePlaneNodeShape
,HorizontalSquareEdgeShape
,ImageOnEdge
,LineConnectorShape
,LineShape
,LSquareEdgeShape
,OrientableRectangularAreaShape
,OrientableSquareShape
,PieChartShape
,PolygonalShape
,PolygonShape
,PolylineEdgeShape
,RectangularAreaShape
,RoundedSquareShape
,SpriteArrowShape
,SpriteFlowShape
,SquareShape
,TriangleShape
public interface Shape
Base for all shapes.
-
Method Summary
Modifier and Type Method Description void
configureForElement(Backend backend, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton, org.graphstream.ui.view.camera.DefaultCamera2D camera)
Configure all the dynamic and per element settings.void
configureForGroup(Backend backend, org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)
Configure as much as possible the graphics before painting several version of this shape at different positions.void
make(Backend backend, org.graphstream.ui.view.camera.DefaultCamera2D camera)
Must create the shape from informations given earlier, that is, resize it if needed and position it, and do all the things that are specific to each element, and cannot be done for the group of elements.void
makeShadow(Backend backend, org.graphstream.ui.view.camera.DefaultCamera2D camera)
Same as#make(Camera)
for the shadow shape.void
render(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton)
Render the shape for the given element.void
renderShadow(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton)
Render the shape shadow for the given element.
-
Method Details
-
configureForGroup
void configureForGroup(Backend backend, org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)Configure as much as possible the graphics before painting several version of this shape at different positions.- Parameters:
backend
- The rendering back-end.style
- The style for the group.camera
- the view parameters.
-
configureForElement
void configureForElement(Backend backend, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton, org.graphstream.ui.view.camera.DefaultCamera2D camera)Configure all the dynamic and per element settings. Some configurations can only be done before painting the element, since they change for each element.- Parameters:
backend
- The rendering back-end.element
- The specific element to render.skeleton
- The element geometry and information.camera
- the view parameters.
-
make
Must create the shape from informations given earlier, that is, resize it if needed and position it, and do all the things that are specific to each element, and cannot be done for the group of elements. This method is made to be called inside the render() method, hence it is protected.- Parameters:
backend
- The rendering back-end.camera
- the view parameters.
-
makeShadow
Same as#make(Camera)
for the shadow shape. The shadow shape may be moved and resized compared to the original shape. This method is made to be called inside the renderShadow() method, hence it is protected. -
render
void render(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton)Render the shape for the given element.- Parameters:
backend
- The rendering back-end.camera
- The view parameters.element
- The element to render.skeleton
- The element geometry and information.
-
renderShadow
void renderShadow(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element, Skeleton skeleton)Render the shape shadow for the given element. The shadow is rendered in a different pass than usual rendering, therefore it is a separate method.
-