cashew-s-editor-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[CASHeW-s-editor-patches] toStrings added, but still incomplete.....


From: Ravish Bhagdev
Subject: [CASHeW-s-editor-patches] toStrings added, but still incomplete.....
Date: Wed, 9 Mar 2005 10:24:57 -0000

Index: Connection.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Connection.java,v
retrieving revision 1.4
diff -u -r1.4 Connection.java
--- Connection.java 2005/02/24 20:13:33 1.4
+++ Connection.java 2005/03/09 10:19:48
@@ -1,23 +1,30 @@
+
+
package nongnu.cashews.eclipse.composer.model;
+
+public class Connection extends Element
+{
+
+ /**
+ * Comment for <code>serialVersionUID</code>
+ */
+ private static final long serialVersionUID = 1L;
+
+ private Node target;
+
+ private Node source;
+
+ public Connection(Node source, Node target)
+ {
+ this.source = source;
+ this.target = target;
-public class Connection extends Element {
+ source.addOutput(this);
+ target.addInput(this);
+ }
- /**
- * Comment for <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
- private Node target;
- private Node source;
-
- public Connection(Node source, Node target) {
- this.source = source;
- this.target = target;
-
- source.addOutput(this);
- target.addInput(this);
- }
-
- public Node getTarget() {
- return this.target;
- }
+ public Node getTarget()
+ {
+ return this.target;
+ }
}
Index: Diagram.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Diagram.java,v
retrieving revision 1.4
diff -u -r1.4 Diagram.java
--- Diagram.java 2005/02/24 20:13:33 1.4
+++ Diagram.java 2005/03/09 10:19:49
@@ -1,3 +1,5 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import java.io.ByteArrayInputStream;
@@ -7,49 +9,75 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
-public class Diagram extends Element {
+public class Diagram extends Element
+{
- // serialization version
- static final long serialVersionUID = 1;
+ // serialization version
+ static final long serialVersionUID = 1;
- // properties
- public static String NODES = "nodes";
+ // properties
+ public static String NODES = "nodes";
- // actual fields
- protected List nodes = new ArrayList();
-
- public void addNode(Node node) {
- nodes.add(node);
- fireStructureChange(NODES, nodes);
- }
- public void removeNode(Node node) {
- nodes.remove(node);
- fireStructureChange(NODES, nodes);
- }
- public List getNodes() {
- return this.nodes;
- }
-
- //------------------------------------------------------------------------
- // I/O
-
- public InputStream getAsStream() throws IOException {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- ObjectOutputStream out = new ObjectOutputStream(os);
- out.writeObject(this);
- out.close();
- InputStream istream = new ByteArrayInputStream(os.toByteArray());
- os.close();
- return istream;
- }
-
- public static Diagram makeFromStream(InputStream istream) throws IOException, ClassNotFoundException {
- ObjectInputStream ois = new ObjectInputStream(istream);
- Diagram diagram = (Diagram) ois.readObject();
- ois.close();
- return diagram;
- }
+ // actual fields
+ protected List nodes = new ArrayList();
+
+ public String toString()
+ {
+ StringBuffer str = new StringBuffer();
+ str.append("<WorkflowDiagram version=");
+ str.append(serialVersionUID + ">");
+
+ Iterator i = nodes.iterator();
+ Node n;
+ for(n = (Node)i.next(); i.hasNext(); )
+ {
+ str.append(n);
+ }
+ str.append("</WorkflowDiagram>");
+ return str.toString();
+ }
+
+ public void addNode(Node node)
+ {
+ nodes.add(node);
+ fireStructureChange(NODES, nodes);
+ }
+
+ public void removeNode(Node node)
+ {
+ nodes.remove(node);
+ fireStructureChange(NODES, nodes);
+ }
+
+ public List getNodes()
+ {
+ return this.nodes;
+ }
+
+ // ------------------------------------------------------------------------
+ // I/O
+
+ public InputStream getAsStream() throws IOException
+ {
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(os);
+ out.writeObject(this);
+ out.close();
+ InputStream istream = new ByteArrayInputStream(os.toByteArray());
+ os.close();
+ return istream;
+ }
+
+ public static Diagram makeFromStream(InputStream istream) throws IOException,
+ ClassNotFoundException
+ {
+ ObjectInputStream ois = new ObjectInputStream(istream);
+ Diagram diagram = (Diagram) ois.readObject();
+ ois.close();
+ return diagram;
+ }
}
Index: Element.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Element.java,v
retrieving revision 1.3
diff -u -r1.3 Element.java
--- Element.java 2005/02/24 20:13:33 1.3
+++ Element.java 2005/03/09 10:19:49
@@ -1,3 +1,5 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import java.beans.PropertyChangeListener;
@@ -7,35 +9,43 @@
import java.io.Serializable;
// abstract base class of elements in the model
-
-abstract public class Element implements Cloneable, Serializable {
- // serialization version
- static final long serialVersionUID = 1;
+abstract public class Element implements Cloneable, Serializable
+{
- // property change listeners
- transient protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+ // serialization version
+ static final long serialVersionUID = 1;
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- listeners.addPropertyChangeListener(listener);
- }
-
- protected void firePropertyChange(String prop, Object old, Object newValue) {
- listeners.firePropertyChange(prop, old, newValue);
- }
-
- protected void fireStructureChange(String prop, Object child) {
- listeners.firePropertyChange(prop, null, child);
- }
-
- // implemented in order to create listeners field
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- in.defaultReadObject();
- listeners = new PropertyChangeSupport(this);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener l) {
- listeners.removePropertyChangeListener(l);
- }
+ // property change listeners
+ transient protected PropertyChangeSupport listeners = new PropertyChangeSupport(
+ this);
+
+ public void addPropertyChangeListener(PropertyChangeListener listener)
+ {
+ listeners.addPropertyChangeListener(listener);
+ }
+
+ protected void firePropertyChange(String prop, Object old, Object newValue)
+ {
+ listeners.firePropertyChange(prop, old, newValue);
+ }
+
+ protected void fireStructureChange(String prop, Object child)
+ {
+ listeners.firePropertyChange(prop, null, child);
+ }
+
+ // implemented in order to create listeners field
+ private void readObject(ObjectInputStream in) throws IOException,
+ ClassNotFoundException
+ {
+ in.defaultReadObject();
+ listeners = new PropertyChangeSupport(this);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l)
+ {
+ listeners.removePropertyChangeListener(l);
+ }
}
Index: ElementFactory.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/ElementFactory.java,v
retrieving revision 1.3
diff -u -r1.3 ElementFactory.java
--- ElementFactory.java 2005/02/24 20:13:33 1.3
+++ ElementFactory.java 2005/03/09 10:19:50
@@ -1,31 +1,39 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import org.eclipse.gef.requests.CreationFactory;
-public class ElementFactory implements CreationFactory {
+public class ElementFactory implements CreationFactory
+{
- private Object template;
+ private Object template;
- public ElementFactory(Object template) {
- this.template = template;
- }
-
- /**
- * @see org.eclipse.gef.requests.CreationFactory#getNewObject()
- */
- public Object getNewObject() {
- try {
- return ((Class) template).newInstance();
+ public ElementFactory(Object template)
+ {
+ this.template = template;
+ }
+
+ /**
+ * @see org.eclipse.gef.requests.CreationFactory#getNewObject()
+ */
+ public Object getNewObject()
+ {
+ try
+ {
+ return ((Class) template).newInstance();
}
- catch (Exception e) {
- return null;
+ catch (Exception e)
+ {
+ return null;
}
- }
+ }
- /**
- * @see org.eclipse.gef.requests.CreationFactory#getObjectType()
- */
- public Object getObjectType() {
- return template;
- }
+ /**
+ * @see org.eclipse.gef.requests.CreationFactory#getObjectType()
+ */
+ public Object getObjectType()
+ {
+ return template;
+ }
}
Index: EllipseNode.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/EllipseNode.java,v
retrieving revision 1.4
diff -u -r1.4 EllipseNode.java
--- EllipseNode.java 2005/03/03 16:19:58 1.4
+++ EllipseNode.java 2005/03/09 10:19:51
@@ -1,3 +1,5 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import java.util.List;
@@ -6,109 +8,149 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-
-public class EllipseNode extends Node implements IPropertySource {
- // serialization version
- static final long serialVersionUID = 4;
+public class EllipseNode extends Node implements IPropertySource
+{
- // properties
-
+ // serialization version
+ static final long serialVersionUID = 4;
- // descriptors for property sheet
- protected static IPropertyDescriptor[] descriptors;
- static {
- descriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name")};
- }
-
- // actual fields
+ // properties
-
-
- public void setLocation(Point p) {
- if (location.equals(p)) {
- return;
- }
- location = p;
- firePropertyChange(LOCATION, null, p);
- }
-
- public Point getLocation() {
- return location;
- }
-
- public void setName(String name) {
- if (name.equals(name)) {
- return;
+ // descriptors for property sheet
+ protected static IPropertyDescriptor[] descriptors;
+ static
+ {
+ descriptors = new IPropertyDescriptor[] { new TextPropertyDescriptor(
+ NAME,
+ "Name") };
+ }
+
+ // actual fields
+
+ public String toString()
+ {
+ StringBuffer str = new StringBuffer();
+ str.append("<EllipseNode ");
+ str.append("id=");
+ str.append(name);
+ str.append(" location = ");
+ str.append(location);
+ str.append(">");
+ if(outputs.size()>0)
+ {
+ for(int i=0; i<outputs.size();i++)
+ {
+ str.append("<OutgoingEdge destination=");
+ }
+ }
+ str.append("</EllipseNode>");
+ return str.toString();
+ }
+ public void setLocation(Point p)
+ {
+ if (location.equals(p))
+ {
+ return;
+ }
+ location = p;
+ firePropertyChange(LOCATION, null, p);
+ }
+
+ public Point getLocation()
+ {
+ return location;
+ }
+
+ public void setName(String name)
+ {
+ if (name.equals(name))
+ {
+ return;
}
- name = name;
- firePropertyChange(NAME, null, name);
- }
-
- public String getName() {
- return name;
- }
-
- public void addInput(Connection connection) {
- inputs.add(connection);
- fireStructureChange(INPUTS, connection);
- }
-
-
- public void addOutput(Connection connection) {
- outputs.add(connection);
- fireStructureChange(OUTPUTS, connection);
- }
-
- public List getIncomingConnections() {
- return inputs;
- }
-
- public List getOutgoingConnections() {
- return outputs;
- }
-
- public void removeInput(Connection connection) {
- inputs.remove(connection);
- fireStructureChange(INPUTS, connection);
- }
-
- public void removeOutput(Connection connection) {
- outputs.remove(connection);
- fireStructureChange(OUTPUTS, connection);
- }
- //------------------------------------------------------------------------
- // Abstract methods from IPropertySource
-
- public Object getEditableValue() {
- return this;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return descriptors;
- }
-
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return getName();
+ name = name;
+ firePropertyChange(NAME, null, name);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addInput(Connection connection)
+ {
+ inputs.add(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void addOutput(Connection connection)
+ {
+ outputs.add(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ public List getIncomingConnections()
+ {
+ return inputs;
+ }
+
+ public List getOutgoingConnections()
+ {
+ return outputs;
+ }
+
+ public void removeInput(Connection connection)
+ {
+ inputs.remove(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void removeOutput(Connection connection)
+ {
+ outputs.remove(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ // ------------------------------------------------------------------------
+ // Abstract methods from IPropertySource
+
+ public Object getEditableValue()
+ {
+ return this;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors()
+ {
+ return descriptors;
+ }
+
+ public Object getPropertyValue(Object id)
+ {
+ if (NAME.equals(id))
+ {
+ return getName();
}
- else {
- return null;
+ else
+ {
+ return null;
}
- }
+ }
- public boolean isPropertySet(Object id) {
- return true;
- }
-
- public void resetPropertyValue(Object id) {
- // do nothing
- }
-
- public void setPropertyValue(Object id, Object value) {
- if (id == NAME) {
- setName((String)value);
+ public boolean isPropertySet(Object id)
+ {
+ return true;
+ }
+
+ public void resetPropertyValue(Object id)
+ {
+ // do nothing
+ }
+
+ public void setPropertyValue(Object id, Object value)
+ {
+ if (id == NAME)
+ {
+ setName((String) value);
}
- }
+ }
}
Index: Node.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Node.java,v
retrieving revision 1.5
diff -u -r1.5 Node.java
--- Node.java 2005/03/03 16:19:58 1.5
+++ Node.java 2005/03/09 10:19:52
@@ -1,3 +1,5 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import java.util.ArrayList;
@@ -7,116 +9,143 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+public class Node extends Element implements IPropertySource
+{
+
+ // serialization version
+ static final long serialVersionUID = 4;
+
+ // properties
+ public static final String LOCATION = "location";
+
+ public static final String NAME = "name";
-public class Node extends Element implements IPropertySource {
+ public static final String INPUTS = "inputs";
- // serialization version
- static final long serialVersionUID = 4;
+ public static final String OUTPUTS = "outputs";
- // 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;
- static {
- descriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name")};
- }
-
- // actual fields
- protected Point location = new Point(0, 0);
- protected String name = "Node";
- protected List outputs = new ArrayList(5);
- protected List inputs = new ArrayList(5);
-
-
- public void setLocation(Point p) {
- if (this.location.equals(p)) {
- return;
- }
- this.location = p;
- firePropertyChange(LOCATION, null, p);
- }
-
- public Point getLocation() {
- return location;
- }
-
- public void setName(String name) {
- if (this.name.equals(name)) {
- return;
+ // descriptors for property sheet
+ protected static IPropertyDescriptor[] descriptors;
+ static
+ {
+ descriptors = new IPropertyDescriptor[]
+ { new TextPropertyDescriptor(NAME,"Name") };
+ }
+
+ // actual fields
+ protected Point location = new Point(0, 0);
+
+ protected String name = "Node";
+
+ protected List outputs = new ArrayList(5);
+
+ protected List inputs = new ArrayList(5);
+
+ public void setLocation(Point p)
+ {
+ if (this.location.equals(p))
+ {
+ return;
+ }
+ this.location = p;
+ firePropertyChange(LOCATION, null, p);
+ }
+
+ public Point getLocation()
+ {
+ return location;
+ }
+
+ public void setName(String name)
+ {
+ if (this.name.equals(name))
+ {
+ return;
}
- this.name = name;
- firePropertyChange(NAME, null, name);
- }
-
- public String getName() {
- return name;
- }
-
- public void addInput(Connection connection) {
- this.inputs.add(connection);
- fireStructureChange(INPUTS, connection);
- }
-
- public void addOutput(Connection connection) {
- this.outputs.add(connection);
- fireStructureChange(OUTPUTS, connection);
- }
-
- public List getIncomingConnections() {
- return this.inputs;
- }
-
- public List getOutgoingConnections() {
- return this.outputs;
- }
-
- public void removeInput(Connection connection) {
- this.inputs.remove(connection);
- fireStructureChange(INPUTS, connection);
- }
-
- public void removeOutput(Connection connection) {
- this.outputs.remove(connection);
- fireStructureChange(OUTPUTS, connection);
- }
-
-
- //------------------------------------------------------------------------
- // Abstract methods from IPropertySource
-
- public Object getEditableValue() {
- return this;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return descriptors;
- }
-
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return getName();
+ this.name = name;
+ firePropertyChange(NAME, null, name);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addInput(Connection connection)
+ {
+ this.inputs.add(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void addOutput(Connection connection)
+ {
+ this.outputs.add(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ public List getIncomingConnections()
+ {
+ return this.inputs;
+ }
+
+ public List getOutgoingConnections()
+ {
+ return this.outputs;
+ }
+
+ public void removeInput(Connection connection)
+ {
+ this.inputs.remove(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void removeOutput(Connection connection)
+ {
+ this.outputs.remove(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ // ------------------------------------------------------------------------
+ // Abstract methods from IPropertySource
+
+ public Object getEditableValue()
+ {
+ return this;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors()
+ {
+ return descriptors;
+ }
+
+ public Object getPropertyValue(Object id)
+ {
+ if (NAME.equals(id))
+ {
+ return getName();
}
- else {
- return null;
+ else
+ {
+ return null;
}
- }
+ }
- public boolean isPropertySet(Object id) {
- return true;
- }
-
- public void resetPropertyValue(Object id) {
- // do nothing
- }
-
- public void setPropertyValue(Object id, Object value) {
- if (id == NAME) {
- setName((String)value);
+ public boolean isPropertySet(Object id)
+ {
+ return true;
+ }
+
+ public void resetPropertyValue(Object id)
+ {
+ // do nothing
+ }
+
+ public void setPropertyValue(Object id, Object value)
+ {
+ if (id == NAME)
+ {
+ setName((String) value);
}
- }
+ }
}
Index: RectangleNode.java
===================================================================
RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/RectangleNode.java,v
retrieving revision 1.2
diff -u -r1.2 RectangleNode.java
--- RectangleNode.java 2005/03/03 16:19:58 1.2
+++ RectangleNode.java 2005/03/09 10:19:52
@@ -1,3 +1,5 @@
+
+
package nongnu.cashews.eclipse.composer.model;
import java.util.List;
@@ -6,106 +8,149 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+public class RectangleNode extends Node implements IPropertySource
+{
-public class RectangleNode extends Node implements IPropertySource {
+ // serialization version
+ static final long serialVersionUID = 5;
- // serialization version
- static final long serialVersionUID = 5;
+ // properties
- // properties
+ // descriptors for property sheet
+ protected static IPropertyDescriptor[] descriptors;
+ static
+ {
+ descriptors = new IPropertyDescriptor[]
+ { new TextPropertyDescriptor(NAME,"Name") };
+ }
+
+ // actual fields
+
+ public String toString()
+ {
+ StringBuffer str = new StringBuffer();
+ str.append("<RectangleNode ");
+ str.append("id=");
+ str.append(name);
+ str.append(" location = ");
+ str.append(location);
+ str.append(">");
+ if(outputs.size()>0)
+ {
+ for(int i=0; i<outputs.size();i++)
+ {
+ str.append("<OutgoingEdge destination=");
+ }
+ }
+ str.append("</RectangleNode>");
+ return str.toString();
+ }
+ public void setLocation(Point p)
+ {
+ if (location.equals(p))
+ {
+ return;
+ }
+ location = p;
+ firePropertyChange(LOCATION, null, p);
+ }
+
+ public Point getLocation()
+ {
+ return location;
+ }
- // descriptors for property sheet
- protected static IPropertyDescriptor[] descriptors;
- static {
- descriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name")};
- }
-
- // actual fields
-
-
-
- public void setLocation(Point p) {
- if (location.equals(p)) {
- return;
- }
- location = p;
- firePropertyChange(LOCATION, null, p);
- }
-
- public Point getLocation() {
- return location;
- }
-
- public void setName(String name) {
- if (name.equals(name)) {
- return;
+ public void setName(String name)
+ {
+ if (name.equals(name))
+ {
+ return;
}
- super.name = name;
- firePropertyChange(NAME, null, name);
- }
-
- public String getName() {
- return name;
- }
-
- public void addInput(Connection connection) {
- inputs.add(connection);
- fireStructureChange(INPUTS, connection);
- }
- public void addOutput(Connection connection) {
- outputs.add(connection);
- fireStructureChange(OUTPUTS, connection);
- }
- public List getIncomingConnections() {
- return super.inputs;
- }
-
- public List getOutgoingConnections() {
- return super.outputs;
- }
-
- public void removeInput(Connection connection) {
- inputs.remove(connection);
- fireStructureChange(INPUTS, connection);
- }
- public void removeOutput(Connection connection) {
- outputs.remove(connection);
- fireStructureChange(OUTPUTS, connection);
- }
-
- //------------------------------------------------------------------------
- // Abstract methods from IPropertySource
-
- public Object getEditableValue() {
- return this;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return descriptors;
- }
-
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return getName();
+ super.name = name;
+ firePropertyChange(NAME, null, name);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addInput(Connection connection)
+ {
+ inputs.add(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void addOutput(Connection connection)
+ {
+ outputs.add(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ public List getIncomingConnections()
+ {
+ return super.inputs;
+ }
+
+ public List getOutgoingConnections()
+ {
+ return super.outputs;
+ }
+
+ public void removeInput(Connection connection)
+ {
+ inputs.remove(connection);
+ fireStructureChange(INPUTS, connection);
+ }
+
+ public void removeOutput(Connection connection)
+ {
+ outputs.remove(connection);
+ fireStructureChange(OUTPUTS, connection);
+ }
+
+ // ------------------------------------------------------------------------
+ // Abstract methods from IPropertySource
+
+ public Object getEditableValue()
+ {
+ return this;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors()
+ {
+ return descriptors;
+ }
+
+ public Object getPropertyValue(Object id)
+ {
+ if (NAME.equals(id))
+ {
+ return getName();
}
- else {
- return null;
+ else
+ {
+ return null;
}
- }
+ }
+
+ public boolean isPropertySet(Object id)
+ {
+ return true;
+ }
+
+ public void resetPropertyValue(Object id)
+ {
+ // do nothing
+ }
- public boolean isPropertySet(Object id) {
- return true;
- }
-
- public void resetPropertyValue(Object id) {
- // do nothing
- }
-
- public void setPropertyValue(Object id, Object value) {
- if (id == NAME) {
- setName((String)value);
+ public void setPropertyValue(Object id, Object value)
+ {
+ if (id == NAME)
+ {
+ setName((String) value);
}
- }
+ }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]