Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24516/src/net/sourceforge/bprocessor/model
Modified Files:
Material.java
Log Message:
removed depency to AWT from model
Index: Material.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Material.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Material.java 17 Dec 2007 13:09:17 -0000 1.12
--- Material.java 17 Dec 2007 13:55:06 -0000 1.13
***************
*** 7,13 ****
package net.sourceforge.bprocessor.model;
- import java.awt.Color;
- import java.awt.color.ColorSpace;
- import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
--- 7,10 ----
***************
*** 21,25 ****
* usage="read-write"
*/
! public class Material extends Entity implements Parametric, Serializable {
/** The name of the material */
--- 18,22 ----
* usage="read-write"
*/
! public class Material extends Entity implements Parametric {
/** The name of the material */
***************
*** 243,252 ****
res.add(new Attribute("Name", getName(), true));
res.add(new Attribute("Id", getId().toString(), false));
! res.add(new Attribute("diffuseColor",
! new Color(ColorSpace.getInstance(ColorSpace.CS_sRGB), getDiffuseColor(), 1.0f)));
! res.add(new Attribute("ambientColor",
! new Color(ColorSpace.getInstance(ColorSpace.CS_sRGB), getAmbientColor(), 1.0f)));
! res.add(new Attribute("specularColor",
! new Color(ColorSpace.getInstance(ColorSpace.CS_sRGB), getSpecularColor(), 1.0f)));
res.add(new Attribute("Opacity", opacity));
res.add(new Attribute("Shininess", shininess));
--- 240,246 ----
res.add(new Attribute("Name", getName(), true));
res.add(new Attribute("Id", getId().toString(), false));
! res.add(new Attribute("diffuseColor", getDiffuseColor()));
! res.add(new Attribute("ambientColor", getAmbientColor()));
! res.add(new Attribute("specularColor", getSpecularColor()));
res.add(new Attribute("Opacity", opacity));
res.add(new Attribute("Shininess", shininess));
***************
*** 270,281 ****
setName((String)a.getValue());
} else if (a.getName().equalsIgnoreCase("diffusecolor")) {
! Color c = (Color)a.getValue();
! setDiffuseColor(c.getColorComponents(null));
} else if (a.getName().equalsIgnoreCase("ambientcolor")) {
! Color c = (Color)a.getValue();
! setAmbientColor(c.getColorComponents(null));
} else if (a.getName().equalsIgnoreCase("specularcolor")) {
! Color c = (Color)a.getValue();
! setSpecularColor(c.getColorComponents(null));
} else if (a.getName().equalsIgnoreCase("opacity")) {
setOpacity((Double)a.getValue());
--- 264,272 ----
setName((String)a.getValue());
} else if (a.getName().equalsIgnoreCase("diffusecolor")) {
! setDiffuseColor((float[]) a.getValue());
} else if (a.getName().equalsIgnoreCase("ambientcolor")) {
! setAmbientColor((float[]) a.getValue());
} else if (a.getName().equalsIgnoreCase("specularcolor")) {
! setSpecularColor((float[]) a.getValue());
} else if (a.getName().equalsIgnoreCase("opacity")) {
setOpacity((Double)a.getValue());
|