org.openscience.jmol.app.webexport
Class Widgets.Widget

java.lang.Object
  extended by org.openscience.jmol.app.webexport.Widgets.Widget
Direct Known Subclasses:
Widgets.AnimationWidget, Widgets.BackgroundColorWidget, Widgets.ConsoleWidget, Widgets.DownLoadWidget, Widgets.SpinOnWidget, Widgets.StereoViewWidget
Enclosing class:
Widgets

abstract class Widgets.Widget
extends java.lang.Object


Field Summary
(package private)  java.lang.String name
           
 
Constructor Summary
Widgets.Widget()
           
 
Method Summary
(package private) abstract  java.lang.String getJavaScript(int appletID, JmolInstance instance)
          Each Widget must implement this function and make sure to use the appletID number to specify the target applet i.e.
(package private) abstract  java.lang.String getJavaScriptFileName()
          A COPY OF THIS .JS FILE MUST BE STORED IN THE html PART OF WEBEXPORT
(package private) abstract  java.lang.String[] getSupportFileNames()
          The list of files returned by this function should contain the full path to each file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

java.lang.String name
Constructor Detail

Widgets.Widget

Widgets.Widget()
Method Detail

getJavaScript

abstract java.lang.String getJavaScript(int appletID,
                                        JmolInstance instance)
Each Widget must implement this function and make sure to use the appletID number to specify the target applet i.e. "JmolApplet"

Parameters:
appletID -
instance -
Returns:
the JavaScript and html to implement the widget

getJavaScriptFileName

abstract java.lang.String getJavaScriptFileName()
A COPY OF THIS .JS FILE MUST BE STORED IN THE html PART OF WEBEXPORT

Returns:
"none" (no file needed) or javascript file necessary to implement the widget

getSupportFileNames

abstract java.lang.String[] getSupportFileNames()
The list of files returned by this function should contain the full path to each file. The only exception is that files that only contain a filename will be assumed to be in the html section of WebExport.

Returns:
string of filenames.