01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/plugins/VPBehaviorPlugin.java,v 1.1 2005/04/20 21:04:45 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.J3dFlyContext;
21:
22: /**
23: * Superclass for all ViewPlatform Behavior plugins.
24: *
25: * These plugins are 'special' in that they are installed normally, but
26: * the GUI is handled exclusively by ViewingPlatformControlPlugin.
27: *
28: * @author Paul Byrne
29: * @version $Revsion$
30: */
31: public abstract class VPBehaviorPlugin extends J3dFlyPlugin {
32:
33: private boolean active = false;
34:
35: /**
36: * Called to set this behavior to be active or inactive.
37: *
38: * Only one VP Behavior can be active at a given time. This is managed
39: * by J3dFlyController
40: */
41: public void setActive(boolean active) {
42: this .active = active;
43: }
44:
45: /**
46: * Is this Behavior active ?
47: */
48: public boolean isActive() {
49: return active;
50: }
51:
52: /**
53: * Return the String to be used in the Behavior selection Menu
54: */
55: public abstract String getMenuString();
56:
57: /**
58: * Return the Icon for the toolbar button
59: */
60: public abstract javax.swing.Icon getToolbarIcon();
61:
62: /**
63: * Return the tooltip string for the Menu and Toolbar
64: */
65: public abstract String getTooltipText();
66:
67: /**
68: * Install the plugin into j3dfly with the supplied preferences
69: *
70: * Access this functionality through the preference object for this
71: * plugin
72: */
73: public void installPlugin(PluginPreference pluginPref,
74: J3dFlyContext j3dflyContext) {
75: super.installPlugin(pluginPref, j3dflyContext);
76: }
77: }
|