[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[CASHeW-s-editor-patches] corrected model changes
From: |
X F Liu |
Subject: |
[CASHeW-s-editor-patches] corrected model changes |
Date: |
Thu, 3 Mar 2005 16:12:40 +0000 |
User-agent: |
Internet Messaging Program (IMP) 3.2.2 |
Index: src/nongnu/cashews/eclipse/composer/model/EllipseNode.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/EllipseNode.java,v
retrieving revision 1.3
diff -u -r1.3 EllipseNode.java
--- src/nongnu/cashews/eclipse/composer/model/EllipseNode.java 2005/02/24
20:13:33 1.3
+++ src/nongnu/cashews/eclipse/composer/model/EllipseNode.java 2005/03/03
16:10:07
@@ -1,6 +1,5 @@
package nongnu.cashews.eclipse.composer.model;
-import java.util.ArrayList;
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
@@ -14,10 +13,7 @@
static final long serialVersionUID = 4;
// properties
- public static final String LOCATION = "location";
- public static final String NAME = "name";
- public static final String INPUTS = "inputs";
- public static final String OUTPUTS = "outputs";
+
// descriptors for property sheet
protected static IPropertyDescriptor[] descriptors;
@@ -27,17 +23,14 @@
}
// actual fields
- protected Point location = new Point(0, 0);
- protected String name = "EllipseNode";
- private List outputs = new ArrayList(5);
- private List inputs = new ArrayList(5);
+
public void setLocation(Point p) {
- if (this.location.equals(p)) {
+ if (location.equals(p)) {
return;
}
- this.location = p;
+ location = p;
firePropertyChange(LOCATION, null, p);
}
@@ -46,10 +39,10 @@
}
public void setName(String name) {
- if (this.name.equals(name)) {
+ if (name.equals(name)) {
return;
}
- this.name = name;
+ name = name;
firePropertyChange(NAME, null, name);
}
@@ -58,31 +51,31 @@
}
public void addInput(Connection connection) {
- this.inputs.add(connection);
+ inputs.add(connection);
fireStructureChange(INPUTS, connection);
}
public void addOutput(Connection connection) {
- this.outputs.add(connection);
+ outputs.add(connection);
fireStructureChange(OUTPUTS, connection);
}
public List getIncomingConnections() {
- return this.inputs;
+ return inputs;
}
public List getOutgoingConnections() {
- return this.outputs;
+ return outputs;
}
public void removeInput(Connection connection) {
- this.inputs.remove(connection);
+ inputs.remove(connection);
fireStructureChange(INPUTS, connection);
}
public void removeOutput(Connection connection) {
- this.outputs.remove(connection);
+ outputs.remove(connection);
fireStructureChange(OUTPUTS, connection);
}
//------------------------------------------------------------------------
Index: src/nongnu/cashews/eclipse/composer/model/Node.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Node.java,v
retrieving revision 1.4
diff -u -r1.4 Node.java
--- src/nongnu/cashews/eclipse/composer/model/Node.java 2005/03/03 15:38:59
1.4
+++ src/nongnu/cashews/eclipse/composer/model/Node.java 2005/03/03 16:10:07
@@ -29,8 +29,8 @@
// actual fields
protected Point location = new Point(0, 0);
protected String name = "Node";
- private List outputs = new ArrayList(5);
- private List inputs = new ArrayList(5);
+ protected List outputs = new ArrayList(5);
+ protected List inputs = new ArrayList(5);
public void setLocation(Point p) {
Index: src/nongnu/cashews/eclipse/composer/model/RectangleNode.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/RectangleNode.java,v
retrieving revision 1.1
diff -u -r1.1 RectangleNode.java
--- src/nongnu/cashews/eclipse/composer/model/RectangleNode.java
2005/02/24
20:11:22 1.1
+++ src/nongnu/cashews/eclipse/composer/model/RectangleNode.java
2005/03/03
16:10:07
@@ -1,6 +1,5 @@
package nongnu.cashews.eclipse.composer.model;
-import java.util.ArrayList;
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
@@ -14,10 +13,7 @@
static final long serialVersionUID = 5;
// properties
- public static final String LOCATION = "location";
- public static final String NAME = "name";
- public static final String INPUTS = "inputs";
- public static final String OUTPUTS = "outputs";
+
// descriptors for property sheet
protected static IPropertyDescriptor[] descriptors;
@@ -27,17 +23,14 @@
}
// actual fields
- protected Point location = new Point(0, 0);
- protected String name = "RectangleNode";
- private List outputs = new ArrayList(5);
- private List inputs = new ArrayList(5);
+
public void setLocation(Point p) {
- if (this.location.equals(p)) {
+ if (location.equals(p)) {
return;
}
- this.location = p;
+ location = p;
firePropertyChange(LOCATION, null, p);
}
@@ -46,10 +39,10 @@
}
public void setName(String name) {
- if (this.name.equals(name)) {
+ if (name.equals(name)) {
return;
}
- this.name = name;
+ super.name = name;
firePropertyChange(NAME, null, name);
}
@@ -58,27 +51,27 @@
}
public void addInput(Connection connection) {
- this.inputs.add(connection);
+ inputs.add(connection);
fireStructureChange(INPUTS, connection);
}
public void addOutput(Connection connection) {
- this.outputs.add(connection);
+ outputs.add(connection);
fireStructureChange(OUTPUTS, connection);
}
public List getIncomingConnections() {
- return this.inputs;
+ return super.inputs;
}
public List getOutgoingConnections() {
- return this.outputs;
+ return super.outputs;
}
public void removeInput(Connection connection) {
- this.inputs.remove(connection);
+ inputs.remove(connection);
fireStructureChange(INPUTS, connection);
}
public void removeOutput(Connection connection) {
- this.outputs.remove(connection);
+ outputs.remove(connection);
fireStructureChange(OUTPUTS, connection);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [CASHeW-s-editor-patches] corrected model changes,
X F Liu <=