public class DefaultProcessDiagramCanvas extends Object
DefaultProcessDiagramGenerator| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultProcessDiagramCanvas.SHAPE_TYPE |
| Constructor and Description |
|---|
DefaultProcessDiagramCanvas(int width,
int height,
int minX,
int minY)
Creates an empty canvas with given width and height.
|
DefaultProcessDiagramCanvas(int width,
int height,
int minX,
int minY,
String activityFontName,
String labelFontName,
String annotationFontName)
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<GraphicInfo> |
connectionPerfectionizer(DefaultProcessDiagramCanvas.SHAPE_TYPE sourceShapeType,
DefaultProcessDiagramCanvas.SHAPE_TYPE targetShapeType,
GraphicInfo sourceGraphicInfo,
GraphicInfo targetGraphicInfo,
List<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) |
void |
drawAssociation(int[] xPoints,
int[] yPoints,
AssociationDirection associationDirection,
boolean highLighted) |
void |
drawBusinessRuleTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawCatchingCompensateEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingCompensateEvent(String id,
String name,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingErrorEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingErrorEvent(String id,
String name,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting,
IconType icon,
String eventType) |
void |
drawCatchingMessageEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingMessageEvent(String id,
String name,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingSignalEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingSignalEvent(String id,
String name,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingTimerEvent(String id,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCatchingTimerEvent(String id,
String name,
GraphicInfo graphicInfo,
boolean isInterrupting) |
void |
drawCollapsedCallActivity(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawCollapsedMarker(int x,
int y,
int width,
int height) |
void |
drawCollapsedSubProcess(String id,
String name,
GraphicInfo graphicInfo,
Boolean isTriggeredByEvent) |
protected void |
drawCollapsedTask(String id,
String name,
GraphicInfo graphicInfo,
boolean thickBorder) |
void |
drawConditionalSequenceFlowIndicator(Line2D.Double line) |
void |
drawConnection(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
String connectionType,
AssociationDirection associationDirection,
boolean highLighted) |
void |
drawDefaultSequenceFlowIndicator(Line2D.Double line) |
void |
drawErrorEndEvent(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawErrorStartEvent(String id,
GraphicInfo graphicInfo) |
void |
drawEventBasedGateway(String id,
GraphicInfo graphicInfo) |
void |
drawExclusiveGateway(String id,
GraphicInfo graphicInfo) |
void |
drawExpandedSubProcess(String id,
String name,
GraphicInfo graphicInfo,
Boolean isTriggeredByEvent) |
void |
drawGateway(GraphicInfo graphicInfo) |
void |
drawHighLight(int x,
int y,
int width,
int height) |
void |
drawInclusiveGateway(String id,
GraphicInfo graphicInfo) |
void |
drawLabel(String text,
GraphicInfo graphicInfo) |
void |
drawLabel(String text,
GraphicInfo graphicInfo,
boolean centered) |
void |
drawManualTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawMessageStartEvent(String id,
GraphicInfo graphicInfo) |
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(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawNoneStartEvent(String id,
GraphicInfo graphicInfo) |
void |
drawParallelGateway(String id,
GraphicInfo graphicInfo) |
void |
drawPoolOrLane(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawReceiveTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawScriptTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawSendTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawSequenceflow(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
boolean highLighted) |
void |
drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional) |
void |
drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted) |
void |
drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional) |
void |
drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted) |
void |
drawServiceTask(String id,
String name,
GraphicInfo graphicInfo) |
void |
drawSignalStartEvent(String id,
GraphicInfo graphicInfo) |
void |
drawStartEvent(String id,
GraphicInfo graphicInfo,
IconType icon) |
void |
drawTask(String id,
String name,
GraphicInfo graphicInfo) |
protected void |
drawTask(String id,
String name,
GraphicInfo graphicInfo,
boolean thickBorder) |
void |
drawTask(TaskIconType icon,
String id,
String name,
GraphicInfo graphicInfo) |
void |
drawTextAnnotation(String id,
String text,
GraphicInfo graphicInfo) |
void |
drawThrowingCompensateEvent(String id,
GraphicInfo graphicInfo) |
void |
drawThrowingNoneEvent(String id,
GraphicInfo graphicInfo) |
void |
drawThrowingSignalEvent(String id,
GraphicInfo graphicInfo) |
void |
drawTimerStartEvent(String id,
GraphicInfo graphicInfo) |
void |
drawUserTask(String id,
String name,
GraphicInfo graphicInfo) |
protected String |
fitTextToWidth(String original,
int width) |
InputStream |
generateImage()
Generates an image of what currently is drawn on the canvas.
|
void |
initialize() |
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 TaskIconType USERTASK_IMAGE
protected static TaskIconType SCRIPTTASK_IMAGE
protected static TaskIconType SERVICETASK_IMAGE
protected static TaskIconType RECEIVETASK_IMAGE
protected static TaskIconType SENDTASK_IMAGE
protected static TaskIconType MANUALTASK_IMAGE
protected static TaskIconType BUSINESS_RULE_TASK_IMAGE
protected static IconType TIMER_IMAGE
protected static IconType COMPENSATE_THROW_IMAGE
protected static IconType COMPENSATE_CATCH_IMAGE
protected static IconType ERROR_THROW_IMAGE
protected static IconType ERROR_CATCH_IMAGE
protected static IconType MESSAGE_CATCH_IMAGE
protected static IconType SIGNAL_CATCH_IMAGE
protected static IconType SIGNAL_THROW_IMAGE
protected int canvasWidth
protected int canvasHeight
protected int minX
protected int minY
protected ProcessDiagramSVGGraphics2D g
protected FontMetrics fontMetrics
protected boolean closed
protected String activityFontName
protected String labelFontName
protected String annotationFontName
public DefaultProcessDiagramCanvas(int width,
int height,
int minX,
int minY,
String activityFontName,
String labelFontName,
String annotationFontName)
Allows to specify minimal boundaries on the left and upper side of the canvas. This is useful for diagrams that have white space there. Everything beneath these minimum values will be cropped. It's also possible to pass a specific font name and a class loader for the icon images.
public DefaultProcessDiagramCanvas(int width,
int height,
int minX,
int minY)
Allows to specify minimal boundaries on the left and upper side of the canvas. This is useful for diagrams that have white space there (eg Signavio). Everything beneath these minimum values will be cropped.
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()
public InputStream generateImage()
Throws an ActivitiImageException when close() is already
called.
public void close()
public void drawNoneStartEvent(String id, GraphicInfo graphicInfo)
public void drawTimerStartEvent(String id, GraphicInfo graphicInfo)
public void drawSignalStartEvent(String id, GraphicInfo graphicInfo)
public void drawMessageStartEvent(String id, GraphicInfo graphicInfo)
public void drawStartEvent(String id, GraphicInfo graphicInfo, IconType icon)
public void drawNoneEndEvent(String id, String name, GraphicInfo graphicInfo)
public void drawErrorEndEvent(String id, String name, GraphicInfo graphicInfo)
public void drawErrorStartEvent(String id, GraphicInfo graphicInfo)
public void drawCatchingEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting, IconType icon, String eventType)
public void drawCatchingCompensateEvent(String id, String name, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingCompensateEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingTimerEvent(String id, String name, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingTimerEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingErrorEvent(String id, String name, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingErrorEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingSignalEvent(String id, String name, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingSignalEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingMessageEvent(String id, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawCatchingMessageEvent(String id, String name, GraphicInfo graphicInfo, boolean isInterrupting)
public void drawThrowingCompensateEvent(String id, GraphicInfo graphicInfo)
public void drawThrowingSignalEvent(String id, GraphicInfo graphicInfo)
public void drawThrowingNoneEvent(String id, GraphicInfo graphicInfo)
public void drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional)
public void drawSequenceflow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted)
public void drawAssociation(int[] xPoints,
int[] yPoints,
AssociationDirection associationDirection,
boolean highLighted)
public void drawSequenceflow(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
boolean highLighted)
public void drawConnection(int[] xPoints,
int[] yPoints,
boolean conditional,
boolean isDefault,
String connectionType,
AssociationDirection associationDirection,
boolean highLighted)
public void drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional)
public void drawSequenceflowWithoutArrow(int srcX,
int srcY,
int targetX,
int targetY,
boolean conditional,
boolean highLighted)
public void drawArrowHead(Line2D.Double line)
public void drawDefaultSequenceFlowIndicator(Line2D.Double line)
public void drawConditionalSequenceFlowIndicator(Line2D.Double line)
public void drawTask(TaskIconType icon, String id, String name, GraphicInfo graphicInfo)
public void drawTask(String id, String name, GraphicInfo graphicInfo)
public void drawPoolOrLane(String id, String name, GraphicInfo graphicInfo)
protected void drawTask(String id, String name, 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 id, String name, GraphicInfo graphicInfo)
public void drawScriptTask(String id, String name, GraphicInfo graphicInfo)
public void drawServiceTask(String id, String name, GraphicInfo graphicInfo)
public void drawReceiveTask(String id, String name, GraphicInfo graphicInfo)
public void drawSendTask(String id, String name, GraphicInfo graphicInfo)
public void drawManualTask(String id, String name, GraphicInfo graphicInfo)
public void drawBusinessRuleTask(String id, String name, GraphicInfo graphicInfo)
public void drawExpandedSubProcess(String id, String name, GraphicInfo graphicInfo, Boolean isTriggeredByEvent)
public void drawCollapsedSubProcess(String id, String name, GraphicInfo graphicInfo, Boolean isTriggeredByEvent)
public void drawCollapsedCallActivity(String id, String name, GraphicInfo graphicInfo)
protected void drawCollapsedTask(String id, String name, 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(GraphicInfo graphicInfo)
public void drawParallelGateway(String id, GraphicInfo graphicInfo)
public void drawExclusiveGateway(String id, GraphicInfo graphicInfo)
public void drawInclusiveGateway(String id, GraphicInfo graphicInfo)
public void drawEventBasedGateway(String id, GraphicInfo graphicInfo)
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 drawTextAnnotation(String id, String text, GraphicInfo graphicInfo)
public void drawLabel(String text, GraphicInfo graphicInfo)
public void drawLabel(String text, GraphicInfo graphicInfo, boolean centered)
public List<GraphicInfo> connectionPerfectionizer(DefaultProcessDiagramCanvas.SHAPE_TYPE sourceShapeType, DefaultProcessDiagramCanvas.SHAPE_TYPE targetShapeType, GraphicInfo sourceGraphicInfo, GraphicInfo targetGraphicInfo, List<GraphicInfo> graphicInfoList)
sourceShapeType - targetShapeType - sourceGraphicInfo - targetGraphicInfo - graphicInfoList - Copyright © 2010–2017 Alfresco. All rights reserved.