footfall.streams
Class FootFallStreamFile

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byfootfall.streams.FootFallStream
                      extended byfootfall.streams.FootFallStreamFile
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.lang.Runnable, java.io.Serializable

public class FootFallStreamFile
extends FootFallStream

Generate stream of footfall based on file input.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, 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
FootFallStreamFile()
          Initialize the footfall stream
FootFallStreamFile(java.lang.String filename)
          Initialize the footfall stream and load a file
 
Method Summary
 float[][] getCurrentFrame()
          Returns the pressure data for the current frame
 int getCurrentFrameNum()
          Returns the current frame number
 float[][] getFrame(int fNum)
          Returns the pressure data of the specific frame
 java.lang.String getFrameName(int fNum)
          Returns the name/title of the specific frame
 int numFrames()
          Returns number of frames in the current file
 void printFrame(int fNum)
          Prints the data values of an individual frame
 void printFrames()
          Prints all the frames sequentially
 void readBarFile(java.lang.String filename)
          Reads the pressure data file and loads it into memory
 void readFile(java.lang.String filename)
          Detects file type and loads it
 void readPadFile(java.lang.String filename)
          Reads the pressure data file and loads it into memory
 void readPrint(java.lang.String line)
          Reads footprint frame from single string and creates a stream for modelling by FootModel
 void reset()
          Set current frame to beginning
 void setCurrentFrame(int frm)
          Sets the base frame for rendering.
 void setMaxPressure(float fMax)
          Dummy function, does nothing; maximum pressure of recorded files is not changeable.
 void update()
          Set the current frame and draw the preview display
 void writeBarFile(java.lang.String filename)
          Saves the currently loaded frames as a ".bar" file format
 
Methods inherited from class footfall.streams.FootFallStream
getFrameHeight, getFramesPerSecond, getFramesPerSecondMax, getFramesPerSecondMin, getFrameWidth, getMaxPressure, run, setDisplay, setFrameHeight, setFramesPerSecond, setFrameWidth, start, stop
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, 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, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, 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, 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, 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, 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, setName, 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

FootFallStreamFile

public FootFallStreamFile()
Initialize the footfall stream


FootFallStreamFile

public FootFallStreamFile(java.lang.String filename)
Initialize the footfall stream and load a file

Parameters:
filename - Input file to load
Method Detail

getCurrentFrame

public float[][] getCurrentFrame()
Returns the pressure data for the current frame

Specified by:
getCurrentFrame in class FootFallStream

getCurrentFrameNum

public int getCurrentFrameNum()
Returns the current frame number


getFrame

public float[][] getFrame(int fNum)
Returns the pressure data of the specific frame

Parameters:
fNum - Frame Number

getFrameName

public java.lang.String getFrameName(int fNum)
Returns the name/title of the specific frame

Parameters:
fNum - Frame Number

numFrames

public int numFrames()
Returns number of frames in the current file


printFrame

public void printFrame(int fNum)
Prints the data values of an individual frame

Parameters:
fNum - Frame number to print

printFrames

public void printFrames()
Prints all the frames sequentially


readFile

public void readFile(java.lang.String filename)
Detects file type and loads it

Parameters:
filename - Input file name in ".bar", ".pad", or ".txt" format

readBarFile

public void readBarFile(java.lang.String filename)
Reads the pressure data file and loads it into memory

Parameters:
filename - Input file name in ".bar" format

readPadFile

public void readPadFile(java.lang.String filename)
Reads the pressure data file and loads it into memory

Parameters:
filename - Input file name in ".pad" or ".txt" format

readPrint

public void readPrint(java.lang.String line)
Reads footprint frame from single string and creates a stream for modelling by FootModel

Parameters:
line - Foot print in ".bar" format

reset

public void reset()
Set current frame to beginning


setCurrentFrame

public void setCurrentFrame(int frm)
Sets the base frame for rendering. Mostly used to set frame to beginning = 0.

Parameters:
frm - Frame number

setMaxPressure

public void setMaxPressure(float fMax)
Dummy function, does nothing; maximum pressure of recorded files is not changeable.

Specified by:
setMaxPressure in class FootFallStream
Parameters:
fMax - Ignored

update

public void update()
Set the current frame and draw the preview display

Specified by:
update in class FootFallStream

writeBarFile

public void writeBarFile(java.lang.String filename)
Saves the currently loaded frames as a ".bar" file format

Parameters:
filename - Name of the file to save to