|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.Port | +--y.view.InterfacePort
Defines a logical end point of an edge relative to the center location of a node. This port can display an icon at the interface between an edge and node.
Field Summary |
Fields inherited from class y.view.Port |
realizer, xoff, yoff |
Constructor Summary | |
InterfacePort()
Constructs a new InterfacePort with default offset 0.0 and
no icon. |
|
InterfacePort(Icon icon)
Constructs a new InterfacePort with default offset 0.0
displaying the given icon at the interface location between node and edge. |
|
InterfacePort(Port port)
Constructs a new InterfacePort as a copy of the given port. |
Method Summary | |
void |
calcUnionRect(Rectangle2D rect,
NodeRealizer r)
Enlarges the given rectangle such that it will contain the complete visual representation of this port. |
boolean |
contains(double x,
double y)
Whether or not the given coordinate lies within this port. |
Port |
createCopy()
Creates and returns a copy of this port. |
boolean |
findIntersection(NodeRealizer r,
double ix,
double iy,
double ox,
double oy,
Point2D result)
Returns true iff the coord (ix,iy)
lies within the visual shape of this port and the
coord (ox,oy> lies outside of that shape.
|
Icon |
getIcon()
Returns the icon associated with this port. |
void |
paint(Graphics2D gfx,
NodeRealizer r)
Paints the icon associated with this port. |
void |
read(ObjectInputStream in)
Reads in a serialized form of a port that was previously written out by the method InterfacePort.write(ObjectOutputStream out) . |
void |
setIcon(Icon icon)
Sets an icon that is displayed at the port location. |
String |
toString()
Returns a string representation of this port. |
void |
write(ObjectOutputStream out)
Writes out this port in a serialized form. |
Methods inherited from class y.view.Port |
createRotatedPort, getOffsetX, getOffsetY, getOwner, getX, getY, setDirty, setOffsets, setOffsetX, setOffsetY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public InterfacePort()
0.0
and
no icon.
public InterfacePort(Icon icon)
0.0
displaying the given icon at the interface location between node and edge.
public InterfacePort(Port port)
Method Detail |
public Port createCopy()
createCopy
in class Port
public void setIcon(Icon icon)
public Icon getIcon()
public void calcUnionRect(Rectangle2D rect, NodeRealizer r)
calcUnionRect
in class Port
r
- The node realizer this port is connected to.public boolean findIntersection(NodeRealizer r, double ix, double iy, double ox, double oy, Point2D result)
true
iff the coord (ix,iy)
lies within the visual shape of this port and the
coord (ox,oy>
lies outside of that shape.
In that case the intersection point of the
line (ix,iy) - (ox,oy)
with that shape
will be stored in the given point.
Method is used for node/edge intersection machinery
findIntersection
in class Port
public void paint(Graphics2D gfx, NodeRealizer r)
paint
in class Port
public boolean contains(double x, double y)
contains
in class Port
public void write(ObjectOutputStream out) throws IOException
write
in class Port
IOException
public void read(ObjectInputStream in) throws IOException, ClassNotFoundException
InterfacePort.write(ObjectOutputStream out)
.
read
in class Port
IOException
ClassNotFoundException
public String toString()
toString
in class Port
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |