at.wisch.joystick.ffeffect
Class ExtendedEffect

java.lang.Object
  extended by at.wisch.joystick.ffeffect.Effect
      extended by at.wisch.joystick.ffeffect.ExtendedEffect
Direct Known Subclasses:
ConstantEffect, CustomEffect, PeriodicEffect, RampEffect

public abstract class ExtendedEffect
extends Effect

The Class ExtendedEffect. This is the superclass for certain types of effects, that have some common properties: they need a direction and they support fade-in (attack) and fade-out (fade). To understand those, see ConstantEffect.

Notes:
- If attack length and fade level are set to 0, attack and fade is not used, otherwise both are used.
- If the length of an effect is INFINITE_LENGTH, fade-out will never happen.

Author:
Martin Wischenbart
See Also:
ConstantEffect, Direction

Field Summary
 
Fields inherited from class at.wisch.joystick.ffeffect.Effect
EFFECT_CONSTANT, EFFECT_CUSTOM, EFFECT_DAMPER, EFFECT_FRICTION, EFFECT_INERTIA, EFFECT_RAMP, EFFECT_SAWTOOHDOWN, EFFECT_SAWTOOTHUP, EFFECT_SINE, EFFECT_SPRING, EFFECT_SQUARE, EFFECT_TRIANGLE, INFINITE_LENGTH, MAX_DELAY, MAX_LENGTH, MAX_LEVEL, MIN_LEVEL, NO_BUTTON
 
Method Summary
 int getAttackLength()
          Gets the attack length in ms.
 int getAttackLevel()
          Gets the attack level.
 Direction getDirection()
          Gets the direction for the effect.
 int getFadeLength()
          Gets the fade length in ms.
 int getFadeLevel()
          Gets the fade level.
 void setAttackLength(int attackLength)
          Sets the attack length in ms.
 void setAttackLevel(int attackLevel)
          Sets the attack level.
 void setDirection(Direction direction)
          Sets the direction for the effect.
 void setFadeLength(int fadeLength)
          Sets the fade length in ms.
 void setFadeLevel(int fadeLevel)
          Sets the fade level.
 
Methods inherited from class at.wisch.joystick.ffeffect.Effect
getButtonIndex, getButtonInterval, getDefaultDirection, getEffectDelay, getEffectLength, getEffectType, getName, getStrength, setButtonIndex, setButtonInterval, setDefaultDirection, setEffectDelay, setEffectLength, setStrength
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttackLength

public int getAttackLength()
Gets the attack length in ms.

Returns:
the attack length in ms
See Also:
setAttackLength(int)

setAttackLength

public void setAttackLength(int attackLength)
Sets the attack length in ms.

Parameters:
attackLength - the new attack length in ms (an int from 0 to MAX_DELAY (60000 ms ))
See Also:
getAttackLength()

getFadeLength

public int getFadeLength()
Gets the fade length in ms.

Returns:
the fade length in ms
See Also:
setFadeLength(int)

setFadeLength

public void setFadeLength(int fadeLength)
Sets the fade length in ms.

Parameters:
fadeLength - the new fade length in ms(an int from 0 to MAX_DELAY (60000 ms ))
See Also:
getFadeLength()

getAttackLevel

public int getAttackLevel()
Gets the attack level.

Returns:
the attack level
See Also:
setAttackLevel(int)

setAttackLevel

public void setAttackLevel(int attackLevel)
Sets the attack level.

Parameters:
attackLevel - the new attack level (an int from 0 to MAX_LEVEL (32767))
See Also:
getAttackLevel()

getFadeLevel

public int getFadeLevel()
Gets the fade level.

Returns:
the fade level
See Also:
setFadeLevel(int)

setFadeLevel

public void setFadeLevel(int fadeLevel)
Sets the fade level.

Parameters:
fadeLevel - the new fade level (an int from 0 to MAX_LEVEL (32767))
See Also:
getFadeLevel()

getDirection

public Direction getDirection()
Gets the direction for the effect.

Returns:
a Direction object instance
See Also:
setDirection(Direction)

setDirection

public void setDirection(Direction direction)
Sets the direction for the effect.

Parameters:
direction - a Direction object instance
See Also:
getDirection()