simkin.examples.applet
Class ScriptedDialog

java.lang.Object
  |
  +--simkin.ExecutableRoot
        |
        +--simkin.XMLElementObject
              |
              +--simkin.XMLExecutable
                    |
                    +--simkin.examples.applet.ScriptedDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, Executable

public class ScriptedDialog
extends XMLExecutable
implements java.awt.event.ActionListener

This class shows how you can use Simkin to show dialogs described in an XML script


Constructor Summary
ScriptedDialog(java.io.InputStream in, Interpreter interp)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          this method catches button clicks and calls methods
 void close()
          This method closes the dialog - because it is public it can be called from Simkin scripts
 java.lang.String getText(java.lang.String name)
          This method returns the text in a text control - because it is public it can be called from Simkin scripts
 void msgBox(java.lang.String str)
          This method shows a message box - because it is public it can be called from Simkin scripts
 void reload(java.io.InputStream in)
          this method makes the dialog reload itself from the XML stream
 void setFocus(java.lang.String name)
          This method sets the focus to a particular control - because it is public it can be called from Simkin scripts
 
Methods inherited from class simkin.XMLExecutable
load, load, save, save
 
Methods inherited from class simkin.XMLElementObject
addElement, containsElement, copyAttributesInto, copyItemsInto, createIterator, createIterator, createXMLElementObject, dump, enumerate, enumerate, equals, findChild, findChild, findChild, getAddIfNotPresent, getAttribute, getAttributes, getData, getElement, getInstanceVariables, getLocation, getSource, getValue, getValueAt, method, setAddIfNotPresent, setAttribute, setData, setElement, setValue, setValueAt, tagName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptedDialog

public ScriptedDialog(java.io.InputStream in,
                      Interpreter interp)
               throws java.io.FileNotFoundException,
                      org.xml.sax.SAXException,
                      java.io.IOException
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
this method catches button clicks and calls methods

Specified by:
actionPerformed in interface java.awt.event.ActionListener

msgBox

public void msgBox(java.lang.String str)
This method shows a message box - because it is public it can be called from Simkin scripts


reload

public void reload(java.io.InputStream in)
this method makes the dialog reload itself from the XML stream


close

public void close()
This method closes the dialog - because it is public it can be called from Simkin scripts


setFocus

public void setFocus(java.lang.String name)
This method sets the focus to a particular control - because it is public it can be called from Simkin scripts

Parameters:
name - the control name

getText

public java.lang.String getText(java.lang.String name)
This method returns the text in a text control - because it is public it can be called from Simkin scripts

Parameters:
name - the control name
Returns:
the text in the control (or blank if the control is not a text control)