|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.PortConfigurationAdapter
public class PortConfigurationAdapter
An adapter class that allows existing implementations of
GenericNodeRealizer.Painter,
GenericNodeRealizer.IntersectionTest, and
GenericNodeRealizer.ContainsTest to be reused in
NodePort configurations.
| Constructor Summary | |
|---|---|
PortConfigurationAdapter(Map implementations)
Initializes a new PortConfigurationAdapter instance. |
|
| Method Summary | |
|---|---|
boolean |
contains(NodePort port,
double x,
double y)
Returns true if the specified port contains the specified
point and false otherwise. |
boolean |
findIntersection(NodePort port,
double ix,
double iy,
double ox,
double oy,
Point2D result)
Returns true |
Color |
getFillColor()
Returns the main color that is used to fill the interior of NodePorts. |
Color |
getFillColor2()
Returns the gradient color that is used to fill the interior of NodePorts. |
Color |
getLineColor()
Returns the color that is used to draw the border of NodePorts. |
LineType |
getLineType()
Returns the line type that is used to draw the border of NodePorts. |
boolean |
isPortSelectionAware()
Determines whether or not the NodePort selection state
should be taken into account when delegating painting to the adopted
GenericNodeRealizer.Painter implementation. |
void |
paint(NodePort port,
Graphics2D g)
Paints the specified port. |
void |
setFillColor(Color fillColor)
Specifies the main color that is used to fill the interior of NodePorts. |
void |
setFillColor2(Color fillColor2)
Specifies the gradient color that is used to fill the interior of NodePorts. |
void |
setLineColor(Color lineColor)
Specifies the color that is used to draw the border of NodePorts. |
void |
setLineType(LineType lineType)
Specifies the line type that is used to draw the border of NodePorts. |
void |
setPortSelectionAware(boolean aware)
Specifies whether or not the NodePort selection state
should be taken into account when delegating painting to the adopted
GenericNodeRealizer.Painter implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortConfigurationAdapter(Map implementations)
PortConfigurationAdapter instance.
implementations - interface implementations for
GenericNodeRealizer.Painter,
GenericNodeRealizer.IntersectionTest, and/or
GenericNodeRealizer.ContainsTest.| Method Detail |
|---|
public boolean isPortSelectionAware()
NodePort selection state
should be taken into account when delegating painting to the adopted
GenericNodeRealizer.Painter implementation.
true if the NodePort selection state
is taken into account for painting and false otherwise.setPortSelectionAware(boolean)public void setPortSelectionAware(boolean aware)
NodePort selection state
should be taken into account when delegating painting to the adopted
GenericNodeRealizer.Painter implementation.
aware - if true, the NodePort selection
state is taken into account for painting; otherwise it is not.isPortSelectionAware()
public boolean contains(NodePort port,
double x,
double y)
NodePort.ContainsTesttrue if the specified port contains the specified
point and false otherwise.
Callback method for NodePort.contains(double, double).
contains in interface NodePort.ContainsTestport - the port instance to check.x - the x-coordinate of the point to check.y - the y-coordinate of the point to check.
true if the specified port contains the specified
point and false otherwise.
public void paint(NodePort port,
Graphics2D g)
NodePort.Painter
Callback method for NodePort.paint(java.awt.Graphics2D).
paint in interface NodePort.Painterport - the port instance to paint.g - the graphics context to paint upon.
public boolean findIntersection(NodePort port,
double ix,
double iy,
double ox,
double oy,
Point2D result)
NodePort.IntersectionTesttrue if the point i=(ix,iy) lies inside
and the point o=(ox,oy) lies outside the specified port
and false< otherwise.
Callback method for
NodePort.findIntersection(double, double, double, double, java.awt.geom.Point2D).
- Specified by:
findIntersection in interface NodePort.IntersectionTest
- Parameters:
port - the port instance to check.ix - the x-coordinate of the point that has to lie inside the port.iy - the y-coordinate of the point that has to lie inside the port.ox - the x-coordinate of the point that has to lie outside the port.oy - the y-coordinate of the point that has to lie outside the port.result - an output parameter to store the intersection of the line
segment through i and o and the port.
If this method returns false, the value of this parameter is
undefined.
- Returns:
true if (ix,iy) lies inside and
(ox,oy) lies outside the specified port and
false< otherwise.
public Color getFillColor()
NodePorts.
NodePorts.setFillColor(java.awt.Color),
getFillColor2(),
setFillColor2(java.awt.Color)public void setFillColor(Color fillColor)
NodePorts.
fillColor - the main color that is used to fill the interior of
NodePorts.getFillColor(),
getFillColor2(),
setFillColor2(java.awt.Color)public Color getFillColor2()
NodePorts.
NodePorts.setFillColor2(java.awt.Color),
getFillColor(),
setFillColor(java.awt.Color)public void setFillColor2(Color fillColor2)
NodePorts.
fillColor2 - the gradient color that is used to fill the interior of
NodePorts.getFillColor2(),
getFillColor(),
setFillColor(java.awt.Color)public Color getLineColor()
NodePorts.
NodePorts.setLineColor(java.awt.Color)public void setLineColor(Color lineColor)
NodePorts.
lineColor - the color that is used to draw the border of
NodePorts.getLineColor()public LineType getLineType()
NodePorts.
NodePorts.setLineType(LineType)public void setLineType(LineType lineType)
NodePorts.
lineType - the line type that is used to draw the border of
NodePorts.getLineType()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||