|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jfimagine.jfgraph.shape.base.AbstractObject
|
+--com.jfimagine.jfgraph.shape.base.ObjectList
|
+--com.jfimagine.jfgraph.shape.base.PortList
PortList class. A port list is used to manipulate port issues.
| Field Summary | |
static java.lang.String |
XML_PORTLIST
A XML string tag represents a Node List |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.ObjectList |
m_objectList, XML_OBJECTCOUNT, XML_OBJECTLIST |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
PortList()
Constructor for PortList |
|
| Method Summary | |
Port |
addPort(Port port)
Add a new port to port list. |
boolean |
attachPort(Port port)
Attach one of current port list to a specified port of other shape. |
void |
attachRealPort(ObjectList shapeList)
A loadFromStream method should only load an parentId-objectId list of ports attached, So here we use an attachRealPort to ACTUALLY attach some ports to the ports in this list. |
protected AbstractObject |
cloneMe()
Creates a new AbstractObject of the same class and with the same contents as this object. |
boolean |
detachAll()
Detach all ports attached to this port list. |
boolean |
detachPort(Port port)
Detach current port list to a specified port of other shape. |
void |
dividePort(JFPoint startPoint,
JFPoint endPoint,
JFPoint midPoint)
Divide end points pair of all ports by a middle point of end points. |
void |
draw(java.awt.Graphics g)
Draw current object on graphic canvas. |
void |
finishMoveNode(JFPoint newMoveNode,
JFPoint newRefNode1,
JFPoint newRefNode2,
JFPoint newRefNode3)
When finish move node, all of its relational ports will be moved concurrently, |
void |
flipBy(double baseY)
Reverse this object by a y coordinate. |
int |
getIndex(Port port)
Get the index of a port within the list. |
JFPoint |
getMoveNode()
Get the moveNode point. |
int |
getMoveNodeType()
Get type of the moving node. |
JFPoint |
getRefNode1()
Get the refNode1 point. |
JFPoint |
getRefNode2()
Get the refNode2 point. |
JFPoint |
getRefNode3()
Get the refNode3 point. |
void |
mirrorBy(double baseX)
Mirror this object by a x coordinate. |
void |
moveBy(double x,
double y)
Move current object by an x and y offset. |
void |
movePort(JFPoint startPoint,
JFPoint endPoint,
JFPoint newStartPoint,
JFPoint newEndPoint)
Move ports that between the two end points, to two new end points position. |
void |
moveRelationalPorts(ObjectList movedList)
move relational ports. |
Port |
pickPort(double x,
double y)
Pick a port within this port list, according to the current x,y position |
Port |
portIntersects(JFPoint pnt)
Get which port that intersects with point pnt. |
boolean |
removePort(Port port)
Remove a port from this shape. |
void |
rotateBy(double baseX,
double baseY,
double theta)
Rotate current object by a specified point and an angle theta. |
void |
scaleBy(JFPoint basePoint,
double xScale,
double yScale)
Scale current portlist by a specified x and y scale. |
void |
scaleBy(JFPoint center,
JFPoint basePoint,
JFPoint refPoint1,
JFPoint refPoint2,
double scale)
Scale current port list by specified points and scale percent. |
void |
setParent(AbstractObject obj)
Set parent object of each port in the list. |
void |
setParentId(int parentId)
Set parent object id of each port in the list. |
void |
setZoomScale(double zoomScale)
set zoom scale of all ports. |
void |
startMoveNode(JFPoint moveNode,
JFPoint refNode1,
JFPoint refNode2,
JFPoint refNode3,
int nodeType)
When start move node, all of its relational ports will be moved concurrently, so we 'register' a start moving node event here. |
void |
unboundBrokenPorts()
unbound broken ports. |
| Methods inherited from class com.jfimagine.jfgraph.shape.base.ObjectList |
add, add, appendChildToDOM, attachRealPort, bringToFront, clear, clone, contains, equals, extractChildFromDOM, getBounds, getByIndex, getByObjectId, getFromGroupsByObjectId, getIndexByObjectId, getList, hashCode, loadFromStream, moveObject, newObjectId, removeAll, removeByIndex, removeByObjectId, saveToStream, sendToBack, setList, setShowDesign, size, toString |
| Methods inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
fromDOM, getLastError, getMaxObjectId, getObjectId, getObjectType, getXMLTag, getZoomScale, isShowDesign, setLastError, setObjectId, setObjectType, setValue, setXMLTag, toDOM |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String XML_PORTLIST
| Constructor Detail |
public PortList()
| Method Detail |
public Port addPort(Port port)
port - A new port.
public int getIndex(Port port)
port - A port to be found.
protected AbstractObject cloneMe()
throws java.lang.CloneNotSupportedException
cloneMe in class ObjectListjava.lang.CloneNotSupportedExceptionpublic void draw(java.awt.Graphics g)
g - A graphic canvas.public JFPoint getMoveNode()
public JFPoint getRefNode1()
public JFPoint getRefNode2()
public JFPoint getRefNode3()
public int getMoveNodeType()
public void startMoveNode(JFPoint moveNode,
JFPoint refNode1,
JFPoint refNode2,
JFPoint refNode3,
int nodeType)
moveNode - Currently moving node.nodeType - The type of the moving node(defined in JFPointNode).
public void finishMoveNode(JFPoint newMoveNode,
JFPoint newRefNode1,
JFPoint newRefNode2,
JFPoint newRefNode3)
newMoveNode - Currently moving node.
public void movePort(JFPoint startPoint,
JFPoint endPoint,
JFPoint newStartPoint,
JFPoint newEndPoint)
public void dividePort(JFPoint startPoint,
JFPoint endPoint,
JFPoint midPoint)
midPoint - A middle point to divide ports' end points.
public Port pickPort(double x,
double y)
public boolean removePort(Port port)
port - A port to be removed.
public void scaleBy(JFPoint center,
JFPoint basePoint,
JFPoint refPoint1,
JFPoint refPoint2,
double scale)
center - A center point of these all ports.basePoint - A base point that is unmovable.refPoint1 - A 'width' reference point.refPoint2 - A 'height' reference point.scale - A reference scale percent.
public void scaleBy(JFPoint basePoint,
double xScale,
double yScale)
basePoint - A base scale point for scaling reference.xScale - A scale percentage in x coordinate, default to 1.0yScale - A scale percentage in y coordinate, default to 1.0
public void moveBy(double x,
double y)
public void rotateBy(double baseX,
double baseY,
double theta)
theta - A rotate angle.public void mirrorBy(double baseX)
baseX - A mirror base x coordinate.public void flipBy(double baseY)
baseY - A flip base y coordinate.public boolean attachPort(Port port)
port - A new port of other shape.public boolean detachPort(Port port)
port - A port of other shape.public boolean detachAll()
public void moveRelationalPorts(ObjectList movedList)
movedList - An object list that has already processed, so don't change them further.public void unboundBrokenPorts()
public void setParentId(int parentId)
parentId - A new id of a parent object.public void setParent(AbstractObject obj)
obj - A new parent object.public Port portIntersects(JFPoint pnt)
pnt - A JFPoint used to test intersection.
public void setZoomScale(double zoomScale)
setZoomScale in class ObjectListzoomScale - A new zoom scale.public void attachRealPort(ObjectList shapeList)
attachRealPort in class ObjectListshapeList - A shapeList used to pick out their ports for ports' attached list
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||