Class DefaultProcessDiagramCanvas

    • Field Detail

      • LOGGER

        protected static final org.slf4j.Logger LOGGER
      • CONDITIONAL_INDICATOR_WIDTH

        protected static final int CONDITIONAL_INDICATOR_WIDTH
        See Also:
        Constant Field Values
      • DEFAULT_INDICATOR_WIDTH

        protected static final int DEFAULT_INDICATOR_WIDTH
        See Also:
        Constant Field Values
      • ANNOTATION_TEXT_PADDING

        protected static final int ANNOTATION_TEXT_PADDING
        See Also:
        Constant Field Values
      • TASK_BOX_COLOR

        protected static Color TASK_BOX_COLOR
      • SUBPROCESS_BOX_COLOR

        protected static Color SUBPROCESS_BOX_COLOR
      • EVENT_COLOR

        protected static Color EVENT_COLOR
      • CONNECTION_COLOR

        protected static Color CONNECTION_COLOR
      • CONDITIONAL_INDICATOR_COLOR

        protected static Color CONDITIONAL_INDICATOR_COLOR
      • HIGHLIGHT_CURRENT_COLOR

        protected static Color HIGHLIGHT_CURRENT_COLOR
      • HIGHLIGHT_COMPLETED_ACTIVITY_COLOR

        protected static Color HIGHLIGHT_COMPLETED_ACTIVITY_COLOR
      • HIGHLIGHT_ERRORED_ACTIVITY_COLOR

        protected static Color HIGHLIGHT_ERRORED_ACTIVITY_COLOR
      • LABEL_COLOR

        protected static Color LABEL_COLOR
      • TASK_BORDER_COLOR

        protected static Color TASK_BORDER_COLOR
      • EVENT_BORDER_COLOR

        protected static Color EVENT_BORDER_COLOR
      • SUBPROCESS_BORDER_COLOR

        protected static Color SUBPROCESS_BORDER_COLOR
      • LABEL_FONT

        protected static Font LABEL_FONT
      • ANNOTATION_FONT

        protected static Font ANNOTATION_FONT
      • THICK_TASK_BORDER_STROKE

        protected static Stroke THICK_TASK_BORDER_STROKE
      • GATEWAY_TYPE_STROKE

        protected static Stroke GATEWAY_TYPE_STROKE
      • END_EVENT_STROKE

        protected static Stroke END_EVENT_STROKE
      • MULTI_INSTANCE_STROKE

        protected static Stroke MULTI_INSTANCE_STROKE
      • EVENT_SUBPROCESS_STROKE

        protected static Stroke EVENT_SUBPROCESS_STROKE
      • NON_INTERRUPTING_EVENT_STROKE

        protected static Stroke NON_INTERRUPTING_EVENT_STROKE
      • HIGHLIGHT_FLOW_STROKE

        protected static Stroke HIGHLIGHT_FLOW_STROKE
      • ANNOTATION_STROKE

        protected static Stroke ANNOTATION_STROKE
      • ASSOCIATION_STROKE

        protected static Stroke ASSOCIATION_STROKE
      • ICON_PADDING

        protected static int ICON_PADDING
      • USERTASK_IMAGE

        protected static TaskIconType USERTASK_IMAGE
      • SCRIPTTASK_IMAGE

        protected static TaskIconType SCRIPTTASK_IMAGE
      • SERVICETASK_IMAGE

        protected static TaskIconType SERVICETASK_IMAGE
      • RECEIVETASK_IMAGE

        protected static TaskIconType RECEIVETASK_IMAGE
      • SENDTASK_IMAGE

        protected static TaskIconType SENDTASK_IMAGE
      • MANUALTASK_IMAGE

        protected static TaskIconType MANUALTASK_IMAGE
      • BUSINESS_RULE_TASK_IMAGE

        protected static TaskIconType BUSINESS_RULE_TASK_IMAGE
      • TIMER_IMAGE

        protected static IconType TIMER_IMAGE
      • COMPENSATE_THROW_IMAGE

        protected static IconType COMPENSATE_THROW_IMAGE
      • COMPENSATE_CATCH_IMAGE

        protected static IconType COMPENSATE_CATCH_IMAGE
      • ERROR_THROW_IMAGE

        protected static IconType ERROR_THROW_IMAGE
      • ERROR_CATCH_IMAGE

        protected static IconType ERROR_CATCH_IMAGE
      • MESSAGE_CATCH_IMAGE

        protected static IconType MESSAGE_CATCH_IMAGE
      • SIGNAL_CATCH_IMAGE

        protected static IconType SIGNAL_CATCH_IMAGE
      • SIGNAL_THROW_IMAGE

        protected static IconType SIGNAL_THROW_IMAGE
      • canvasWidth

        protected int canvasWidth
      • canvasHeight

        protected int canvasHeight
      • minX

        protected int minX
      • minY

        protected int minY
      • closed

        protected boolean closed
      • activityFontName

        protected String activityFontName
      • labelFontName

        protected String labelFontName
      • annotationFontName

        protected String annotationFontName
    • Constructor Detail

      • DefaultProcessDiagramCanvas

        public DefaultProcessDiagramCanvas​(int width,
                                           int height,
                                           int minX,
                                           int minY,
                                           String activityFontName,
                                           String labelFontName,
                                           String annotationFontName)
        Creates an empty canvas with given width and height.

        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.

      • DefaultProcessDiagramCanvas

        public DefaultProcessDiagramCanvas​(int width,
                                           int height,
                                           int minX,
                                           int minY)
        Creates an empty canvas with given width and height.

        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.

        Parameters:
        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.
    • Method Detail

      • initialize

        public void initialize()
      • close

        public void close()
        Closes the canvas which dissallows further drawing and releases graphical resources.
      • drawNoneStartEvent

        public void drawNoneStartEvent​(String id,
                                       GraphicInfo graphicInfo)
      • drawTimerStartEvent

        public void drawTimerStartEvent​(String id,
                                        GraphicInfo graphicInfo)
      • drawSignalStartEvent

        public void drawSignalStartEvent​(String id,
                                         GraphicInfo graphicInfo)
      • drawMessageStartEvent

        public void drawMessageStartEvent​(String id,
                                          GraphicInfo graphicInfo)
      • drawErrorStartEvent

        public void drawErrorStartEvent​(String id,
                                        GraphicInfo graphicInfo)
      • drawCatchingCompensateEvent

        public void drawCatchingCompensateEvent​(String id,
                                                String name,
                                                GraphicInfo graphicInfo,
                                                boolean isInterrupting)
      • drawCatchingCompensateEvent

        public void drawCatchingCompensateEvent​(String id,
                                                GraphicInfo graphicInfo,
                                                boolean isInterrupting)
      • drawCatchingTimerEvent

        public void drawCatchingTimerEvent​(String id,
                                           String name,
                                           GraphicInfo graphicInfo,
                                           boolean isInterrupting)
      • drawCatchingTimerEvent

        public void drawCatchingTimerEvent​(String id,
                                           GraphicInfo graphicInfo,
                                           boolean isInterrupting)
      • drawCatchingErrorEvent

        public void drawCatchingErrorEvent​(String id,
                                           String name,
                                           GraphicInfo graphicInfo,
                                           boolean isInterrupting)
      • drawCatchingErrorEvent

        public void drawCatchingErrorEvent​(String id,
                                           GraphicInfo graphicInfo,
                                           boolean isInterrupting)
      • drawCatchingSignalEvent

        public void drawCatchingSignalEvent​(String id,
                                            String name,
                                            GraphicInfo graphicInfo,
                                            boolean isInterrupting)
      • drawCatchingSignalEvent

        public void drawCatchingSignalEvent​(String id,
                                            GraphicInfo graphicInfo,
                                            boolean isInterrupting)
      • drawCatchingMessageEvent

        public void drawCatchingMessageEvent​(String id,
                                             GraphicInfo graphicInfo,
                                             boolean isInterrupting)
      • drawCatchingMessageEvent

        public void drawCatchingMessageEvent​(String id,
                                             String name,
                                             GraphicInfo graphicInfo,
                                             boolean isInterrupting)
      • drawThrowingCompensateEvent

        public void drawThrowingCompensateEvent​(String id,
                                                GraphicInfo graphicInfo)
      • drawThrowingSignalEvent

        public void drawThrowingSignalEvent​(String id,
                                            GraphicInfo graphicInfo)
      • drawThrowingNoneEvent

        public void drawThrowingNoneEvent​(String id,
                                          GraphicInfo graphicInfo)
      • drawSequenceflow

        public void drawSequenceflow​(int srcX,
                                     int srcY,
                                     int targetX,
                                     int targetY,
                                     boolean conditional)
      • drawSequenceflow

        public void drawSequenceflow​(int srcX,
                                     int srcY,
                                     int targetX,
                                     int targetY,
                                     boolean conditional,
                                     boolean highLighted)
      • drawAssociation

        public void drawAssociation​(int[] xPoints,
                                    int[] yPoints,
                                    AssociationDirection associationDirection,
                                    boolean highLighted)
      • drawSequenceflow

        public void drawSequenceflow​(int[] xPoints,
                                     int[] yPoints,
                                     boolean conditional,
                                     boolean isDefault,
                                     boolean highLighted)
      • drawConnection

        public void drawConnection​(int[] xPoints,
                                   int[] yPoints,
                                   boolean conditional,
                                   boolean isDefault,
                                   String connectionType,
                                   AssociationDirection associationDirection,
                                   boolean highLighted)
      • drawSequenceflowWithoutArrow

        public void drawSequenceflowWithoutArrow​(int srcX,
                                                 int srcY,
                                                 int targetX,
                                                 int targetY,
                                                 boolean conditional)
      • drawSequenceflowWithoutArrow

        public void drawSequenceflowWithoutArrow​(int srcX,
                                                 int srcY,
                                                 int targetX,
                                                 int targetY,
                                                 boolean conditional,
                                                 boolean highLighted)
      • drawArrowHead

        public void drawArrowHead​(Line2D.Double line)
      • drawDefaultSequenceFlowIndicator

        public void drawDefaultSequenceFlowIndicator​(Line2D.Double line)
      • drawConditionalSequenceFlowIndicator

        public void drawConditionalSequenceFlowIndicator​(Line2D.Double line)
      • drawMultilineCentredText

        protected void drawMultilineCentredText​(String text,
                                                int x,
                                                int y,
                                                int boxWidth,
                                                int boxHeight)
      • drawMultilineAnnotationText

        protected void drawMultilineAnnotationText​(String text,
                                                   int x,
                                                   int y,
                                                   int boxWidth,
                                                   int boxHeight)
      • drawMultilineText

        protected void drawMultilineText​(String text,
                                         int x,
                                         int y,
                                         int boxWidth,
                                         int boxHeight,
                                         boolean centered)
      • fitTextToWidth

        protected String fitTextToWidth​(String original,
                                        int width)
      • drawCollapsedCallActivity

        public void drawCollapsedCallActivity​(String id,
                                              String name,
                                              GraphicInfo graphicInfo)
      • drawCollapsedTask

        protected void drawCollapsedTask​(String id,
                                         String name,
                                         GraphicInfo graphicInfo,
                                         boolean thickBorder)
      • drawCollapsedMarker

        public void drawCollapsedMarker​(int x,
                                        int y,
                                        int width,
                                        int height)
      • drawActivityMarkers

        public void drawActivityMarkers​(int x,
                                        int y,
                                        int width,
                                        int height,
                                        boolean multiInstanceSequential,
                                        boolean multiInstanceParallel,
                                        boolean collapsed)
      • drawGateway

        public void drawGateway​(GraphicInfo graphicInfo)
      • drawGatewayHighLight

        public void drawGatewayHighLight​(GraphicInfo graphicInfo,
                                         Color color)
      • drawGatewayHighLightCompleted

        public void drawGatewayHighLightCompleted​(GraphicInfo graphicInfo)
      • drawGatewayHighLightErrored

        public void drawGatewayHighLightErrored​(GraphicInfo graphicInfo)
      • drawParallelGateway

        public void drawParallelGateway​(String id,
                                        GraphicInfo graphicInfo)
      • drawExclusiveGateway

        public void drawExclusiveGateway​(String id,
                                         GraphicInfo graphicInfo)
      • drawInclusiveGateway

        public void drawInclusiveGateway​(String id,
                                         GraphicInfo graphicInfo)
      • drawEventBasedGateway

        public void drawEventBasedGateway​(String id,
                                          GraphicInfo graphicInfo)
      • drawMultiInstanceMarker

        public void drawMultiInstanceMarker​(boolean sequential,
                                            int x,
                                            int y,
                                            int width,
                                            int height)
      • drawHighLightCurrent

        public void drawHighLightCurrent​(GraphicInfo graphicInfo)
      • drawHighLightCompleted

        public void drawHighLightCompleted​(GraphicInfo graphicInfo)
      • drawHighLightErrored

        public void drawHighLightErrored​(GraphicInfo graphicInfo)
      • drawHighLight

        public void drawHighLight​(GraphicInfo graphicInfo,
                                  Color color)
      • drawEventHighLight

        public void drawEventHighLight​(GraphicInfo graphicInfo,
                                       Color color)
      • drawEventHighLightCompleted

        public void drawEventHighLightCompleted​(GraphicInfo graphicInfo)
      • drawEventHighLightErrored

        public void drawEventHighLightErrored​(GraphicInfo graphicInfo)
      • drawLabel

        public void drawLabel​(String text,
                              GraphicInfo graphicInfo,
                              boolean centered)