Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util on MAIN
Box.java+42-21.1 -> 1.2
JM: add default attribute values and param accessors

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util
Box.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- Box.java	28 Feb 2005 07:33:47 -0000	1.1
+++ Box.java	31 Oct 2007 19:55:39 -0000	1.2
@@ -1,28 +1,68 @@
 package org.lcsim.geometry.compact.converter.lcdd.util;
 
+import org.jdom.DataConversionException;
+
 
 /**
  *
  * @author tonyj
  */
 public class Box extends Solid
-{
-   
+{   
    /** Creates a new instance of Box */
    public Box(String name)
    {
       super("box",name);
+      setAttribute("x",String.valueOf(0.));
+      setAttribute("y",String.valueOf(0.));
+      setAttribute("z",String.valueOf(0.));
    }
+   
    public void setX(double x)
    {
       setAttribute("x",String.valueOf(x));
    }
+   
    public void setY(double y)
    {
       setAttribute("y",String.valueOf(y));
    }
+   
    public void setZ(double z)
    {
       setAttribute("z",String.valueOf(z));
    }
+   
+   public double getX()
+   {
+	   try {
+		   return getAttribute("x").getDoubleValue();
+	   }
+	   catch (DataConversionException x)
+	   {
+		   throw new RuntimeException(x);
+	   }
+   }
+   
+   public double getY()
+   {
+	   try {
+		   return getAttribute("y").getDoubleValue();
+	   }
+	   catch (DataConversionException x)
+	   {
+		   throw new RuntimeException(x);
+	   }
+   }
+   
+   public double getZ()
+   {
+	   try {
+		   return getAttribute("z").getDoubleValue();
+	   }
+	   catch (DataConversionException x)
+	   {
+		   throw new RuntimeException(x);
+	   }
+   }
 }
CVSspam 0.2.8