Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5804/src/net/sourceforge/bprocessor/model
Modified Files:
Project.java
Log Message:
Added a script to project that can contain userdefined functions
Index: Project.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** Project.java 11 Sep 2006 14:53:59 -0000 1.72
--- Project.java 13 Sep 2006 13:36:22 -0000 1.73
***************
*** 89,92 ****
--- 89,95 ----
private String name;
+ /** The script of the Project */
+ private Description script;
+
/**
* Get the instance
***************
*** 106,109 ****
--- 109,113 ----
super();
name = "new project";
+ script = new Description("");
undoStack = new Stack();
redoStack = new Stack();
***************
*** 146,150 ****
this.globals = globals;
}
-
/**
--- 150,153 ----
***************
*** 157,160 ****
--- 160,171 ----
/**
+ *
+ * @return Script
+ */
+ public String getScript() {
+ return script.toString();
+ }
+
+ /**
* Add observer
* @param observer The observer
***************
*** 917,920 ****
--- 928,933 ----
if (a.getName().equals("Name")) {
setName((String)a.getValue());
+ } else if (a.getName().equals("Script")) {
+ script = new Description(((String)a.getValue().toString()));
}
}
***************
*** 934,937 ****
--- 947,951 ----
new Double(EnergyCalc.energyLoss() / EnergyCalc.heatedArea()), false));
}
+ res.add(new Attribute("Script", script));
return res;
}
|