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

Diff of /cashews/src/nongnu/cashews/eclipse/composer/model/Node.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.ArrayList;  import java.util.ArrayList;
# Line 70  static Line 75  static
75                                                                          NAME,                                                                          NAME,
76                                                                          "Name") };                                                                          "Name") };
77   }   }
   
78  // actual fields  // actual fields
79  protected Point location = new Point(0, 0);  protected Point location = new Point(0, 0);
80    
81  protected String name = "Node";  protected String name = "Node";
82    
83  protected List<Connection> outputs = new ArrayList<Connection>(5);  protected List<ConnectionElement> outputs = new ArrayList<ConnectionElement>(5);
84    
85  protected List<Connection> inputs = new ArrayList<Connection>(5);  protected List<ConnectionElement> inputs = new ArrayList<ConnectionElement>(5);
86    
87  public abstract String toXML();  public abstract String toXML();
88    
# Line 108  public String getName() Line 112  public String getName()
112   return name;   return name;
113  }  }
114    
115  public void addInput(Connection connection)  public void addInput(ConnectionElement connection)
116  {  {
117   inputs.add(connection);   inputs.add(connection);
118   fireStructureChange(INPUTS, connection);   fireStructureChange(INPUTS, connection);
119  }  }
120    
121  public void addOutput(Connection connection)  public void addOutput(ConnectionElement connection)
122  {  {
123   outputs.add(connection);   outputs.add(connection);
124   fireStructureChange(OUTPUTS, connection);   fireStructureChange(OUTPUTS, connection);
# Line 130  public List getOutgoingConnections() Line 134  public List getOutgoingConnections()
134   return this.outputs;   return this.outputs;
135  }  }
136    
137  public void removeInput(Connection connection)  public void removeInput(ConnectionElement connection)
138  {  {
139   this.inputs.remove(connection);   this.inputs.remove(connection);
140   fireStructureChange(INPUTS, connection);   fireStructureChange(INPUTS, connection);
141  }  }
142    
143  public void removeOutput(Connection connection)  public void removeOutput(ConnectionElement connection)
144  {  {
145   this.outputs.remove(connection);   this.outputs.remove(connection);
146   fireStructureChange(OUTPUTS, connection);   fireStructureChange(OUTPUTS, connection);

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