|
Search this API | ||||||||
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
public class 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(javax.swing.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(java.awt.geom.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,
java.awt.geom.Point2D result)
Returns true iff the coordinate (ix,iy)
lies within the visual shape of this port and the
coordinate (ox,oy> lies outside of that shape. |
javax.swing.Icon |
getIcon()
Returns the icon associated with this port. |
void |
paint(java.awt.Graphics2D gfx,
NodeRealizer r)
Paints the icon associated with this port. |
void |
read(java.io.ObjectInputStream in)
Deprecated. Use the GraphML format instead. |
void |
setIcon(javax.swing.Icon icon)
Sets an icon that is displayed at the port location. |
java.lang.String |
toString()
Returns a string representation of this port. |
void |
write(java.io.ObjectOutputStream out)
Deprecated. Use the GraphML format instead. |
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(javax.swing.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(javax.swing.Icon icon)
public javax.swing.Icon getIcon()
public void calcUnionRect(java.awt.geom.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, java.awt.geom.Point2D result)
true
iff the coordinate (ix,iy)
lies within the visual shape of this port and the
coordinate (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(java.awt.Graphics2D gfx, NodeRealizer r)
paint
in class Port
public boolean contains(double x, double y)
contains
in class Port
public void write(java.io.ObjectOutputStream out) throws java.io.IOException
GraphML format
instead.
write
in class Port
java.io.IOException
public void read(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
GraphML format
instead.
write(ObjectOutputStream out)
.
read
in class Port
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class Port
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |