com.jjt.utbeg
Class Applet1

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--com.jjt.utbeg.SeismicDesignExerciseApplet
                                |
                                +--com.jjt.utbeg.Applet1

public class Applet1
extends SeismicDesignExerciseApplet
implements PropertyChangeListener, ActionListener

The first JJT Applet for the UT exercises: source and receiver spacing

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
Component.AWTTreeLock, Component.NativeInLightFixer
 
Field Summary
private  Button depth1000Button
           
private  Button depth2000Button
           
private  Button depth3000Button
           
private  Button depth4000Button
           
private  Button depth5000Button
           
private  Button depth6000Button
           
private  Button depth7000Button
           
private  Button depth8000Button
           
private  NumericSpinner numberOfReceiverLinesSpinner
           
private  NumericSpinner numberOfSourceLinesSpinner
           
private  NumericSpinner receiverLineSpacingSpinner
           
private  NumericSpinner receiverStationSpacingSpinner
           
private  Button saveInputsButton
           
private  NumericSpinner sourceLineSpacingSpinner
           
private  NumericSpinner sourceStationSpacingSpinner
           
private  NumericSpinner swathReferenceSizeSpinner
           
private  SwathViewer swathViewer
           
private static double ZOOM_INCREMENT
          The constant that the magnification factor is incremented or decremenent when the zoom in/out buttons are pressed.
private  Button zoomInButton
           
private  Button zoomOutButton
           
 
Fields inherited from class com.jjt.utbeg.SeismicDesignExerciseApplet
inputParametersAreValid, insets, parameterDisplayPanel, parameterInputPanel, parameters, viewerPanel
 
Fields inherited from class java.applet.Applet
serialVersionUID, stub
 
Fields inherited from class java.awt.Panel
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
Applet1()
           
 
Method Summary
 void actionPerformed(ActionEvent event)
          This method is public as an implementation side-effect.
private  void addInfoLabel(Container panel, GridBagLayout gridbag, GridBagConstraints constraints, Component label, Component value)
          Helper method to allow createAndLayoutDisplayComponents() to use a GridBagLayout, which is a nasty mess.
private  void createAndLayoutDisplayComponents()
          Creates and places the components used to display the static values received into this exercise from previous exercises.
private  void createAndLayoutInputComponents()
          Creates and places Components used for receiving parameter inputs from the human.
private  void createAndLayoutViewerComponents()
          Creates and places Components used for viewing the swath image, including the "depth" buttons and zoom in/out buttons.
protected  java.net.URL getPostURL()
          Returns the URL to submit this applet's parameters to the server.
private  String[] getSwathImageURLs()
          Returns the URLs to be used to access the eight surface images for each depth.
 void init()
          Initializes this Applet.
private static void initSpinBox(NumericSpinner spinbox, int from, int to, int by, int initialValue)
          Convenience method for initializing a Symantec spinner.
 void propertyChange(PropertyChangeEvent event)
          This method is public as an implementation side-effect.
protected  void setInitialParameters()
          Sets initial parameters for this exercise.
protected  String verifyInputParameters()
          This method is called so that subclasses may verify that all their required parameters have been set.
 
Methods inherited from class com.jjt.utbeg.SeismicDesignExerciseApplet
getContentPane, getInsets, getNumericAppletParameter, getParameterDisplayPanel, getParameterInputPanel, getParameters, getViewerPanel, inputParametersAreValid, loadParameters, readAppletParameterArray, saveInputs
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
, add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paint, paintComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, update, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

sourceStationSpacingSpinner

private NumericSpinner sourceStationSpacingSpinner

receiverStationSpacingSpinner

private NumericSpinner receiverStationSpacingSpinner

sourceLineSpacingSpinner

private NumericSpinner sourceLineSpacingSpinner

receiverLineSpacingSpinner

private NumericSpinner receiverLineSpacingSpinner

numberOfSourceLinesSpinner

private NumericSpinner numberOfSourceLinesSpinner

numberOfReceiverLinesSpinner

private NumericSpinner numberOfReceiverLinesSpinner

swathReferenceSizeSpinner

private NumericSpinner swathReferenceSizeSpinner

saveInputsButton

private Button saveInputsButton

depth1000Button

private Button depth1000Button

depth2000Button

private Button depth2000Button

depth3000Button

private Button depth3000Button

depth4000Button

private Button depth4000Button

depth5000Button

private Button depth5000Button

depth6000Button

private Button depth6000Button

depth7000Button

private Button depth7000Button

depth8000Button

private Button depth8000Button

swathViewer

private SwathViewer swathViewer

zoomInButton

private Button zoomInButton

zoomOutButton

private Button zoomOutButton

ZOOM_INCREMENT

private static final double ZOOM_INCREMENT
The constant that the magnification factor is incremented or decremenent when the zoom in/out buttons are pressed.

For example, when zoomInButton is pressed, swathViewer magnification is set to: currentMagnification + ZOOM_INCREMENT

Constructor Detail

Applet1

public Applet1()
Method Detail

init

public void init()
Initializes this Applet.

Applets typically use init() instead of their usual constructors for creating Components.

Overrides:
init in class SeismicDesignExerciseApplet

createAndLayoutDisplayComponents

private void createAndLayoutDisplayComponents()
Creates and places the components used to display the static values received into this exercise from previous exercises.

addInfoLabel

private void addInfoLabel(Container panel,
                          GridBagLayout gridbag,
                          GridBagConstraints constraints,
                          Component label,
                          Component value)
Helper method to allow createAndLayoutDisplayComponents() to use a GridBagLayout, which is a nasty mess.

This method adds two Label Components to a panel as a row in the GridBagLayout.


createAndLayoutInputComponents

private void createAndLayoutInputComponents()
Creates and places Components used for receiving parameter inputs from the human.

createAndLayoutViewerComponents

private void createAndLayoutViewerComponents()
Creates and places Components used for viewing the swath image, including the "depth" buttons and zoom in/out buttons.

verifyInputParameters

protected String verifyInputParameters()
This method is called so that subclasses may verify that all their required parameters have been set.

If this exercise (Applet) requires parameters to be set by previous exercises, then that will be validated here. Parameters are set in the UserParameters Object which can be retrieved by the getParameters() method.

Returns:
a message explaining which parameters must be set, or null if all required parameters are loaded.
Overrides:
verifyInputParameters in class SeismicDesignExerciseApplet
See Also:
SeismicDesignExerciseApplet.getParameters()

setInitialParameters

protected void setInitialParameters()
Sets initial parameters for this exercise.

Initial parameter values are usually based on input parameters which have been set in previous exercises. When this method is called, verifyInputParameters() has already been called, so all required input parameters can be assumed present.

Overrides:
setInitialParameters in class SeismicDesignExerciseApplet
See Also:
verifyInputParameters()

initSpinBox

private static void initSpinBox(NumericSpinner spinbox,
                                int from,
                                int to,
                                int by,
                                int initialValue)
Convenience method for initializing a Symantec spinner.
Parameters:
spinbox - the Symantec spin box to initialize
from - the minimum value for the spinner
to - the maximum value for the spinner
by - the increment for the spinner
initialValue - the value to set for the spinner

getSwathImageURLs

private String[] getSwathImageURLs()
Returns the URLs to be used to access the eight surface images for each depth.

The URLs for the eight images should be placed in the HTML for this applet in this form:

 
    
    
    ...
 
 

propertyChange

public void propertyChange(PropertyChangeEvent event)
This method is public as an implementation side-effect.

Called when a spin box is modified.

Specified by:
propertyChange in interface PropertyChangeListener

actionPerformed

public void actionPerformed(ActionEvent event)
This method is public as an implementation side-effect.

Called when a button is pushed.

Specified by:
actionPerformed in interface ActionListener

getPostURL

protected java.net.URL getPostURL()
                           throws java.net.MalformedURLException
Returns the URL to submit this applet's parameters to the server.

The URL is probably actually an HTTP GET request, with the parameters attached as query arguments.

Overrides:
getPostURL in class SeismicDesignExerciseApplet