View Javadoc

1   /* -------------------------------------------------------------------
2    * Java source file for the class Vector4dEditor
3    * 
4    * Copyright (c), 2003, Masahiro Takatsuka.
5    * All Rights Researved.
6    * 
7    * Original Author: Masahiro Takatsuka (masa@jbeans.net)
8    * $Author: takatsukam $
9    * 
10   * $Date: 2004/03/03 11:53:05 $
11   * 
12   * $Id: Vector4dEditor.java,v 1.3 2004/03/03 11:53:05 takatsukam Exp $
13   * 
14   * Reference:		Document no:
15   * ___				___
16   * 
17   * To Do:
18   * ___
19   * 
20  ------------------------------------------------------------------- */
21  
22  /* --------------------------- Package ---------------------------- */
23  package net.jbeans.j3d.bean.property.editor;
24  
25  /* ------------------ Import classes (packages) ------------------- *//package-summary/html">class="comment"> ------------------ Import classes (packages) ------------------- *//package-summary.html">class="comment">/* ------------------ Import classes (packages) ------------------- *//package-summary.html">class="comment"> ------------------ Import classes (packages) ------------------- */
26  import javax.vecmath.*;
27  
28  /*====================================================================
29                  Implementation of class Vector4dEditor                
30  ====================================================================*/
31  /***
32   * A property editor for editing Vecot4d.
33   * 
34   * @version $Revision: 1.3 $
35   * @author Masahiro Takatsuka (masa@jbeans.net)
36   * @see Tuple4dEditor
37   */
38  
39  public final class Vector4dEditor extends Tuple4dEditor {
40      public Vector4dEditor() {
41  		super();
42      }
43  
44      public Object getValue()  {
45          return new Vector4d((Tuple4d) super.getValue());
46      }
47  	
48      public String getJavaInitializationString() {
49  		Vector4d value = (Vector4d) getValue();
50          return "new javax.vecmath.Vector4d(" + value.x + ", " + value.y + ", " + value.z + ", " + value.w + ")";
51      }
52  }