com.yworks.yfiles.bpmn.view
Class AbstractBpmnPainter

java.lang.Object
  extended byy.view.AbstractCustomNodePainter
      extended bycom.yworks.yfiles.bpmn.view.AbstractBpmnPainter
All Implemented Interfaces:
GenericNodeRealizer.ContainsTest, GenericNodeRealizer.Painter
Direct Known Subclasses:
BpmnActivityPainter, BpmnArtifactPainter, BpmnChoreographyPainter, BpmnConversationPainter, BpmnEventPainter, BpmnGatewayPainter, BpmnIconDecorator

public abstract class AbstractBpmnPainter
extends AbstractCustomNodePainter
implements GenericNodeRealizer.ContainsTest

Base class for BPMN painter/contains test implementations. The following "well-known" style properties may be used to adjust the painter's color scheme:

 

Field Summary
static String ICON_FILL_COLOR
          Style property key for fill color of BPMN icons.
static String ICON_FILL_COLOR2
          Style property key for second fill color of BPMN icons.
static String ICON_LINE_COLOR
          Style property key for line color of BPMN icons.
 
Method Summary
 boolean contains(NodeRealizer context, double x, double y)
          Checks whether or not the visualization produced by this painter for the specified realizer contains the specified point.
protected  Paint getFillPaint(NodeRealizer context, boolean selected)
           
 double getPaintIconThreshold()
          Returns the size threshold for displaying the inner icon of this painter.
protected  void paintNode(NodeRealizer context, Graphics2D graphics, boolean sloppy)
          Paints the node represented by the specified context realizer.
 void setPaintIconThreshold(double threshold)
          Specifies the size threshold for displaying the inner icon of this painter.
 
Methods inherited from class y.view.AbstractCustomNodePainter
backupGraphics, createSelectionColor, getFillColor, getFillColor2, getLineColor, getLinePaint, getLineStroke, initializeFill, initializeLine, paint, paintHotSpots, paintPorts, paintSloppy, paintText, restoreGraphics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_LINE_COLOR

public static final String ICON_LINE_COLOR
Style property key for line color of BPMN icons.

See Also:
Constant Field Values

ICON_FILL_COLOR

public static final String ICON_FILL_COLOR
Style property key for fill color of BPMN icons.

See Also:
Constant Field Values

ICON_FILL_COLOR2

public static final String ICON_FILL_COLOR2
Style property key for second fill color of BPMN icons.

See Also:
Constant Field Values
Method Detail

getPaintIconThreshold

public double getPaintIconThreshold()
Returns the size threshold for displaying the inner icon of this painter. I.e. the width or height of a node that is visualized by this painter is less than the returned value, this painter's inner icon is not displayed.

Returns:
the size threshold for displaying the inner icon of this painter.
See Also:
setPaintIconThreshold(double)

setPaintIconThreshold

public void setPaintIconThreshold(double threshold)
Specifies the size threshold for displaying the inner icon of this painter. I.e. the width or height of a node that is visualized by this painter is less than the specified value, this painter's inner icon is not displayed.

Parameters:
threshold - the size threshold for displaying the inner icon of this painter.
See Also:
getPaintIconThreshold()

paintNode

protected void paintNode(NodeRealizer context,
                         Graphics2D graphics,
                         boolean sloppy)
Paints the node represented by the specified context realizer.


contains

public boolean contains(NodeRealizer context,
                        double x,
                        double y)
Checks whether or not the visualization produced by this painter for the specified realizer contains the specified point.

Specified by:
contains in interface GenericNodeRealizer.ContainsTest

getFillPaint

protected Paint getFillPaint(NodeRealizer context,
                             boolean selected)


© Copyright 2010-2014,
yWorks GmbH.
All rights reserved.