org.jmol.applet
Class Jmol

java.lang.Object
  extended by org.jmol.applet.Jmol
All Implemented Interfaces:
JmolAppletInterface, WrappedApplet

public class Jmol
extends Object
implements WrappedApplet


Nested Class Summary
(package private)  class Jmol.MyStatusListener
           
 
Field Summary
(package private)  AppletWrapper appletWrapper
           
(package private)  String[] callbacks
           
protected  boolean doTranslate
           
(package private)  JmolFileDropper dropper
           
(package private)  String fullName
           
protected  Graphics gRight
           
private  boolean hasProgressBar
           
(package private)  boolean haveDocumentAccess
           
(package private)  String htmlName
           
(package private)  boolean isSigned
           
protected  boolean isStereoSlave
           
private  boolean isUpdating
           
(package private)  String language
           
(package private)  String languagePath
           
private  int lastMotionEventNumber
           
(package private)  boolean loading
           
(package private)  boolean mayScript
           
(package private)  StringBuffer outputBuffer
           
private  int paintCounter
           
private static String[] progressbarMsgs
           
private static boolean REQUIRE_PROGRESSBAR
           
private static int SCRIPT_CHECK
           
private static int SCRIPT_NOWAIT
           
private static int SCRIPT_WAIT
           
 boolean showPaintTime
           
private  String statusForm
           
private  String statusText
           
private  String statusTextarea
           
(package private)  String syncId
           
private  long timeBegin
           
private  int timeCount
           
private  int timeLast
           
private  int timeTotal
           
protected  JmolViewer viewer
           
 
Constructor Summary
Jmol()
           
 
Method Summary
 void destroy()
           
private  String fmt(int num)
           
 String getAppletInfo()
           
private  boolean getBooleanValue(String propertyName, boolean defaultValue)
           
(package private)  String getParameter(String paramName)
           
 Object getProperty(String infoType)
           
 Object getProperty(String infoType, String paramInfo)
           
 String getPropertyAsJSON(String infoType)
           
 String getPropertyAsJSON(String infoType, String paramInfo)
           
 String getPropertyAsString(String infoType)
           
 String getPropertyAsString(String infoType, String paramInfo)
           
private  String getValue(String propertyName, String defaultValue)
           
private  String getValueLowerCase(String paramName, String defaultValue)
           
 boolean handleEvent(Event e)
           
 void init()
           
 void initApplication()
           
 void initWindows()
           
 String loadDOMNode(netscape.javascript.JSObject DOMNode)
           
 String loadInline(String strModel)
          Deprecated.  
 String loadInline(String[] strModels)
          Deprecated.  
 String loadInline(String[] strModels, String script)
          Deprecated.  
 String loadInline(String strModel, String script)
          Deprecated.  
 String loadInlineArray(String[] strModels, String script, boolean isAppend)
           
private  String loadInlineSeparated(String strModel, String script)
           
 String loadInlineString(String strModel, String script, boolean isAppend)
           
 String loadNodeId(String nodeId)
           
 void paint(Graphics g)
           
private  void printProgressbarMessage(Graphics g)
           
 void script(String script)
           
 String scriptCheck(String script)
           
 String scriptNoWait(String script)
           
private  String scriptProcessor(String script, String statusParams, int processType)
           
 String scriptWait(String script)
           
 String scriptWait(String script, String statusParams)
           
 String scriptWaitOutput(String script)
           
(package private)  void sendJsTextareaStatus(String message)
           
(package private)  void sendJsTextStatus(String message)
           
 void setAppletWrapper(AppletWrapper appletWrapper)
           
private  void setLogging()
           
 Graphics setStereoGraphics(boolean isStereo)
           
private  void setStringProperty(String name, String value)
           
private  void setValue(String name, String defaultValue)
           
private  void showTimes(int x, int y, Graphics g)
           
private  void startPaintClock()
           
private  void stopPaintClock()
           
 void syncScript(String script)
           
 void update(Graphics g)
           
private  void update(Graphics g, String source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mayScript

boolean mayScript

haveDocumentAccess

boolean haveDocumentAccess

loading

boolean loading

callbacks

String[] callbacks

language

String language

htmlName

String htmlName

fullName

String fullName

syncId

String syncId

languagePath

String languagePath

appletWrapper

AppletWrapper appletWrapper

viewer

protected JmolViewer viewer

REQUIRE_PROGRESSBAR

private static final boolean REQUIRE_PROGRESSBAR
See Also:
Constant Field Values

hasProgressBar

private boolean hasProgressBar

doTranslate

protected boolean doTranslate

statusForm

private String statusForm

statusText

private String statusText

statusTextarea

private String statusTextarea

paintCounter

private int paintCounter

isSigned

boolean isSigned

dropper

JmolFileDropper dropper

showPaintTime

public boolean showPaintTime

isUpdating

private boolean isUpdating

gRight

protected Graphics gRight

isStereoSlave

protected boolean isStereoSlave

progressbarMsgs

private static final String[] progressbarMsgs

timeLast

private int timeLast

timeCount

private int timeCount

timeTotal

private int timeTotal

timeBegin

private long timeBegin

lastMotionEventNumber

private int lastMotionEventNumber

SCRIPT_CHECK

private static final int SCRIPT_CHECK
See Also:
Constant Field Values

SCRIPT_WAIT

private static final int SCRIPT_WAIT
See Also:
Constant Field Values

SCRIPT_NOWAIT

private static final int SCRIPT_NOWAIT
See Also:
Constant Field Values

outputBuffer

StringBuffer outputBuffer
Constructor Detail

Jmol

public Jmol()
Method Detail

setAppletWrapper

public void setAppletWrapper(AppletWrapper appletWrapper)
Specified by:
setAppletWrapper in interface WrappedApplet

init

public void init()
Specified by:
init in interface WrappedApplet

destroy

public void destroy()
Specified by:
destroy in interface WrappedApplet

getParameter

String getParameter(String paramName)

setStereoGraphics

public Graphics setStereoGraphics(boolean isStereo)
Specified by:
setStereoGraphics in interface JmolAppletInterface

initWindows

public void initWindows()

setLogging

private void setLogging()

getBooleanValue

private boolean getBooleanValue(String propertyName,
                                boolean defaultValue)

getValue

private String getValue(String propertyName,
                        String defaultValue)

getValueLowerCase

private String getValueLowerCase(String paramName,
                                 String defaultValue)

initApplication

public void initApplication()

setValue

private void setValue(String name,
                      String defaultValue)

setStringProperty

private void setStringProperty(String name,
                               String value)

sendJsTextStatus

void sendJsTextStatus(String message)

sendJsTextareaStatus

void sendJsTextareaStatus(String message)

paint

public void paint(Graphics g)
Specified by:
paint in interface WrappedApplet

update

public void update(Graphics g)
Specified by:
update in interface WrappedApplet

update

private void update(Graphics g,
                    String source)

printProgressbarMessage

private void printProgressbarMessage(Graphics g)

handleEvent

public boolean handleEvent(Event e)
Specified by:
handleEvent in interface WrappedApplet

startPaintClock

private void startPaintClock()

stopPaintClock

private void stopPaintClock()

fmt

private String fmt(int num)

showTimes

private void showTimes(int x,
                       int y,
                       Graphics g)

scriptProcessor

private String scriptProcessor(String script,
                               String statusParams,
                               int processType)

script

public void script(String script)
Specified by:
script in interface JmolAppletInterface

scriptCheck

public String scriptCheck(String script)
Specified by:
scriptCheck in interface JmolAppletInterface

scriptNoWait

public String scriptNoWait(String script)
Specified by:
scriptNoWait in interface JmolAppletInterface

scriptWait

public String scriptWait(String script)
Specified by:
scriptWait in interface JmolAppletInterface

scriptWait

public String scriptWait(String script,
                         String statusParams)
Specified by:
scriptWait in interface JmolAppletInterface

scriptWaitOutput

public String scriptWaitOutput(String script)
Specified by:
scriptWaitOutput in interface JmolAppletInterface

syncScript

public void syncScript(String script)
Specified by:
syncScript in interface JmolAppletInterface

getAppletInfo

public String getAppletInfo()
Specified by:
getAppletInfo in interface WrappedApplet

getProperty

public Object getProperty(String infoType)
Specified by:
getProperty in interface JmolAppletInterface

getProperty

public Object getProperty(String infoType,
                          String paramInfo)
Specified by:
getProperty in interface JmolAppletInterface

getPropertyAsString

public String getPropertyAsString(String infoType)
Specified by:
getPropertyAsString in interface JmolAppletInterface

getPropertyAsString

public String getPropertyAsString(String infoType,
                                  String paramInfo)
Specified by:
getPropertyAsString in interface JmolAppletInterface

getPropertyAsJSON

public String getPropertyAsJSON(String infoType)
Specified by:
getPropertyAsJSON in interface JmolAppletInterface

getPropertyAsJSON

public String getPropertyAsJSON(String infoType,
                                String paramInfo)
Specified by:
getPropertyAsJSON in interface JmolAppletInterface

loadInlineString

public String loadInlineString(String strModel,
                               String script,
                               boolean isAppend)
Specified by:
loadInlineString in interface JmolAppletInterface

loadInlineArray

public String loadInlineArray(String[] strModels,
                              String script,
                              boolean isAppend)
Specified by:
loadInlineArray in interface JmolAppletInterface

loadInline

public String loadInline(String strModel)
Deprecated. 

Specified by:
loadInline in interface JmolAppletInterface
Parameters:
strModel -
Returns:
error or null

loadInline

public String loadInline(String strModel,
                         String script)
Deprecated. 

Specified by:
loadInline in interface JmolAppletInterface
Parameters:
strModel -
script -
Returns:
error or null

loadInline

public String loadInline(String[] strModels)
Deprecated. 

Specified by:
loadInline in interface JmolAppletInterface
Parameters:
strModels -
Returns:
error or null

loadInline

public String loadInline(String[] strModels,
                         String script)
Deprecated. 

Specified by:
loadInline in interface JmolAppletInterface
Parameters:
strModels -
script -
Returns:
error or null

loadInlineSeparated

private String loadInlineSeparated(String strModel,
                                   String script)

loadDOMNode

public String loadDOMNode(netscape.javascript.JSObject DOMNode)
Specified by:
loadDOMNode in interface JmolAppletInterface

loadNodeId

public String loadNodeId(String nodeId)
Specified by:
loadNodeId in interface JmolAppletInterface