01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/plugins/J3dFlyMouseBehaviorPluginPreference.java,v 1.1 2005/04/20 21:04:40 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is Java 3D(tm) Fly Through.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dfly.plugins;
19:
20: import org.jdesktop.j3dfly.utils.vpbehaviors.J3dFlyMouseBehavior;
21:
22: /**
23: *
24: * @author Paul Byrne
25: * @version $Revision: 1.1 $
26: */
27: public abstract class J3dFlyMouseBehaviorPluginPreference extends
28: PluginPreference {
29:
30: J3dFlyMouseBehavior behavior = null;
31:
32: /** Holds value of property angleStep. */
33: private float angleStep = (float) Math.toRadians(3);
34:
35: /** Holds value of property forwardStep. */
36: private float forwardStep = 10f;
37:
38: /** Creates new J3dFlyMouseBehaviorPluginPreference */
39: public J3dFlyMouseBehaviorPluginPreference() {
40: super ();
41: }
42:
43: public J3dFlyMouseBehaviorPluginPreference(boolean enabled,
44: boolean installed) {
45: super (enabled, installed);
46: }
47:
48: /** Getter for property angleStep.
49: * @return Value of property angleStep.
50: */
51: public float getAngleStep() {
52: return angleStep;
53: }
54:
55: /** Setter for property angleStep.
56: * @param angleStep New value of property angleStep.
57: */
58: public void setAngleStep(float angleStep) {
59: this .angleStep = angleStep;
60: System.out.println("Set angle " + angleStep + " " + this );
61:
62: if (behavior != null) {
63: System.out.println("doing set");
64: behavior.setAngleStep(angleStep);
65: }
66: }
67:
68: /** Getter for property forwardStep.
69: * @return Value of property forwardStep.
70: */
71: public float getForwardStep() {
72: return forwardStep;
73: }
74:
75: /** Setter for property forwardStep.
76: * @param forwardStep New value of property forwardStep.
77: */
78: public void setForwardStep(float forwardStep) {
79: this .forwardStep = forwardStep;
80: if (behavior != null) {
81: behavior.setForwardStep(forwardStep);
82: }
83: }
84:
85: /**
86: * Set the Behavior for this Preference
87: */
88: public void setBehavior(J3dFlyMouseBehavior behavior) {
89: this.behavior = behavior;
90: }
91: }
|