[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Material.java, 1.14, 1.15 Surface.ja
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-12-19 09:03:40
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10085/src/net/sourceforge/bprocessor/model Modified Files: Material.java Surface.java Log Message: Refactored the material attribute in attribute view Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.213 retrieving revision 1.214 diff -C2 -d -r1.213 -r1.214 *** Surface.java 18 Dec 2007 15:06:49 -0000 1.213 --- Surface.java 19 Dec 2007 09:03:41 -0000 1.214 *************** *** 1849,1868 **** } } else if (a.getName().equals("Front Material")) { ! if (a.getValue() instanceof String) { ! String s = (String)a.getValue(); ! for (Material m : Project.getInstance().getMaterials()) { ! if (s.equalsIgnoreCase(m.getName())) { ! setFrontMaterial(m); ! } ! } } } else if (a.getName().equals("Back Material")) { ! if (a.getValue() instanceof String) { ! String s = (String)a.getValue(); ! for (Material m : Project.getInstance().getMaterials()) { ! if (s.equalsIgnoreCase(m.getName())) { ! setBackMaterial(m); ! } ! } } } else if (a.getName().equals("Holes")) { --- 1849,1860 ---- } } else if (a.getName().equals("Front Material")) { ! Material material = (Material) ((Reference) a.getValue()).getObject(); ! if (material != frontMaterial()) { ! setFrontMaterial(material); } } else if (a.getName().equals("Back Material")) { ! Material material = (Material) ((Reference) a.getValue()).getObject(); ! if (material != backMaterial()) { ! setBackMaterial(material); } } else if (a.getName().equals("Holes")) { Index: Material.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Material.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Material.java 17 Dec 2007 14:20:37 -0000 1.14 --- Material.java 19 Dec 2007 09:03:41 -0000 1.15 *************** *** 276,278 **** --- 276,285 ---- } } + + /** + * {@inheritDoc} + */ + public String toString() { + return "[Material " + name + "]"; + } } |