version 1.15 | version 1.16 |
---|
| |
% | % |
% $RCSfile: pg.tex,v $ | % $RCSfile: pg.tex,v $ |
% $Author: mbach $ $Locker: $ $State: Exp $ | % $Author: mbach $ $Locker: $ $State: Exp $ |
% $Revision: 1.15 $ $Date: 2002/10/01 15:26:40 $ | % $Revision: 1.16 $ $Date: 2002/10/14 23:06:47 $ |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
% DESCRIPTION: | % DESCRIPTION: |
% | % |
| |
\input{pg_intro} | \input{pg_intro} |
| |
\chapter{Modifying the applet} | \chapter{Modifying the applet} |
JMV has several ways that programmers can change the appearance of the applet for their users. For example they can the molecule that appears on startup, which controls get shown in the menu, and the URL that shows up for the Help page. | JMV has several ways that programmers can change the appearance of the applet for their users. For example, they can change the molecule that appears on startup, which controls get shown in the menu, and the URL that shows up for the Help page. |
| |
\section{Manually changing the applet code} | \section{Manually changing the applet code} |
| |
| |
\BOLDLISTITEM{FILE:} | \BOLDLISTITEM{FILE:} |
If the FILE parameter is not null, then JMV will start by | If the FILE parameter is not null, then JMV will start by |
displaying the specified molecule. This is necessary if the | displaying the specified molecule. This is necessary if the |
LOADBUTTON or CONTROLS parameters are set, since there would | LOADBUTTON or CONTROLS parameters are set to false, since there would |
be no other way to load a molecule. The file must be publicly | be no other way to load a molecule. The file must be publicly |
available if others are to view it. | available if others are to view it. |
| |
| |
| |
\BOLDLISTITEM{REP:} | \BOLDLISTITEM{REP:} |
If the REP parameter is set, JMV will display the initial | If the REP parameter is set, JMV will display the initial |
molecule with the given rep. These are the current representation | molecule with the given representation. These are the current representation |
options:\\ | options:\\ |
| |
{\bf1}: Lines\\ | {\bf1}: Lines\\ |
| |
Two additional parameters that can be specified are HEIGHT and WIDTH. | Two additional parameters that can be specified are HEIGHT and WIDTH. |
These are specified within the APPLET tag. These parameters control | These are specified within the APPLET tag. These parameters control |
the height and width of the applet itself. The default dimensions are | the height and width of the applet itself. The default dimensions are |
400 for height and 400 for width. Another important parameter within the APPLET tag is the ``ARCHIVE'' parameter. This specifies where the jar files are located. Typically, this will point to ``jmv-(version).jar, where (version) is the version number of JMV you are using, as in ``jmv-1.00.jar''. If you want to allow users to load VRML files, you must also include ``vrml97.jar''. This jar file is included in the downloads. | 400 for height and 400 for width. Another important parameter within the APPLET tag is the ``ARCHIVE'' parameter. This specifies where the jar files are located. Typically, this will point to ``jmv-({\tt version}).jar'', where ({\tt version}) is the version number of JMV you are using, as in ``jmv-1.00.jar''. If you want to allow users to load VRML files, you must also include ``vrml97.jar''. This jar file is included in the downloads. |
| |
\section{Creating a JMV applet with the Html Creator} | \section{Creating a JMV applet with the Html Creator} |
The JMV downloads also come with a form to help you create your own JMV applet. (JMVform.html, in the /creator/ directory). To use the form, fill out all the options you want modified (these are the same as the ones described earlier), and click on the ``Create Applet'' button at the bottom. The text for the Applet will appear in the text box below it. Copy and paste this text into your html page to use it. Please note that Javascript must be enabled to use the Creator. | The JMV downloads also come with a form to help you create your own JMV applet. (JMVform.html, in the creator/ directory). To use the form, fill out all the options you want modified (these are the same as the ones described earlier), and click on the ``Create Applet'' button at the bottom. The text for the Applet will appear in the text box below it. Copy and paste this text into your html page to use it. Please note that Javascript must be enabled to use the Creator. |
| |
\chapter{Adding a new Bean} | \chapter{Adding a new Bean} |
\JMV\ communicates information between the menu and the molecule window through Java Beans. Here is how to add your own Bean to the JMV code. | \JMV\ communicates information between the menu and the molecule window through Java Beans. Here is how to add your own Bean to the JMV code. |
| |
Starting with the code in JMV, make the following changes to add/modify a bean: | Starting with the code in JMV, make the following changes to add/modify a bean: |
You can add a new Bean, or change sizes, positions, etc. | You can add a new Bean, or change menus, etc. |
The files are located in the JMV\_files directory. | The files are located in the JMV\_files directory. |
In the examples, replace ``NewBean'', ``NewHookup'', etc with | In the examples, replace ``NewBean'', ``NewHookup'', etc with |
names corresponding to the beans you've created. | names corresponding to the Beans you've created. |
%\begin{verbatim} | %\begin{verbatim} |
%-------------------------------------------------------------------- | %-------------------------------------------------------------------- |
| |
| |
menuBar.add(newBeanMenu);\\ | menuBar.add(newBeanMenu);\\ |
newBeanMenuItem.initMenu(newBeanMenu); | newBeanMenuItem.initMenu(newBeanMenu); |
} | } |
If you want to add a bean to an already existing menu, replace ``newBeanMenu'' | \\ |
| If you want to add a Bean to an already existing menu, replace ``newBeanMenu'' |
with the name of the menu. | with the name of the menu. |
\end{enumerate} | \end{enumerate} |
%-------------------------------------------------------------------- | %-------------------------------------------------------------------- |
| |
| |
\chapter{Javadocs} | \chapter{Javadocs} |
The Javadocs (Java\-generated documentation files) for JMV can be accessed at \htmladdnormallink{{\tt http://www.ks.uiuc.edu/Research/jmv/current/progdocs/}}{http://www.ks.uiuc.edu/Research/jmv/current/progdocs/}. \\ | The Javadocs (Java\-generated documentation files) for JMV can be accessed at \htmladdnormallink{{\tt http://www.ks.uiuc.edu/Research/jmv/current/progdocs/}}{http://www.ks.uiuc.edu/Research/jmv/current/progdocs/}. \\ |
They contain information about the classes, functions, and member variables in the JMV code. | They contain information about the classes, functions, and member variables in the JMV code.\\ |
| To generate your own Javadocs, type the command ``make doc'' in the src/ directory in the JMV source distribution. |
% that's all, folks | % that's all, folks |
\end{document} | \end{document} |
| |