public class DefaultCaseDiagramCanvas extends Object
DefaultCaseDiagramGenerator| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCaseDiagramCanvas.SHAPE_TYPE |
| Modifier and Type | Field and Description |
|---|---|
protected String |
activityFontName |
protected static Font |
ANNOTATION_FONT |
protected static int |
ANNOTATION_TEXT_PADDING |
protected String |
annotationFontName |
protected static int |
ARROW_WIDTH |
protected static Stroke |
ASSOCIATION_STROKE |
protected int |
canvasHeight |
protected int |
canvasWidth |
protected BufferedImage |
caseDiagram |
protected static BufferedImage |
CASETASK_IMAGE |
protected boolean |
closed |
protected static Color |
CONDITIONAL_INDICATOR_COLOR |
protected static int |
CONDITIONAL_INDICATOR_WIDTH |
protected static Color |
CONNECTION_COLOR |
protected ClassLoader |
customClassLoader |
protected static BufferedImage |
DECISIONTASK_IMAGE |
protected static int |
DEFAULT_INDICATOR_WIDTH |
protected static Color |
EVENT_BORDER_COLOR |
protected static Color |
EVENT_COLOR |
protected static int |
FONT_SIZE |
protected static int |
FONT_SPACING |
protected FontMetrics |
fontMetrics |
protected Graphics2D |
g |
protected static Stroke |
GATEWAY_TYPE_STROKE |
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 int |
LINE_HEIGHT |
protected static org.slf4j.Logger |
LOGGER |
protected static int |
MARKER_WIDTH |
protected int |
minX |
protected int |
minY |
protected static BufferedImage |
PROCESSTASK_IMAGE |
protected static BufferedImage |
SERVICETASK_IMAGE |
protected static Color |
STAGE_BORDER_COLOR |
protected static Color |
SUBPROCESS_BOX_COLOR |
protected static Color |
TASK_BORDER_COLOR |
protected static Color |
TASK_BOX_COLOR |
protected static int |
TEXT_PADDING |
protected static Stroke |
THICK_TASK_BORDER_STROKE |
protected static BufferedImage |
TIMER_IMAGE |
protected static BufferedImage |
USERLISTENER_IMAGE |
protected static BufferedImage |
USERTASK_IMAGE |
| Constructor and Description |
|---|
DefaultCaseDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType)
Creates an empty canvas with given width and height.
|
DefaultCaseDiagramCanvas(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(DefaultCaseDiagramCanvas.SHAPE_TYPE sourceShapeType,
DefaultCaseDiagramCanvas.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 |
drawAssociation(int[] xPoints,
int[] yPoints,
double scaleFactor) |
void |
drawCaseTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawConnection(int[] xPoints,
int[] yPoints,
String connectionType,
double scaleFactor) |
void |
drawCriterion(GraphicInfo graphicInfo,
boolean fillShape) |
void |
drawDecisionTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawEntryCriterion(GraphicInfo graphicInfo) |
void |
drawEventListener(GraphicInfo graphicInfo,
BufferedImage image,
double scaleFactor) |
void |
drawExitCriterion(GraphicInfo graphicInfo) |
void |
drawGenericEventListener(GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawHighLight(int x,
int y,
int width,
int height) |
protected void |
drawMilestone(String name,
GraphicInfo graphicInfo,
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) |
void |
drawProcessTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawServiceTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawStage(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawTask(BufferedImage icon,
String name,
GraphicInfo graphicInfo,
double scaleFactor) |
protected void |
drawTask(String name,
GraphicInfo graphicInfo,
boolean thickBorder,
double scaleFactor) |
void |
drawTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawTimerEventListener(GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawUserEventListener(GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawUserTask(String name,
GraphicInfo graphicInfo,
double scaleFactor) |
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 CONDITIONAL_INDICATOR_WIDTH
protected static final int DEFAULT_INDICATOR_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 int ANNOTATION_TEXT_PADDING
protected static final int LINE_HEIGHT
protected static Color TASK_BOX_COLOR
protected static Color SUBPROCESS_BOX_COLOR
protected static Color EVENT_COLOR
protected static Color CONNECTION_COLOR
protected static Color CONDITIONAL_INDICATOR_COLOR
protected static Color HIGHLIGHT_COLOR
protected static Color LABEL_COLOR
protected static Color TASK_BORDER_COLOR
protected static Color STAGE_BORDER_COLOR
protected static Color EVENT_BORDER_COLOR
protected static Font LABEL_FONT
protected static Font ANNOTATION_FONT
protected static Stroke THICK_TASK_BORDER_STROKE
protected static Stroke GATEWAY_TYPE_STROKE
protected static Stroke ASSOCIATION_STROKE
protected static int ICON_PADDING
protected static BufferedImage TIMER_IMAGE
protected static BufferedImage USERLISTENER_IMAGE
protected static BufferedImage USERTASK_IMAGE
protected static BufferedImage SERVICETASK_IMAGE
protected static BufferedImage CASETASK_IMAGE
protected static BufferedImage PROCESSTASK_IMAGE
protected static BufferedImage DECISIONTASK_IMAGE
protected int canvasWidth
protected int canvasHeight
protected int minX
protected int minY
protected BufferedImage caseDiagram
protected Graphics2D g
protected FontMetrics fontMetrics
protected boolean closed
protected ClassLoader customClassLoader
protected String activityFontName
protected String labelFontName
protected String annotationFontName
public DefaultCaseDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType,
String activityFontName,
String labelFontName,
String annotationFontName,
ClassLoader customClassLoader)
public DefaultCaseDiagramCanvas(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 drawAssociation(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 drawGenericEventListener(GraphicInfo graphicInfo, double scaleFactor)
public void drawTimerEventListener(GraphicInfo graphicInfo, double scaleFactor)
public void drawUserEventListener(GraphicInfo graphicInfo, double scaleFactor)
public void drawEventListener(GraphicInfo graphicInfo, BufferedImage image, double scaleFactor)
public void drawTask(BufferedImage icon, String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawStage(String name, GraphicInfo graphicInfo, double scaleFactor)
protected void drawTask(String name, GraphicInfo graphicInfo, boolean thickBorder, double scaleFactor)
protected void drawMilestone(String name, GraphicInfo graphicInfo, 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 drawUserTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawServiceTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawCaseTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawProcessTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawDecisionTask(String name, GraphicInfo graphicInfo, double scaleFactor)
public void drawCriterion(GraphicInfo graphicInfo, boolean fillShape)
public void drawEntryCriterion(GraphicInfo graphicInfo)
public void drawExitCriterion(GraphicInfo graphicInfo)
public void drawHighLight(int x,
int y,
int width,
int height)
public List<GraphicInfo> connectionPerfectionizer(DefaultCaseDiagramCanvas.SHAPE_TYPE sourceShapeType, DefaultCaseDiagramCanvas.SHAPE_TYPE targetShapeType, GraphicInfo sourceGraphicInfo, GraphicInfo targetGraphicInfo, List<GraphicInfo> graphicInfoList)
sourceShapeType - targetShapeType - sourceGraphicInfo - targetGraphicInfo - graphicInfoList - Copyright © 2019 Flowable. All rights reserved.