public class DefaultDecisionRequirementsDiagramCanvas extends Object
DefaultDecisionRequirementsDiagramGenerator| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultDecisionRequirementsDiagramCanvas.SHAPE_TYPE |
| Modifier and Type | Field and Description |
|---|---|
protected String |
activityFontName |
protected static Font |
ANNOTATION_FONT |
protected String |
annotationFontName |
protected static int |
ARROW_WIDTH |
protected int |
canvasHeight |
protected int |
canvasWidth |
protected boolean |
closed |
protected static Color |
CONNECTION_COLOR |
protected ClassLoader |
customClassLoader |
protected static BufferedImage |
DECISION_IMAGE |
protected BufferedImage |
decisionRequirementsDiagram |
protected static int |
FONT_SIZE |
protected static int |
FONT_SPACING |
protected FontMetrics |
fontMetrics |
protected Graphics2D |
g |
protected static Color |
HIGHLIGHT_COLOR |
protected static int |
ICON_PADDING |
protected static Color |
LABEL_COLOR |
protected static Font |
LABEL_FONT |
protected String |
labelFontName |
protected static org.slf4j.Logger |
LOGGER |
protected static int |
MARKER_WIDTH |
protected int |
minX |
protected int |
minY |
protected static Color |
TASK_BORDER_COLOR |
protected static Color |
TASK_BOX_COLOR |
protected static int |
TEXT_PADDING |
protected static Stroke |
THICK_TASK_BORDER_STROKE |
| Constructor and Description |
|---|
DefaultDecisionRequirementsDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType)
Creates an empty canvas with given width and height.
|
DefaultDecisionRequirementsDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType,
String activityFontName,
String labelFontName,
String annotationFontName,
ClassLoader customClassLoader)
Creates an empty canvas with given width and height.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the canvas which disallows further drawing and releases graphical resources.
|
List<GraphicInfo> |
connectionPerfectionizer(DefaultDecisionRequirementsDiagramCanvas.SHAPE_TYPE sourceShapeType,
DefaultDecisionRequirementsDiagramCanvas.SHAPE_TYPE targetShapeType,
GraphicInfo sourceGraphicInfo,
GraphicInfo targetGraphicInfo,
List<GraphicInfo> graphicInfoList)
This method makes coordinates of connection flow better.
|
void |
drawArrowHead(Line2D.Double line,
double scaleFactor) |
void |
drawConnection(int[] xPoints,
int[] yPoints,
String connectionType,
double scaleFactor) |
void |
drawDecision(BufferedImage icon,
String name,
GraphicInfo graphicInfo,
double scaleFactor) |
protected void |
drawDecision(String name,
GraphicInfo graphicInfo,
boolean thickBorder,
double scaleFactor) |
void |
drawDecision(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawDecisionService(String name,
GraphicInfo graphicInfo,
List<GraphicInfo> dividerGraphicInfos,
double scaleFactor) |
void |
drawHighLight(int x,
int y,
int width,
int height) |
void |
drawInformationRequirement(int[] xPoints,
int[] yPoints,
double scaleFactor) |
protected void |
drawMultilineAnnotationText(String text,
int x,
int y,
int boxWidth,
int boxHeight) |
protected void |
drawMultilineCentredText(String text,
int x,
int y,
int boxWidth,
int boxHeight) |
protected void |
drawMultilineText(String text,
int x,
int y,
int boxWidth,
int boxHeight,
boolean centered) |
protected String |
fitTextToWidth(String original,
int width) |
BufferedImage |
generateBufferedImage(String imageType)
Generates an image of what currently is drawn on the canvas.
|
InputStream |
generateImage(String imageType)
Generates an image of what currently is drawn on the canvas.
|
void |
initialize(String imageType) |
protected static final org.slf4j.Logger LOGGER
protected static final int ARROW_WIDTH
protected static final int MARKER_WIDTH
protected static final int FONT_SIZE
protected static final int FONT_SPACING
protected static final int TEXT_PADDING
protected static final Color TASK_BOX_COLOR
protected static final Color CONNECTION_COLOR
protected static final Color HIGHLIGHT_COLOR
protected static final Color LABEL_COLOR
protected static final Color TASK_BORDER_COLOR
protected static Font LABEL_FONT
protected static Font ANNOTATION_FONT
protected static final Stroke THICK_TASK_BORDER_STROKE
protected static final int ICON_PADDING
protected static BufferedImage DECISION_IMAGE
protected int canvasWidth
protected int canvasHeight
protected int minX
protected int minY
protected BufferedImage decisionRequirementsDiagram
protected Graphics2D g
protected FontMetrics fontMetrics
protected boolean closed
protected ClassLoader customClassLoader
protected String activityFontName
protected String labelFontName
protected String annotationFontName
public DefaultDecisionRequirementsDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType,
String activityFontName,
String labelFontName,
String annotationFontName,
ClassLoader customClassLoader)
public DefaultDecisionRequirementsDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType)
minX - Hint that will be used when generating the image. Parts that fall below minX on the horizontal scale will be cropped.minY - Hint that will be used when generating the image. Parts that fall below minX on the horizontal scale will be cropped.public void initialize(String imageType)
public InputStream generateImage(String imageType)
FlowableImageException when close() is already called.public BufferedImage generateBufferedImage(String imageType)
FlowableImageException when close() is already called.public void close()
public void drawInformationRequirement(int[] xPoints,
int[] yPoints,
double scaleFactor)
public void drawConnection(int[] xPoints,
int[] yPoints,
String connectionType,
double scaleFactor)
public void drawArrowHead(Line2D.Double line, double scaleFactor)
public void drawDecision(BufferedImage icon, String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawDecision(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawDecisionService(String name, GraphicInfo graphicInfo, List<GraphicInfo> dividerGraphicInfos, double scaleFactor)
protected void drawDecision(String name, GraphicInfo graphicInfo, boolean thickBorder, double scaleFactor)
protected void drawMultilineCentredText(String text, int x, int y, int boxWidth, int boxHeight)
protected void drawMultilineAnnotationText(String text, int x, int y, int boxWidth, int boxHeight)
protected void drawMultilineText(String text, int x, int y, int boxWidth, int boxHeight, boolean centered)
public void drawHighLight(int x,
int y,
int width,
int height)
public List<GraphicInfo> connectionPerfectionizer(DefaultDecisionRequirementsDiagramCanvas.SHAPE_TYPE sourceShapeType, DefaultDecisionRequirementsDiagramCanvas.SHAPE_TYPE targetShapeType, GraphicInfo sourceGraphicInfo, GraphicInfo targetGraphicInfo, List<GraphicInfo> graphicInfoList)
sourceShapeType - targetShapeType - sourceGraphicInfo - targetGraphicInfo - graphicInfoList - Copyright © 2021 Flowable. All rights reserved.