home
download
about
gallery
graphs and sliders
documentation
models
contact

all guides   |   previous   |  next

contents   AppletConfigEditor   CalcResultsEditor   CcmbGuideEditor   CcmbObjectEditor   CcmbViewEditor   ColorTableEditor   ColorTargetEditor   DataClipboardEditor   ErrorLogEditor   FileLoaderEditor   HelpTargetEditor   InfoMessageEditor   LineSetEditor   ObjectInfoEditor  

AppletConfigEditor

The appletizer lets you package up a group of windows in a single panel which can then be saved and reloaded as an applet from a Web site. There is a short cut to the applet tool under the misc menu. The process works by defining one or more AppletConfig objects which contain a specification ofthe desired applet: what panels to include, how to arrange them, and any documentation to go with them.

For laying out an applet, the required information is its size and the location of components within it. The only layout allowed for applets is the native java BorderLayout which has panels at the top and bottom spanning the full width and at the left, right and center of the middle section. Panels can be empty, and successive border layouts can be nested to an arbitrary depth.

On opening the appletizer, you have a display of the applet layout in the center and on the right a row of boxes corresponding to the windows which are currently open. At the top right is a tear-off BorderLayout which can be dragged onto any panel of the current layout. Use the "clear" button to revert to the original.

An applet is constructed by dragging in panel dividers as required and then dropping the boxes you want into the areas where you want them. Although the sizes of subpanels can be changed by dragging their control points this does not affect the layout of the applet. Instead the sizes of panels in the final applet are taken from the current sizes of windows on the screen. Each time the applet is previewed the current sizes of the various windows are used. The final applet can be adjusted by previeing it, noting the layout, closing the preview panel and adjusting the individual windows. Although it tries to use the current sizes of the windows, in fitting them into a rectangular grid it tends to stretch rather than squash to meet the space requrements of the largest ones in either direction. This means that the final applet tends to be rather larger than the windows it is made from, so the windows should generally be squashed below their ideal size when making the applet. The relative positions in the layout also control exactly which windows get stretched most. You may have to try several different arrangements to get it to look right.

To add documentation for the applet click the edit text button. You can either type into that window, or create a file with a normal editor and load then it into the applet. This text is saved inside the model file when the applet is written and is either displayed in the HelpTargetEditor or put into html pages from which the applet can beloaded.

To save an applet use the save model button and specify a normal Catacomb .ccm ). The model is saved in the usual way, including the applet definition. The model can then be loaded into the Catacomb appletviewer to run the applet.

The save with html option saves the model as above and also writes template html pages illustrating how to load the applet from html documents on a web server. The html pages are for convenience only and can be regenerated whenever necessary from the model file containing the applet definition. When prompted for a file name, give the desired name for the model, with the .ccm extension. The html files will be made from the same root with different extensions.