Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15664/src/org/mediavirus/graphl/graph
Modified Files:
DefaultEdge.java DefaultElement.java GraphElement.java
DefaultNode.java
Log Message:
removed getLabel() method of graph element
Index: DefaultNode.java
===================================================================
RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultNode.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** DefaultNode.java 17 Aug 2005 15:52:50 -0000 1.15
--- DefaultNode.java 5 Sep 2005 15:50:40 -0000 1.16
***************
*** 107,118 ****
return posY;
}
- /**
- * Return the label of this node.
- *
- * @return the label of this node
- */
- public String getLabel() {
- return toString();
- }
/**
--- 107,110 ----
***************
*** 266,269 ****
--- 258,274 ----
this.width = width;
}
+ /**
+ * @see org.mediavirus.graphl.graph.Node#invertPin(org.mediavirus.graphl.graph.Edge)
+ */
+ public void invertPin(Edge edge) {
+ if (edgesFrom.contains(edge)) {
+ edgesFrom.remove(edge);
+ edgesTo.add(edge);
+ }
+ else if (edgesTo.contains(edge)) {
+ edgesTo.remove(edge);
+ edgesFrom.add(edge);
+ }
+ }
}
Index: GraphElement.java
===================================================================
RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/GraphElement.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** GraphElement.java 17 Aug 2005 15:52:50 -0000 1.7
--- GraphElement.java 5 Sep 2005 15:50:40 -0000 1.8
***************
*** 24,35 ****
void setZIndex(int z);
int getZIndex();
-
- /**
- * Returns the value of this element.
- *
- * @return the value of the element
- */
- // TODO (2, 2h) this should be removed! maybe a getLabel() in NodeView/EdgeView
- String getLabel();
}
\ No newline at end of file
--- 24,27 ----
Index: DefaultEdge.java
===================================================================
RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultEdge.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** DefaultEdge.java 17 Aug 2005 15:52:50 -0000 1.13
--- DefaultEdge.java 5 Sep 2005 15:50:40 -0000 1.14
***************
*** 64,75 ****
return to;
}
- /**
- * Returns the label of this node.
- *
- * @return the label of the node
- */
- public String getLabel() {
- return toString();
- }
/**
--- 64,67 ----
***************
*** 182,196 ****
* Inverts the direction of the edge (from and to are swapped).
*/
- // TODO (1) also update edge data in the nodes!
public void invert() {
Node temp = from;
from = to;
to = temp;
}
/**
* @see org.mediavirus.graphl.graph.GraphElement#getBaseURL()
- *
- * @uml.property name="baseURL"
*/
public String getSource() {
--- 174,187 ----
* Inverts the direction of the edge (from and to are swapped).
*/
public void invert() {
Node temp = from;
from = to;
to = temp;
+ from.invertPin(this);
+ to.invertPin(this);
}
/**
* @see org.mediavirus.graphl.graph.GraphElement#getBaseURL()
*/
public String getSource() {
***************
*** 200,205 ****
/**
* @see org.mediavirus.graphl.graph.GraphElement#setBaseURL(java.lang.String)
- *
- * @uml.property name="baseURL"
*/
public void setSource(String source) {
--- 191,194 ----
Index: DefaultElement.java
===================================================================
RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DefaultElement.java 11 Jan 2005 13:26:41 -0000 1.3
--- DefaultElement.java 5 Sep 2005 15:50:40 -0000 1.4
***************
*** 30,36 ****
}
- /**
- * @see org.mediavirus.graphl.graph.PropertySet#getProperties()
- */
public Map getProperties() {
return (Map)properties.clone();
--- 30,33 ----
|