Class DefaultVertexRenderer
java.lang.Object
org.cristalise.kernel.graph.renderer.DefaultVertexRenderer
- All Implemented Interfaces:
VertexRenderer
- Direct Known Subclasses:
ActivityDefRenderer,ActivityRenderer,AggregationMemberRenderer,DefaultSplitJoinRenderer
Default vertex renderer implementing VertexRenderer. Use it as is or as a base class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g2d, Vertex vertex) Default implementation draws the outline and the name of the vertexvoiddrawLinesOfTexts(Graphics2D g2d, Vertex vertex, ArrayList<String> linesOfText, Paint textPaint) Draw lines of text within the boundaries of the vertexvoiddrawName(Graphics2D g2d, Vertex vertex, Paint textPaint) Write the name of the vertex in the centre of itvoiddrawOutline(Graphics2D g2d, Vertex vertex, Paint fillPaint, Paint linePaint) Fill and then draw the outline as a PolygonvoiddrawOutline3DRect(Graphics2D g2d, Vertex vertex, Paint fillPaint) Fills the outline as 3D rectangle, but it does not draw the border of the outlinevoiddrawOutline3DRect(Graphics2D g2d, Vertex vertex, Paint fillPaint, Paint linePaint) Fills the outline as 3D rectangle.voiddrawOutlineRect(Graphics2D g2d, Vertex vertex, Paint fillPaint) Fills the outline as rectangle, but it does not draw the border of the outlinevoiddrawOutlineRect(Graphics2D g2d, Vertex vertex, Paint fillPaint, Paint linePaint) Fills the outline as rectangle.voiddrawText(Graphics2D g2d, Vertex vertex, String text, Paint textPaint) Draw the text within the boundaries of the vertex
-
Field Details
-
FILL_PAINT
-
LINE_PAINT
-
TEXT_PAINT
-
ERROR_PAINT
-
-
Constructor Details
-
DefaultVertexRenderer
public DefaultVertexRenderer()
-
-
Method Details
-
draw
Default implementation draws the outline and the name of the vertex- Specified by:
drawin interfaceVertexRenderer- Parameters:
g2d- the canvas to draw onvertex- the vertex to be draw
-
drawOutline
Fill and then draw the outline as a Polygon- Parameters:
g2d- the canvasvertex- the vertex to be drawn
-
drawOutline3DRect
Fills the outline as 3D rectangle, but it does not draw the border of the outline- Parameters:
g2d- the canvasvertex- the vertex to be drawnfillPaint- the fill color
-
drawOutline3DRect
Fills the outline as 3D rectangle. It draws the border of the outline if linePaint is not null- Parameters:
g2d- the canvasvertex- the vertex to be drawnfillPaint- the fill colorlinePaint- the color of the line, can be null
-
drawOutlineRect
Fills the outline as rectangle, but it does not draw the border of the outline- Parameters:
g2d- the canvasvertex- the vertex to be drawnfillPaint- the fill color
-
drawOutlineRect
Fills the outline as rectangle. It draws the border of the outline if linePaint is not null- Parameters:
g2d- the canvasvertex- the vertex to be drawnfillPaint- the fill colorlinePaint- the color of the line, can be null
-
drawText
Draw the text within the boundaries of the vertex- Parameters:
g2d- the canvasvertex- the vertex in which the text is drawntext- the text to drawtextPaint- the color of the text
-
drawName
Write the name of the vertex in the centre of it- Parameters:
g2d- the canvasvertex- the vertex in which the name is drawn
-
drawLinesOfTexts
public void drawLinesOfTexts(Graphics2D g2d, Vertex vertex, ArrayList<String> linesOfText, Paint textPaint) Draw lines of text within the boundaries of the vertex- Parameters:
g2d- the canvasvertex- the vertex for which the text to be drawnlinesOfText- lines of the texttextPaint- the color of the text
-