/[cashew-s-editor]/cashews/src/nongnu/cashews/eclipse/composer/model/RectangleNode.java
ViewVC logotype

Diff of /cashews/src/nongnu/cashews/eclipse/composer/model/RectangleNode.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by gnu_andrew, Thu Mar 31 17:35:21 2005 UTC revision 1.2 by gnu_andrew, Thu May 5 23:47:58 2005 UTC
# Line 34  otherwise indicated below, the terms and Line 34  otherwise indicated below, the terms and
34  to any source code in the Content.  to any source code in the Content.
35    
36  */  */
37    /**
38     *
39     * @author Xianfeng Liu  <acp04xfl@shef.ac.uk>
40     *
41     *
42     */
43  package nongnu.cashews.eclipse.composer.model;  package nongnu.cashews.eclipse.composer.model;
44    
45  import java.util.List;  import java.util.List;
# Line 90  public class RectangleNode Line 95  public class RectangleNode
95      return name;      return name;
96    }    }
97    
98    public void addInput(Connection connection)    public void addInput(ConnectionElement connection)
99    {    {
100      inputs.add(connection);      inputs.add(connection);
101      fireStructureChange(INPUTS, connection);      fireStructureChange(INPUTS, connection);
102    }    }
103    
104    public void addOutput(Connection connection)    public void addOutput(ConnectionElement connection)
105    {    {
106      outputs.add(connection);      outputs.add(connection);
107      fireStructureChange(OUTPUTS, connection);      fireStructureChange(OUTPUTS, connection);
# Line 112  public class RectangleNode Line 117  public class RectangleNode
117      return super.outputs;      return super.outputs;
118    }    }
119    
120    public void removeInput(Connection connection)    public void removeInput(ConnectionElement connection)
121    {    {
122      inputs.remove(connection);      super.inputs.remove(connection);
123      fireStructureChange(INPUTS, connection);      fireStructureChange(INPUTS, connection);
124    }    }
125    
126    public void removeOutput(Connection connection)    public void removeOutput(ConnectionElement connection)
127    {    {
128      outputs.remove(connection);      super.outputs.remove(connection);
129      fireStructureChange(OUTPUTS, connection);      fireStructureChange(OUTPUTS, connection);
130    }    }
131    
# Line 187  public class RectangleNode Line 192  public class RectangleNode
192    
193      str.append(">");      str.append(">");
194      Node tempNode = null;      Node tempNode = null;
195      Connection tempConnection = null;      ConnectionElement tempConnection = null;
196      if (outputs.size() > 0)      if (outputs != null && outputs.size() > 0)
197        {        {
198          for (int i = 0; i < outputs.size(); i++)          for (int i = 0; i < outputs.size(); i++)
199            {            {
200              str.append("<OutgoingEdge destination=");              str.append("<OutgoingEdge Destination=");
201              tempConnection = (Connection) outputs.get(i);              tempConnection = (ConnectionElement) outputs.get(i);
202              tempNode = tempConnection.getTarget();              tempNode = tempConnection.getTarget();
203              str.append("\"");              str.append("\"");
204              str.append(tempNode.getName());              str.append(tempNode.getName());

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26