showHybrid
Class ShowHybrid

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by showHybrid.ShowHybrid
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class ShowHybrid
extends java.applet.Applet

Displays orbital isosurfaces given a point set.

Applet Parameters

NAME Variable Type Default Description
CreateAxes Boolean False Determines whether coordinate axes will be created.
EnableRotate Boolean True Allows orbital to be individually rotated.
IsReady String   JavaScript variable that will be set to true when applet has initialized. Must use MAYSCRIPT in APPLET tag to use this feature.
Path String   Path from the current directory to the orbital VRML files
Set int 1 Each set bit represents an orbital set to be loaded.
bit 0     2s and 2p orbitals
bit 1     sp, 2px, and 2py orbitals
bit 2     sp2 and 2pz orbitals
bit 3     sp3 orbitals
bit 4     3d orbitals
Radius float 1.0 Radius of spheres.

Version:
1.1
Author:
David N. Blauch
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ShowHybrid()
           
 
Method Summary
 void alignOrbitals()
          For matched sphere geometries and orbitals sets, rotates the orbitals to place the z-axis along the highest axis of symmetry for the sphere geometry.
 void destroy()
           
 java.lang.String getAppletInfo()
           
 java.lang.String getParameter(java.lang.String key, java.lang.String def)
           
 java.lang.String[][] getParameterInfo()
           
 javax.vecmath.AxisAngle4d getRotation()
          Provides the current setting for the system TransformGroup.
 double getRotationAngle()
          Returns the x component of the axis of rotation for the current transform
 double getRotationX()
          Returns the x component of the axis of rotation for the current transform
 double getRotationY()
          Returns the y component of the axis of rotation for the current transform
 double getRotationZ()
          Returns the z component of the axis of rotation for the current transform
 void init()
           
 void rotateSpheres(double x, double y, double z, double a)
          Rotates the spheres.
 void setAtomView(double x, double y, double z, double xa, double ya, double za, double a)
          Sets the rotation for a specific atom to view down the x axis.
 void setAxesLength(float r)
          Sets the range of all axes from -r to r.
 void setAxesLength(float xL, float xU, float yL, float yU, float zL, float zU)
          Sets the lengths of the axes.
 void setAxesVisible(boolean s)
          Indicates whether axes are visible
 void setFontSize(int s)
          Sets the font size for the axes labels
 void setGeometry(int g, double r)
          Orients the spheres for a specific geometry:
g = 2     linear
g = 3     trigonal planar
g = 4     tetrahedral
g = 5     trigonal bipyramidal
g = 6     octahedral
g = 7     square planar
 void setOrbital(int n)
          Determines which arrows or orbitals are displayed.
 void setOrbitalSet(int n)
          Determines which orbital set is active.
 void setRadius(double r)
          Sets the radius for the spheres.
 void setRotation(double x, double y, double z, double a)
          Set the rotation for the display.
 void setShowArrow(java.lang.Boolean s)
          Determines whether arrows or orbitals are displayed
 void setShowOverlay(java.lang.Boolean s)
          Determines whether arrows/orbitals are overlaid.
 void setSphereDistance(double r)
          Sets the distance of the spheres from the origin.
 void setView(double x, double y, double z, double a)
          Sets the orbital orientation to a specific value.
 void setViewDistance(float r)
          Sets the viewing distance.
 void setXView()
          Sets the orbital orientation to view down the orbital x axis.
 void setYView()
          Sets the orbital orientation to view down the orbital y axis.
 void setZView()
          Sets the orbital orientation to view down the orbital z axis.
 void start()
           
 void stop()
           
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShowHybrid

public ShowHybrid()
Method Detail

getAppletInfo

public java.lang.String getAppletInfo()
Overrides:
getAppletInfo in class java.applet.Applet

getParameterInfo

public java.lang.String[][] getParameterInfo()
Overrides:
getParameterInfo in class java.applet.Applet

getParameter

public java.lang.String getParameter(java.lang.String key,
                                     java.lang.String def)

init

public void init()
Overrides:
init in class java.applet.Applet

start

public void start()
Overrides:
start in class java.applet.Applet

stop

public void stop()
Overrides:
stop in class java.applet.Applet

destroy

public void destroy()
Overrides:
destroy in class java.applet.Applet

alignOrbitals

public void alignOrbitals()
For matched sphere geometries and orbitals sets, rotates the orbitals to place the z-axis along the highest axis of symmetry for the sphere geometry. Otherwise one orbital is aligned with one sphere.


getRotation

public javax.vecmath.AxisAngle4d getRotation()
Provides the current setting for the system TransformGroup.

Returns:
AxisAngle4d object for the current transform

getRotationX

public double getRotationX()
Returns the x component of the axis of rotation for the current transform

Returns:
x-component of axis of rotation

getRotationY

public double getRotationY()
Returns the y component of the axis of rotation for the current transform

Returns:
y-component of axis of rotation

getRotationZ

public double getRotationZ()
Returns the z component of the axis of rotation for the current transform

Returns:
z-component of axis of rotation

getRotationAngle

public double getRotationAngle()
Returns the x component of the axis of rotation for the current transform

Returns:
angle of rotation

rotateSpheres

public void rotateSpheres(double x,
                          double y,
                          double z,
                          double a)
Rotates the spheres.

Parameters:
x - x component of axis of rotation
y - y component of axis of rotation
z - z component of axis of rotation
a - angle of rotation

setAtomView

public void setAtomView(double x,
                        double y,
                        double z,
                        double xa,
                        double ya,
                        double za,
                        double a)
Sets the rotation for a specific atom to view down the x axis.

Parameters:
x - x position
y - y position
z - z position
xa - x-component of the axis of rotation
ya - y-component of the axis of rotation
za - z-component of the axis of rotation
a - angle of rotation

setAxesLength

public void setAxesLength(float r)
Sets the range of all axes from -r to r.

Parameters:
r - limits of each axis

setAxesLength

public void setAxesLength(float xL,
                          float xU,
                          float yL,
                          float yU,
                          float zL,
                          float zU)
Sets the lengths of the axes.

Parameters:
xL - lower limit of x axis
xU - upper limit of x axis
yL - lower limit of y axis
yU - upper limit of y axis
zL - lower limit of z axis
zU - upper limit of z axis

setAxesVisible

public void setAxesVisible(boolean s)
Indicates whether axes are visible

Parameters:
s - visibility state

setFontSize

public void setFontSize(int s)
Sets the font size for the axes labels

Parameters:
s - font size for the axes labels

setGeometry

public void setGeometry(int g,
                        double r)
Orients the spheres for a specific geometry:
g = 2     linear
g = 3     trigonal planar
g = 4     tetrahedral
g = 5     trigonal bipyramidal
g = 6     octahedral
g = 7     square planar

Parameters:
g - geometry indicator
r - distance of spheres from origin

setOrbital

public void setOrbital(int n)
Determines which arrows or orbitals are displayed. Index is keyed to the orbitals sequence. If n < 0, no orbital is displayed.

Parameters:
n - index of item to be displayed

setOrbitalSet

public void setOrbitalSet(int n)
Determines which orbital set is active. The orbital set index is based upon the sequence of loaded orbital sets.

Parameters:
n - index of orbital set

setRadius

public void setRadius(double r)
Sets the radius for the spheres. Preserves existing geometry.

Parameters:
r - radius

setRotation

public void setRotation(double x,
                        double y,
                        double z,
                        double a)
Set the rotation for the display.

Parameters:
x - x component of axis of rotation
y - y component of axis of rotation
z - z component of axis of rotation
a - angle of rotation

setShowArrow

public void setShowArrow(java.lang.Boolean s)
Determines whether arrows or orbitals are displayed

Parameters:
s - displays arrows if true

setShowOverlay

public void setShowOverlay(java.lang.Boolean s)
Determines whether arrows/orbitals are overlaid.

Parameters:
s - overlays if true

setSphereDistance

public void setSphereDistance(double r)
Sets the distance of the spheres from the origin.

Parameters:
r - distance from origin

setView

public void setView(double x,
                    double y,
                    double z,
                    double a)
Sets the orbital orientation to a specific value.

Parameters:
x - x-component of the axis of rotation
y - y-component of the axis of rotation
z - z-component of the axis of rotation
a - angle of rotation (right hand rule)

setViewDistance

public void setViewDistance(float r)
Sets the viewing distance.

Parameters:
r - new viewing distance (along z axis)

setXView

public void setXView()
Sets the orbital orientation to view down the orbital x axis.


setYView

public void setYView()
Sets the orbital orientation to view down the orbital y axis.


setZView

public void setZView()
Sets the orbital orientation to view down the orbital z axis. (This is the original orientation.)