JSP Constructor Documentation







  The JSP Constructor itself does not have a help facility.  In future versions, this should be a priority,  but for the time being these pages should provide some basic assistance in making use of the construction environment.  These help pages will cover:
 


Construction Objects

    The JSP Constructor is capable of utilizing many, but not all of the Java SketchPad objects.  It Currently supports sketches which contain:
 

    These objects can be added to the construction list in the editor by clicking on the appropriate button, and completing the object editor.  Once the "okay" button has been pressed, the object will be added to the list.

    Many of these objects require previously defined objects to be present on the construction list.  So, 2 points must be present in order to construct a segment.  This means that it is necessary to make sure that all dependencies are satisfied.  If for some reason an object is dependent on an object which occurs after it, the dependency can be resolved by moving the invalid object to the end of the list.  For example, if one creates 2 points 'A', and 'B', then adds the segment 'AB', the construction will be valid.  However, if they decide to change 'B', it will be moved to the end of the list, and 'AB' will be declared invalid.  To resolve the situation, click on the object 'AB', and then press the 'view/edit object' button.  When the editor window appears, click 'update'.  This will cause the object 'AB' to be moved to the end of the construction list, resolving the dependency error.

Create a Construction

    It is possible to either create a construction from scratch, to complete a construction that has been partially finished, or to alter a construction that has already been finished (and saved).

    Adding objects to a construction is just a matter of pressing the appropriate button, and filling out the appropriate fields in the object editor.  Then press 'okay'.

    Some objects are dependent on other objects.  These other objects must be defined before the dependent object can be declared valid.  If there is a dependency problem, causing an object to be declared invalid, simply update the objects location, moving it to the end of the list.  This can be done by selecting the invalid object, pressing the 'view/edit object' button, then pressing the 'update' button in the object editor.

    Once an object has been created it may be altered.  This is done by selecting the object in the construction list, and pressing the 'view/edit object' button.  When the parameters have been changed, the user should press the 'okay' button.  The old object will be removed from its place in the list, and the new object will be placed at the end of the list.  This may cause a dependency error, so check to make sure that no other objects have been marked 'invalid'.

    In addition, it is possible to alter some of the JSP applets properties.  These include the height, and width, and the background color of the sketch.  To do this, press the 'Applet parameters' button, and make the appropriate modifications in the editor.

Rendering Constructions

    Once the construction has been completed, or even at a some point during its assembly, it is possible to render the construction in an encapsulated JSP applet.  This can be done by pressing the 'render construction' button.  At this point a window will open, and a copy of the JSP applet will be loaded in, with the construction intact.  The construction should be live, and appear approximately as it would in a browser window.  If there is a desire to change the sketch, this can be done as described above, and the 'render construction' button pressed again.  The applet window should "blink" briefly, and the new construction appear.  If the window appears blank, try resizing it.  This may be necessary to force the system to repaint the window.  If that does not work, check the coordinates that you have given to your objects, and the applet size.  The coordinates may lie outside the visible area.

Saving/Loading Constructions

    It is possible to save and load construction which are partially, or fully completed.  This allows the user to work on a sketch over several days, or to use a partially completed sketch and the construction environment as a pedagogical tool.  To save a sketch press the 'save construction' button, type in the name of the file to load, and press the 'okay' button.  To load a sketch, presse the 'load construction' button, and do the same.

Generating the HTML for Construction Distribution

    Once a sketch has been finalized, and is ready for distribution, it is possible to obtain the necessary HTML by pressing the 'Generate HTML' button.  When this is done the HTML needed to invoke the Java SketchPad applet with the desired construction will be printed to the console window.  Simply select this text, copy and paste to a text editor containing the desired webpage.  Once the HTML tags have been inserted in the page, save it in the appropriate web directory.  In order for the JSP applet to be transfered to the browser, the classfiles must be made available.  They can be obtained from the JSP website, and should be located in such a way as to match the "codebase" reference in the HTML tags.