For NPIB1.5 modules a split web page appears with the NPIB1.5 form in the lower frame and the upper frame appears with the "how-to-use" instructions. The lower frame is created by a java form builder. This web page describes how to create the NPIB1.5 form for the polar plot module02 as an example.
The NPIB1.5 form, shown below, appears in the lower frame.
We provide a NPIB1.5 form editor ("form.jar") that creates new NPIB1.5 (*.npib) files or edits existing NPIB1.5 (*.npib) files. This NPIB form editor is located in two places:
NOTE: We assume that server-users will have their own accounts
on the server (i.e. spelunker), but NPIB1.5 files (*.npib) could also
be created and edited on remote workstations and transfered onto the
server (i.e. spelunker) using standard ftp. When creating NPIB1.5
form files directly on the server (i.e. spelunker), ftp file transfer
is eliminated, however when working from a remote workstation either
ssh or setenv DISPLAY must be setup for viewing the "NPIB Creator"
window at the remote workstation.
In this case the /www/jwave/applets98/form.jar is accessed by setting both the PATH and CLASSPATH to this directory. With these two paths set any NPIB1.5 file (*.npib) in any directory can be edited when you are logged on spelunker.sv.vt.edu.
For this example we go to the directory /www/jwave/crcd/kriz/modules/module02 and edit the file polar.npib with the following command at the UNIX prompt.
spelunker% form1.5 -e polar.npib
To create a new NPIB1.5 (*.npib) file at the UNIX prompt type...
spelunker% form1.5 -e
You can give this file a name using the "Save" option when you leave the editor.
Two "Working Windows" should appear on your monitor**: (1) "NPIB Creator" and (2) "Output Editor". IF you are logged onto the server (i.e. spelunker) from a remote workstation and are using NPIB1.5 form.jar file on the server you must have setup the environmental DISPLAY variable to display X-windows back to your remote workstation**. But you can also install your own NPIB1.5 form.jar file in the ~/bin directory off of your home directory on your remote workstation, similar to how the NPIB1.5 form.jar file was setup on the ~/bin directory on the server (i.e. spelunker). Editing *.npib files from a remote workstation requires the user to transfer (*.npib) files from the remote workstation to the appropriate directory on the server (i.e. spelunker).
At the top of the NPIB Creator "Working Window" you can select from a number of pulldown menu options.
At the top of the NPIB Creator window under File, the choices are as expected New, Open, Save and Exit. Under Edit there is only one choice -- Remove which removes the last entry that was created form the items under Insert shown below.
Under Insert the choices are Text Field, Label, and Button. The majority of the time you will select a Text Field box with a Label above the box. A Button is used to select or initiate a task, for example the Submit button is used to create a file, in this case polar.dat, from the information on the NPIB1.5 form and then submit this file to the application for processing.
When and item is selected under Insert an Insert-window appears prompting you to enter a unique name for this item: Text-Field, Label, Button. This name will be used again in the Output Editor "Working Window".
After you have entered a unique name followed by OK, the item should appear in the the upper left corner of the NPIB Creator window. To move and reposition the button, label, or text-field items, simply select the item to be moved by holding down the left mouse button over the item on the NPIB Creator "Working Window" and drag (hold down mouse button while moving the mouse) the item by moving the mouse to the desired location. When you let go of the mouse button the item will appear in the new location. NOTE: you will not see the item "move" but rather the item will re-appear in the new position of the NPIB form near the location where the left mouse button was released. You may have to reposition the selected item a second time and "fine-tune" the the exact location. This is not intuative and takes some practice. In this way all of the items (Text Field, Label, Button) of a working NPIB form can be created and positioned as desired.
Next you will want to assign more information to your button, label or text-field. When a text field, label, or button is selected with the left mouse button a "Properties" window appears that requires you enter specific infomation for that item. For example the figures below show Property windows for each of the items: Text Field, Label, and Button.
Common to all these windows are constraints, foreground, background, and font. If the item is the last in a row you must specify this by changing the "Grid Width" constraint parameter from 1 to 0. Default for the "Grid Width" parameter is one "1".
Experiment with and change foreground, background, and font as needed.
Text Field Property Window options: selectionStart, text, columns,
caretPosition, and selectionsEnd:
Label Property Window options: alignment
Button Property Window options: actionCommand
This "Working Window" describes how the data that is displayed in the NPIB form will be formatted in the file submitted to the shell script.
For comparison the resulting file polar.dat shown below corresponds to the syntax shown above.
GRAPHITE-EPOXY EPOXY ELASTIC PROPERTIES ( N/M**2 ) EPOXY YOUNGS MODULUS, EM=+5.280E+09 EPOXY POISSONS RATIO, NUM=0.354 FIBER ELASTIC PROPERTIES ( N/M**2 ) FIBER LONGITUDINAL YOUNGS MODULUS, EFL=+2.320E+11 FIBER TRANSVERSE YOUNGS MODULUS, EFT=+1.500e+10 FIBER SHEAR MODULUS L-T PLANE, GFLT=+2.400e+10 FIBER SHEAR MODULUS T PLANE, GFTT=+5.020E+09 FIBER PLANE STRAIN BULK MODULUS, KFTT=+1.500E+10 FIBER VOLUME FRACTIONS: 0.00 0.60 1.00
At the top of the "Working Window" there are two entries: (1) the name of the shell script and (2) is any other parameter the shell script might need.
The next entry links the TextField_name as the return email address when shell script is completed.
The final entry is the window where the format is set with links to each of the textfield_names. The very first line in this window defines the filename where data is stored according to the format specified in the lines below. Here spaces are important if the program reading this file as data input requires accurate spacing which seperates the numbers associated with textfield_name. Notice that all numbers associated with textfield_names use the syntax, <link="textfield_name"\> . Recall that the textfield_names were assigned when the textfield was first created. This is why the HELPFUL HINT recommended that you keep a sketch of textfiled_names associated with the numbers in the boxes on the NPIB form. You can always verify the textfield_name associated with the texfield_item on the NPIB Creator "Working Window" but it is quicker if you use a sketch.
Direct Editing NPIB Files Using a Text Editor: It is possible to directly edit the syntax of the NPIB file because it is a text file and the syntax is simple enough to understand. We only recommend that in some instances this may be an option to consider when the forms are particularly large where you may want to copy and paste large blocks. In this case again the item_name is key to finding the portion to edit.