Last updated: April, 2018.
QMTools Help:  Editor Basics

The Applet Editor allows each of the supported applets to be cloned and scripted, saved, and deployed in the target document, all without detailed intervention by the user.

divider
Editor Overview

The menu bar at the top of the Applet Editor window provides access to the editor's five main menus. Individual applet source files (or works in progress) are loaded from the File Menu, tailored to suit in the editor, then saved to disk for future retrieval or saved as an applet for insertion into a web document. The View Menu and Tools Menu allow for some editor customization and legacy operations, while the Window Menu manages multiple files within the same editor session. The Help Menu is an online roadmap to the editor's features.

Immediately below the menu bar lies a Shortcut Toolbar holding shortcuts to some of the editor's most-used features. Running the mouse over this toolbar displays a summary about the highlighted feature; the summary is visible on the Information Bar that extends across the bottom border of the editor.

The applet-to-be resides in the Editor Workspace, which fills the central portion of the editor window. After editing, the applet can be saved in its original form (".xml" extension) for future editing or exported, either as a web-page document (".htm" extension) or as a stand-alone [webstart] application (".jnlp" extension).

Editor preferences are maintained in the QMTools configuration file "QMTools.xml"; in the current version, this file holds a single entry: the default location where applet source files are read and written. The user is presented with the option to save configuration changes made during an edit session when the editor is closed. The configuration file resides in the ".qmtools" [hidden] folder of the user's home directory, which is created automatically when the editor is first opened. In the same folder the Applet Editor also maintains a log file, "QMTools.log", where errors not displayable during an edit session are recorded.

Back to Top

divider
To Prepare an Applet for Web Document Insertion

  1. From the editor's File Menu, select New. This places a skeleton applet in the workspace for further editing. Alternatively, existing applet source files (those with an ".xml" extension) can be loaded into the editor using the File Menu Open... command. Either way, a completely functional applet now resides in the editor workspace.
  2. Set up the applet as you would like it to appear when the target web document is first loaded in the end user's browser. Typically, this step would involve adjusting parameter values, creating or modifying function formulas, plotting one or more graphs, and resizing the applet window.
  3. From the File Menu, select Export As Web Page, to create a file with the same name as the source file but having an ".htm" extension. This file contains all the scripting tags needed to render the source file as a Java applet within the HTML page. [The applet source file (".xml" format) remains in the editor workspace, where it can be preserved in its current form by selecting Save from the File Menu.]
  4. The web page just created can be viewed in a web browser without further modification. Alternatively, the applet script can be copied into another web page at any location using the familiar copy and paste operations of your favorite text editor. In this way, multiple applets can be placed on the same web page amid text and other graphics to compose an entire document tailored to individual needs.

    Beginning with Oracle's Java Applet Plugin update 7u51, applets are not permitted to run unless signed by a trusted certificate. To bypass this restriction, add the following two entries to the Exception Site List on the Security Tab of the Java Control Panel:

    http://people.uncw.edu/moyerc/QMtools/
    http://jogamp.org/

    For the present at least, this workaround allows applets to run on some (but not all!) configurations. A permanent fix involves abandoning Java applets altogether in favor of Java Webstart applications (see below).

Back to Top

divider
To Convert an Applet to a Stand-alone Application

  1. Prepare the applet just as you would for web document insertion (see above), configuring it as you wish it to appear when the application is launched. Save the applet in its finished form by selecting Save from the File Menu.
  2. From the File Menu select Export As WebStart Application, to create a file with the same name as the source file but having a ".jnlp" extension. This is the application file that allows the applet to be run from the local file system as a full-featured application. The applet source file (".xml" extension) must be retained, as it is referenced by the application.
    Prior to export, the user is prompted to add a caption identifying the application. The caption appears in a bar running across the bottom of the application window, and is fully customizable (font, colors, size).
  3. The application file can be placed in any directory, where it may be launched in the same way you would any other application (e.g., 'double-clicking' on the file name).

    For security reasons, the launch directory must be included in the Java Control Panel's Exception Site List. For example, on the Macintosh platform, adding "file:///Users/" to this list will allow the application to run (after security prompts) from anywhere in the user's filespace.

    Regardless of its location in the file system, the application expects to find its associated source file in the default directory managed by the QMTools Editor (the directory that is current when the Open... menu item is activated). Changes to this directory can be saved at the user prompt when the edit session is terminated.

Back to Top