fhm.edu.fem.animation
Class CalcAnimationSpanner

java.lang.Object
  extended by fhm.edu.fem.animation.CalcAnimation
      extended by fhm.edu.fem.animation.CalcAnimationSpanner
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener

public class CalcAnimationSpanner
extends CalcAnimation

Class Description: This class is being used when we have FEM6 files for Spanner calculations. It animates the Spanner and offers the user the ability to increase or decrease the used force.

Author:
Thomas Woellert (thomas.woellert@t-online.de), Stefan Weissbach (weissbst@gmx.de)

Field Summary
protected  FEMCalcSpanner femCalc
           
protected  GLSpannerFrame femFrame
           
protected  double forceUserStep
           
 
Fields inherited from class fhm.edu.fem.animation.CalcAnimation
aiVector, deltaT, dimensionA, dimensionB, femManager, frameCount, initialDeltaT, initialPZ, INNER_POINTS, localLogger, omega, OUTER_POINTS, pX, pY, pZ, startTime, tmpTime, w0Vector
 
Constructor Summary
CalcAnimationSpanner(FEMCalcSpanner femCalc, java.lang.String[] args)
          Create a new Calc Animation Object
 
Method Summary
protected  void addVariableToForces(double factor)
          Adjust the forces stored in the FEMManager by the given factor
protected  boolean initDisplay()
          Initialize the display
 void keyTyped(java.awt.event.KeyEvent e)
          Automatically called when the user presses a key
protected  void resetNodePositions()
          Reset the node positions to the initial old figure, so that the changed forces can take correct effect.
 boolean start()
          Call this method to start the animation
 
Methods inherited from class fhm.edu.fem.animation.CalcAnimation
calculateAI, calculateAnimation, calculateExactA, calculateMembranDimensions, calculateOmega, calculateStartingAmplitude, keyPressed, keyReleased, normB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

femCalc

protected FEMCalcSpanner femCalc

femFrame

protected GLSpannerFrame femFrame

forceUserStep

protected double forceUserStep
Constructor Detail

CalcAnimationSpanner

public CalcAnimationSpanner(FEMCalcSpanner femCalc,
                            java.lang.String[] args)
Create a new Calc Animation Object

Parameters:
femCalc, - the calculation object to use
args, - the given command line arguments (none needed)
Method Detail

addVariableToForces

protected void addVariableToForces(double factor)
Adjust the forces stored in the FEMManager by the given factor

Parameters:
factor, - the factor to add to the forces (OLD_FORCE+FACTOR = NEW_FORCE)

initDisplay

protected boolean initDisplay()
Initialize the display

Returns:

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Automatically called when the user presses a key

Specified by:
keyTyped in interface java.awt.event.KeyListener
Overrides:
keyTyped in class CalcAnimation
Parameters:
e, - the key event

resetNodePositions

protected void resetNodePositions()
Reset the node positions to the initial old figure, so that the changed forces can take correct effect.


start

public boolean start()
Call this method to start the animation

Overrides:
start in class CalcAnimation
Returns:
true if all went well, false otherwise