@OpenApiAll public class ShapeRenderer extends PresentationElementRenderer
ShapeElement
.PresentationElementRenderer
,
PathElementRenderer
Constructor and Description |
---|
ShapeRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
calculateMinimumSize(ShapeElement presentationElement,
java.awt.Dimension minimumSize)
Calculate the minimum shape size of the given shape element.
|
void |
calculatePreferredSize(ShapeElement shapeElement,
java.awt.Dimension prefSize)
Calculate the shape element preferred size.
|
ContainerShape |
createBoundingShape(ShapeElement shapeElement,
PathElement pathElement)
Deprecated.
|
ContainerShape |
createBoundingShape(ShapeElement shapeElement,
PathElement pathElement,
BoundsTransformation data)
Returns the shape element boundaries where the path will be connected.
|
void |
draw(java.awt.Graphics g,
PresentationElement presentationElement)
Draws the symbol using the predifined drawing pattern.
|
java.awt.Dimension |
getDefaultSize(ShapeElement shapeElement)
Return default shape element size used during symbol drawing.
|
protected void |
updateText(PresentationElement presentationElement)
Update shape text.
|
afterUpdate, beforeUpdate, getCenterlinePoint, getColor, getFontProvider, getText, propertiesChanged
public void draw(java.awt.Graphics g, PresentationElement presentationElement)
g
- graphics where shape is drawn.presentationElement
- presentation element to draw.public void calculateMinimumSize(ShapeElement presentationElement, java.awt.Dimension minimumSize)
presentationElement
- minimum size of.minimumSize
- calculated minimum size.public void calculatePreferredSize(ShapeElement shapeElement, java.awt.Dimension prefSize)
shapeElement
- preferred size of.prefSize
- calculated prefered size.public java.awt.Dimension getDefaultSize(ShapeElement shapeElement)
shapeElement
- @Deprecated public ContainerShape createBoundingShape(ShapeElement shapeElement, PathElement pathElement)
shapeElement
- shape to calculate boundaries of.pathElement
- path connecting.createBoundingShape(ShapeElement, com.nomagic.magicdraw.uml.symbols.paths.PathElement, com.nomagic.magicdraw.uml.symbols.BoundsTransformation)
public ContainerShape createBoundingShape(ShapeElement shapeElement, PathElement pathElement, BoundsTransformation data)
shapeElement
- shape to calculate boundaries of.pathElement
- path connecting.data
- bounds transformation dataprotected final void updateText(PresentationElement presentationElement)
updateText
in class PresentationElementRenderer
presentationElement
-