Thread: [Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Surface.java, 1.100, 1.101 Space.jav
Status: Pre-Alpha
Brought to you by:
henryml
From: Nikolaj B. <nbr...@us...> - 2006-06-26 11:36:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31444/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Space.java Attribute.java Log Message: Spaces now have simple classification Index: Attribute.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Attribute.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Attribute.java 30 May 2006 09:28:57 -0000 1.10 --- Attribute.java 26 Jun 2006 11:36:26 -0000 1.11 *************** *** 27,30 **** --- 27,33 ---- private String name; + /** The classification */ + private String classification; + /** The precision of the object */ private int precision; *************** *** 82,85 **** --- 85,101 ---- setEditable(b); } + + /** + * Constructor + * @param name The name + * @param value The value + * @param classification The classification + */ + public Attribute(String name, Object value, String classification) { + setName(name); + setValue(value); + setClassification(classification); + editable = false; + } /** *************** *** 110,113 **** --- 126,143 ---- this.precision = precision; } + + /** + * @return Returns the classification. + */ + public String getClassification() { + return classification; + } + + /** + * @param classification The classification to set. + */ + public void setClassification(String classification) { + this.classification = classification; + } /** Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** Surface.java 20 Jun 2006 08:14:55 -0000 1.100 --- Surface.java 26 Jun 2006 11:36:26 -0000 1.101 *************** *** 1408,1414 **** } - res.add(new Attribute("Total area", new Double(getArea()), false)); res.add(new Attribute("Area", new Double(getArea() - holeArea), false)); } return res; } --- 1408,1415 ---- } res.add(new Attribute("Area", new Double(getArea() - holeArea), false)); } + + res.add(new Attribute("Total area", new Double(getArea()), false)); return res; } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Space.java 7 Jun 2006 08:22:37 -0000 1.37 --- Space.java 26 Jun 2006 11:36:26 -0000 1.38 *************** *** 87,90 **** --- 87,104 ---- private long nextMaterialId; + /** The classification */ + private String classification; + + /** The construcstionspace classification options */ + private String[] constructionOptions = + {"None", "Terrandæk", "Tagkonstruktion", "Ydervæg", "Ældre termovindue", + "2-lags lavenergivindue", "3-lags lavenergivindue", "Dør"}; + + /** The functionalspace classification options */ + private String[] functionalOptions = + {"None", "Exterior", "Livingroom", "Bathroom", "Bedroom"}; + + + /** The modellor */ private Modellor modellor; *************** *** 109,112 **** --- 123,127 ---- setName(name); setType(type); + setClassification("None"); this.container = container; description = new Description(""); *************** *** 683,686 **** --- 698,719 ---- } + + /** + * Return the classification + * @return The classification + */ + public String getClassification() { + return classification; + } + /** + * Set the classification + * @param classification The classification + */ + public void setClassification(String classification) { + this.classification = classification; + } + + + /** * Find vertex based upon location and delta *************** *** 937,940 **** --- 970,975 ---- if (a.getName().equals("Name")) { setName((String)a.getValue()); + } else if (a.getName().equals("Classification")) { + setClassification(((String)a.getValue().toString())); } else if (a.getName().equals("Description")) { setDescription(((String)a.getValue().toString())); *************** *** 953,956 **** --- 988,996 ---- res.add(new Attribute("Name", getName())); res.add(new Attribute("ID", getId().toString(), false)); + if (isConstructionSpace()) { + res.add(new Attribute("Classification", constructionOptions, getClassification())); + } else { + res.add(new Attribute("Classification", functionalOptions, getClassification())); + } res.add(new Attribute("Description", getDescription())); return res; *************** *** 1250,1252 **** --- 1290,1293 ---- return surfaceCopy; } + } |