Class TrackViewer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--TrackViewer

public class TrackViewer
extends javax.swing.JFrame
implements java.util.Observer, java.awt.event.ActionListener, java.awt.event.WindowListener

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
TrackViewer(Track t)
          Create a TrackViewer object from a track object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Process an action event from a button or menu item.
 void addActiveTrack(java.lang.String filename)
          Add a track menu pair to the track list using a serialized object.
 void addActiveTrack(java.lang.String filename, int start, int length)
          Add a track menu pair to the track list using a synch file segment.
 void addActiveTrack(Track t)
          Add a track to the active track list.
static void main(java.lang.String[] args)
          Create a TrackViewer instance from a synch file or serialized track object.
 void paint(java.awt.Graphics g)
          Paint the parent frame and its invalidated sub-components.
 void quitApplication()
          Quit the application, diposing of its child frames.
 void refreshTrack()
          Refresh the display for the active track object.
 void removeActiveTrack()
          Remove the active track and its associated menu item from the active list.
static void setStatus(java.lang.String msg)
          Issue a status message.
 float unmapMouseValue(int mx, int rangex, float rangef, float minf)
          Unmap a mouse coordinates to a field coordinate.
 void update(java.util.Observable o, java.lang.Object arg)
          Update the information in the tool menu frame.
 void windowActivated(java.awt.event.WindowEvent e)
          Handle the window activated event.
 void windowClosed(java.awt.event.WindowEvent e)
          Handle the window closed event.
 void windowClosing(java.awt.event.WindowEvent e)
          Handle a window closing event.
 void windowDeactivated(java.awt.event.WindowEvent e)
          Handle the window deactivated event.
 void windowDeiconified(java.awt.event.WindowEvent e)
          Handle the window deiconified event.
 void windowIconified(java.awt.event.WindowEvent e)
          Handle the window iconified event.
 void windowOpened(java.awt.event.WindowEvent e)
          Handle the window opened event.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, removeWindowListener, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrackViewer

public TrackViewer(Track t)
Create a TrackViewer object from a track object.
Parameters:
t - the track to view
Method Detail

setStatus

public static void setStatus(java.lang.String msg)
Issue a status message.
Parameters:
msg - the message to display

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Update the information in the tool menu frame.
Specified by:
update in interface java.util.Observer
Parameters:
o - the object that is being observered (here null)
arg - the object that is sending the notify

unmapMouseValue

public float unmapMouseValue(int mx,
                             int rangex,
                             float rangef,
                             float minf)
Unmap a mouse coordinates to a field coordinate.
Parameters:
mx - the mouse coordinate
rangex - the mouse range
rangef - the field range
minf - the minimum field value

paint

public void paint(java.awt.Graphics g)
Paint the parent frame and its invalidated sub-components.
Parameters:
g - the graphics object to paint on
Overrides:
paint in class java.awt.Container

refreshTrack

public void refreshTrack()
Refresh the display for the active track object.

removeActiveTrack

public void removeActiveTrack()
                       throws java.lang.NoSuchFieldException
Remove the active track and its associated menu item from the active list.
Throws:
java.lang.NoSuchFieldException - if there are no tracks to remove

addActiveTrack

public void addActiveTrack(java.lang.String filename)
                    throws java.io.IOException
Add a track menu pair to the track list using a serialized object.
Parameters:
filename - the filename of the serialized object to add
Throws:
java.io.IOException - if the object cannot be read

addActiveTrack

public void addActiveTrack(java.lang.String filename,
                           int start,
                           int length)
                    throws java.io.IOException
Add a track menu pair to the track list using a synch file segment.
Parameters:
filename - the name of the synch file
start - the line to start reading from
length - the number of lines to read
Throws:
java.io.IOException - if the sych file cannot be read

addActiveTrack

public void addActiveTrack(Track t)
Add a track to the active track list.
Parameters:
t - the track to add

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Process an action event from a button or menu item.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the action event

quitApplication

public void quitApplication()
Quit the application, diposing of its child frames.

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Handle a window closing event.
Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - the window closing event

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Handle the window activated event.
Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
the - event to handle

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Handle the window closed event.
Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
the - event to handle

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Handle the window deactivated event.
Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
the - event to handle

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Handle the window iconified event.
Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
the - event to handle

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Handle the window opened event.
Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
the - event to handle

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Handle the window deiconified event.
Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
the - event to handle

main

public static void main(java.lang.String[] args)
Create a TrackViewer instance from a synch file or serialized track object.
Parameters:
args - the track viewer command lines args