|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.bpmn.view.EventPortConfiguration
An adapter class that allows existing NodeRealizer
implementations to be used for NodePort
visualization.
This class is used to visualize attached events of BPMN activity nodes.
EventPortSupport
Nested Class Summary | |
static interface |
EventPortConfiguration.EventProvider
Provides the node realizer that has to be used as visual representation of node ports that use EventPortConfiguration . |
static class |
EventPortConfiguration.UserDataEventProvider
EventProvider that retrieves the visual representation
of a node port from the port's user data. |
Constructor Summary | |
EventPortConfiguration(EventPortConfiguration.EventProvider eventProvider)
Initializes an new EventPortConfiguration instance that
queries the specified event provider for the node realizer to
visualize node ports. |
Method Summary | |
boolean |
contains(NodePort port,
double x,
double y)
|
YRectangle |
getBounds(NodePort port)
|
EventPortConfiguration.EventProvider |
getEventProvider()
Returns the event provider used by this configuration. |
YPoint |
getRatio()
Returns the ratio that is used to determine the edge connection point with respect to the NodePort s bounds.
|
void |
paint(NodePort port,
Graphics2D g)
|
void |
setRatio(double x,
double y)
Specifies the ratio that is used to determine the edge connection point with respect to the NodePort s width.
|
void |
setRatio(YPoint ratio)
Specifies the ratio that is used to determine the edge connection point with respect to the NodePort s width.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventPortConfiguration(EventPortConfiguration.EventProvider eventProvider)
EventPortConfiguration
instance that
queries the specified event provider for the node realizer to
visualize node ports.
eventProvider
- the event provider used by this configuration.Method Detail |
public EventPortConfiguration.EventProvider getEventProvider()
EventPortConfiguration(EventPortConfiguration.EventProvider)
public YPoint getRatio()
NodePort
s bounds.
A x/y value of 0
means the edge connection point is at the
left/top border of the NodePort
's visual representation;
a x/y value of 0.5
means the edge connection point is in the
center of the NodePort
's visual representation;
and a x/y value of 1
means the edge connection point is at the
right/bottom border of the NodePort
's visual representation.
By default, this property is set to (0.5,0.5)
.
setRatio(y.geom.YPoint)
,
setRatio(double, double)
public void setRatio(YPoint ratio)
NodePort
s width.
A x/y value of 0
means the edge connection point is at the
left/top border of the NodePort
's visual representation;
a x/y value of 0.5
means the edge connection point is in the
center of the NodePort
's visual representation;
and a x/y value of 1
means the edge connection point is at the
right/bottom border of the NodePort
's visual representation.
By default, this property is set to (0.5,0.5)
.
ratio
- a value in [0,1]^2.
IllegalArgumentException
- if x/y is less than 0
,
larger than 1
, or NaN
.getRatio()
,
setRatio(double, double)
public void setRatio(double x, double y)
NodePort
s width.
Calling this method is equivalent to
setRatio(new YPoint(x, y))
x
- a value in [0,1].y
- a value in [0,1].
IllegalArgumentException
- if x/y is less than 0
,
larger than 1
, or NaN
.getRatio()
,
setRatio(double, double)
public YRectangle getBounds(NodePort port)
getBounds
in interface NodePort.BoundsProvider
public boolean contains(NodePort port, double x, double y)
contains
in interface NodePort.ContainsTest
public void paint(NodePort port, Graphics2D g)
paint
in interface NodePort.Painter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |