General Program Structure
(for those who wish to add a new page generator)
The user interface is generate by the Jmol_Web_Page_Maker
routine. It adds panels defined by routines in each of the
objects that produce the web pages. The main routine knows
nothing about what these panels contain.
1) Each panel must have an event handler.
2) Each panel must generate the .html file based on the events that
occur in its panel.
3) Each panel should send error messages and progress messages to the
Log/Error panel using the LogPanel.Log("message") routine provided by
the main program.
The basic structure of a new class that creates a panel and the .html
page is (see existing code for necessary imports, etc.):
public class name extends
JPanel implements ActionListener{
//Internal variable declarations
//The panel generator
public JComponent Panel(){ //code goes here}
//the action listener
public void actionPerformed(ActionEvent e) {//code
goes here}
//the .html generator. Returns true on
success. Also throws IOExceptions to the action listener.
//This could probably be a private routine as well.
public boolean name
of routine(variable list)
throws IOException {//code goes here}
}
Last Update: 7/21/06
Jonathan Gutow