|
|
Another cool demo that is included with the jdk is the MoleculeViewer, which allow you to view *.xyz format molecules. With this tutorial we will convert this MoleculeViewer applet. This is what it looks like (Fiddle around with it to get a good idea of what it does.):
Notice that the molecule twists around by dragging your mouse around it. The important events that occur are when you press the mouse down and when you drag it. We'll want to keep and eye out for these methods, and possibly consider buffering the dragging event to ensure buffering. Also while the viewing applet only allows the user to view one type of molecule, we'd like to make it open any kind of xyz format molecule. Hopefully there will be an openStream call that allows for this.
Click on any of the following links to view the tutorial:
Step 2: Choosing a Project Name.
Step 3: Altering the getParameter calls.
Step 4: Determining How to Handle Event Methods.
Step 5: Determing What to Share after Buffering.
Step 6: Determing How to Handle URLs.
Step 7: Determing How to Handle Streams.
Habanero® is a registered trademark owned by The Board of Trustees of the University of Illinois. Copyright 1996-1998. All rights reserved. Java(TM) is a proprietary trademark owned by Sun Microsystems, Inc.
|
|