Vispatch Tutorial (using Java 1.02) > TOC > Applet Editing Features > Program Text Window

Program Text Window

You may want to save a Vispatch document that you have created with the applet.  Security restriction prevent an applet running in a WWW browser from saving to the local hard disk.  However, the applet can display a textual representation of the program in a separate window.  WWW browsers usually allow you to manually copy this text, which you can then paste into any text editor and save.

To display the program text window, click on the bottom tool, which is labeled "Save/Load".  This window has three buttons.  The left button replaces the window contents with a complete textual description of the Vispatch document.  The middle button erases the current document.  The right button takes the figures described by the current program text and adds them to the document.  Try the following:

  1. Select the following lines of program text.

  2. vPoint(134497535,0.025925925925925925,0.5214285714285715)
    vPoint(134495761,0.4148148148148148,0.9880952380952379)
    vScope(134497535,134495761,-16777216)
    vPoint(134549213,0.5537037037037037,0.7)
    vPoint(134549234,0.9962962962962963,1.0095238095238095)
    vScope(134549213,134549234,-16777216)
    vPoint(134439783,0.5796296296296296,0.7523809523809524)
    vPoint(134439689,0.9351851851851852,0.9809523809523808)
    vRule(134439783,134439689,-16777216)
    vPoint(134457144,0.5796296296296296,0.7333333333333333)
    vFigureString(134457144,134457144,"Rule to draw a fractal tree:",-16777216)
    vPoint(134436830,0.8111111111111111,0.7952380952380952)
    vnpScaleRot(134436830,134436830,-16777216)
    vPoint(134393005,0.8703703703703703,0.8)
    vnpScaleRot(134393005,134393005,-16777216)
    vPoint(134571365,0.837037037037037,0.8380952380952381)
    vDragEvent(134571365,134393005,-16777216)
    vDragEvent(134571365,134436830,-16777216)
    vPoint(134571386,0.837037037037037,0.9142857142857144)
    vFigureLine(134571365,134571386,-65536)
    vPoint(134565362,0.6333333333333333,0.8452380952380952)
    vEquivPoint(134565362,134571365,-16777216)
    vPoint(134551932,0.6333333333333333,0.9095238095238096)
    vEquivPoint(134551932,134571386,-16777216)
    vDragEvent(134551932,134565362,-16777216)
    vFigureLine(134571386,134571365,-65536)
    vDispatch(134495761,134549213,-16777216)
     
  3. Copy it.  (Don't worry, there is no reason to read it.)
  4. Click on the "Save/Load" button.
  5. Delete any text in the window, if any.
  6. Paste the lines of program text into the window.
  7. Press the middle "clear" button to start with an empty document.
  8. Press the right "Text-->>Drawing" button.
(Note that the buttons in the program text window do not display on some versions of Internet Explorer.  Until this bug is fixed, you can do the last step by dragging out a selection rectangle and pressing control-"v".)

(Note: the Java 1.02 applet below does not have the editing features required for this demonstration.)
 
You can also use the program text window to save and load part of a document by using copy and paste, because the copy and paste commands use the program text window as a clipboard.  Try dragging out a small selection rectangle on the screen and press control-"v".  A miniature version of the program should be pasted in, just like the one that was showing when this web page was first loaded.

Also try selecting a some graphical object in the document and typing control-"c", and then display the program text window.  Notice only program text for the selected object is generated.