public class DefaultProcessDiagramCanvas extends Object
org.activiti.engine.impl.bpmn.diagram.DefaultProcessDiagramGenerator
Modifier and Type | Class and Description |
---|---|
static class |
DefaultProcessDiagramCanvas.SHAPE_TYPE |
Constructor and Description |
---|
DefaultProcessDiagramCanvas(int width,
int height,
int minX,
int minY,
String imageType)
Creates an empty canvas with given width and height.
|
DefaultProcessDiagramCanvas(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 dissallows further drawing and releases graphical
resources.
|
List<org.activiti.bpmn.model.GraphicInfo> |
connectionPerfectionizer(DefaultProcessDiagramCanvas.SHAPE_TYPE sourceShapeType,
DefaultProcessDiagramCanvas.SHAPE_TYPE targetShapeType,
org.activiti.bpmn.model.GraphicInfo sourceGraphicInfo,
org.activiti.bpmn.model.GraphicInfo targetGraphicInfo,
List<org.activiti.bpmn.model.GraphicInfo> graphicInfoList)
This method makes coordinates of connection flow better.
|
void |
drawActivityMarkers(int x,
int y,
int width,
int height,
boolean multiInstanceSequential,
boolean multiInstanceParallel,
boolean collapsed) |
void |
drawArrowHead(Line2D.Double line,
double scaleFactor) |
void |
drawAssociation(int[] xPoints,
int[] yPoints,
org.activiti.bpmn.model.AssociationDirection associationDirection,
boolean highLighted,
double scaleFactor) |
void |
drawBusinessRuleTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawCamelTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawCatchingCompensateEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingCompensateEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingErrorEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingErrorEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
BufferedImage image,
String eventType,
double scaleFactor) |
void |
drawCatchingMessageEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingMessageEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingSignalEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingSignalEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingTimerEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCatchingTimerEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean isInterrupting,
double scaleFactor) |
void |
drawCollapsedCallActivity(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawCollapsedMarker(int x,
int y,
int width,
int height) |
void |
drawCollapsedSubProcess(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
Boolean isTriggeredByEvent) |
protected void |
drawCollapsedTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean thickBorder) |
void |
drawConditionalSequenceFlowIndicator(Line2D.Double line,
double scaleFactor) |
void |
drawConnection(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
String connectionType,
org.activiti.bpmn.model.AssociationDirection associationDirection,
boolean highLighted,
double scaleFactor) |
void |
drawDefaultSequenceFlowIndicator(Line2D.Double line,
double scaleFactor) |
void |
drawErrorEndEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawErrorEndEvent(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawErrorStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawEventBasedGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawExclusiveGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawExpandedSubProcess(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
Boolean isTriggeredByEvent,
double scaleFactor) |
void |
drawGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawHighLight(int x,
int y,
int width,
int height) |
void |
drawHighLight(int x,
int y,
int width,
int height,
Color color) |
void |
drawInclusiveGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawLabel(String text,
org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawLabel(String text,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean centered) |
void |
drawManualTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawMessageStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawMuleTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawMultiInstanceMarker(boolean sequential,
int x,
int y,
int width,
int height) |
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 |
drawNoneEndEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawNoneStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawParallelGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawPoolOrLane(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawReceiveTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawScriptTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawSendTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawSequenceflow(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
boolean highLighted,
double scaleFactor) |
void |
drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted,
double scaleFactor) |
void |
drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
double scaleFactor) |
void |
drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted,
double scaleFactor) |
void |
drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
double scaleFactor) |
void |
drawServiceTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawSignalStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
BufferedImage image,
double scaleFactor) |
void |
drawTask(BufferedImage icon,
String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo) |
protected void |
drawTask(String name,
org.activiti.bpmn.model.GraphicInfo graphicInfo,
boolean thickBorder) |
void |
drawTextAnnotation(String text,
org.activiti.bpmn.model.GraphicInfo graphicInfo) |
void |
drawThrowingCompensateEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawThrowingNoneEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawThrowingSignalEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawTimerStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo,
double scaleFactor) |
void |
drawUserTask(String name,
org.activiti.bpmn.model.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 EVENT_BORDER_COLOR
protected static Color SUBPROCESS_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 END_EVENT_STROKE
protected static Stroke MULTI_INSTANCE_STROKE
protected static Stroke EVENT_SUBPROCESS_STROKE
protected static Stroke NON_INTERRUPTING_EVENT_STROKE
protected static Stroke HIGHLIGHT_FLOW_STROKE
protected static Stroke ANNOTATION_STROKE
protected static Stroke ASSOCIATION_STROKE
protected static int ICON_PADDING
protected static BufferedImage USERTASK_IMAGE
protected static BufferedImage SCRIPTTASK_IMAGE
protected static BufferedImage SERVICETASK_IMAGE
protected static BufferedImage RECEIVETASK_IMAGE
protected static BufferedImage SENDTASK_IMAGE
protected static BufferedImage MANUALTASK_IMAGE
protected static BufferedImage BUSINESS_RULE_TASK_IMAGE
protected static BufferedImage SHELL_TASK_IMAGE
protected static BufferedImage MULE_TASK_IMAGE
protected static BufferedImage CAMEL_TASK_IMAGE
protected static BufferedImage TIMER_IMAGE
protected static BufferedImage COMPENSATE_THROW_IMAGE
protected static BufferedImage COMPENSATE_CATCH_IMAGE
protected static BufferedImage ERROR_THROW_IMAGE
protected static BufferedImage ERROR_CATCH_IMAGE
protected static BufferedImage MESSAGE_THROW_IMAGE
protected static BufferedImage MESSAGE_CATCH_IMAGE
protected static BufferedImage SIGNAL_CATCH_IMAGE
protected static BufferedImage SIGNAL_THROW_IMAGE
protected int canvasWidth
protected int canvasHeight
protected int minX
protected int minY
protected BufferedImage processDiagram
protected Graphics2D g
protected FontMetrics fontMetrics
protected boolean closed
protected ClassLoader customClassLoader
protected String activityFontName
protected String labelFontName
protected String annotationFontName
public DefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader)
public DefaultProcessDiagramCanvas(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)
ActivitiException
when close()
is already
called.public BufferedImage generateBufferedImage(String imageType)
ActivitiException
when close()
is already
called.public void close()
public void drawNoneStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo)
public void drawTimerStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawSignalStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawMessageStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, BufferedImage image, double scaleFactor)
public void drawNoneEndEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawErrorEndEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawErrorEndEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawErrorStartEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawCatchingEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, BufferedImage image, String eventType, double scaleFactor)
public void drawCatchingCompensateEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingCompensateEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingTimerEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingTimerEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingErrorEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingErrorEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingSignalEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingSignalEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingMessageEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawCatchingMessageEvent(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean isInterrupting, double scaleFactor)
public void drawThrowingCompensateEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawThrowingSignalEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawThrowingNoneEvent(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawSequenceflow(int srcX, int srcY, int targetX, int targetY, boolean conditional, double scaleFactor)
public void drawSequenceflow(int srcX, int srcY, int targetX, int targetY, boolean conditional, boolean highLighted, double scaleFactor)
public void drawAssociation(int[] xPoints, int[] yPoints, org.activiti.bpmn.model.AssociationDirection associationDirection, boolean highLighted, double scaleFactor)
public void drawSequenceflow(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, boolean highLighted, double scaleFactor)
public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType, org.activiti.bpmn.model.AssociationDirection associationDirection, boolean highLighted, double scaleFactor)
public void drawSequenceflowWithoutArrow(int srcX, int srcY, int targetX, int targetY, boolean conditional, double scaleFactor)
public void drawSequenceflowWithoutArrow(int srcX, int srcY, int targetX, int targetY, boolean conditional, boolean highLighted, double scaleFactor)
public void drawArrowHead(Line2D.Double line, double scaleFactor)
public void drawDefaultSequenceFlowIndicator(Line2D.Double line, double scaleFactor)
public void drawConditionalSequenceFlowIndicator(Line2D.Double line, double scaleFactor)
public void drawTask(BufferedImage icon, String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo)
public void drawPoolOrLane(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo)
protected void drawTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean thickBorder)
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, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawScriptTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawServiceTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawReceiveTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawSendTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawManualTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawBusinessRuleTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawCamelTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawMuleTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawExpandedSubProcess(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, Boolean isTriggeredByEvent, double scaleFactor)
public void drawCollapsedSubProcess(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, Boolean isTriggeredByEvent)
public void drawCollapsedCallActivity(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo)
protected void drawCollapsedTask(String name, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean thickBorder)
public void drawCollapsedMarker(int x, int y, int width, int height)
public void drawActivityMarkers(int x, int y, int width, int height, boolean multiInstanceSequential, boolean multiInstanceParallel, boolean collapsed)
public void drawGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo)
public void drawParallelGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawExclusiveGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawInclusiveGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawEventBasedGateway(org.activiti.bpmn.model.GraphicInfo graphicInfo, double scaleFactor)
public void drawMultiInstanceMarker(boolean sequential, int x, int y, int width, int height)
public void drawHighLight(int x, int y, int width, int height)
public void drawHighLight(int x, int y, int width, int height, Color color)
public void drawTextAnnotation(String text, org.activiti.bpmn.model.GraphicInfo graphicInfo)
public void drawLabel(String text, org.activiti.bpmn.model.GraphicInfo graphicInfo)
public void drawLabel(String text, org.activiti.bpmn.model.GraphicInfo graphicInfo, boolean centered)
public List<org.activiti.bpmn.model.GraphicInfo> connectionPerfectionizer(DefaultProcessDiagramCanvas.SHAPE_TYPE sourceShapeType, DefaultProcessDiagramCanvas.SHAPE_TYPE targetShapeType, org.activiti.bpmn.model.GraphicInfo sourceGraphicInfo, org.activiti.bpmn.model.GraphicInfo targetGraphicInfo, List<org.activiti.bpmn.model.GraphicInfo> graphicInfoList)
sourceShapeType
- targetShapeType
- sourceGraphicInfo
- targetGraphicInfo
- graphicInfoList
- Copyright © 2019. All rights reserved.