Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16113/src/net/sourceforge/bprocessor/model
Modified Files:
Material.java
Log Message:
Removed dependency of awt.Color from Material
Index: Material.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Material.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Material.java 13 Jan 2006 10:06:13 -0000 1.5
--- Material.java 13 Jan 2006 10:19:44 -0000 1.6
***************
*** 7,13 ****
package net.sourceforge.bprocessor.model;
- import java.awt.Color;
-
-
/**
* The Material of a Surface
--- 7,10 ----
***************
*** 17,24 ****
/** The name of the material */
private String name;
-
- /** The color of the material */
- private Color color;
/**
--- 14,20 ----
/** The name of the material */
private String name;
+ /** The color of the material */
+ private float[] color3fv;
/**
***************
*** 29,42 ****
/**
- * Constructor for Material
- * @param name The name of the material
- * @param color The color of the material
- */
- public Material(String name, Color color) {
- setName(name);
- setColor(color);
- }
-
- /**
* Constructor for Material
* @param name The name of the material
--- 25,28 ----
***************
*** 64,84 ****
this.name = name;
}
-
- /**
- * Get the color
- * @return The color
- * @hibernate.property
- */
- public Color getColor() {
- return color;
- }
-
- /**
- * Set the color
- * @param color The color
- */
- public void setColor(Color color) {
- this.color = color;
- }
/**
--- 50,53 ----
***************
*** 87,91 ****
*/
public void setColor3fv(float[] color3fv) {
! color = new Color(color3fv[0], color3fv[1], color3fv[2]);
}
--- 56,60 ----
*/
public void setColor3fv(float[] color3fv) {
! this.color3fv = color3fv;
}
***************
*** 96,100 ****
*/
public float[] getColor3fv() {
! return color.getRGBColorComponents(null);
}
}
--- 65,69 ----
*/
public float[] getColor3fv() {
! return color3fv;
}
}
|