pedviz.view.effects
Class Effect

java.lang.Object
  extended by pedviz.view.effects.Effect
Direct Known Subclasses:
FisheyeEffect

public class Effect
extends java.lang.Object

This class is the super class for effects like FishEyeEffect.

Author:
Luki

Constructor Summary
Effect()
           
 
Method Summary
 java.awt.geom.Rectangle2D getBounds()
          Returns the bounds.
 java.awt.geom.Point2D getFocus()
          Returns the focus point.
 float getSpeed()
          Returns the speed.
 boolean isAutoUpdateOnDrag()
          Returns true, when the focus point will be updated automatically on mouse drag.
 boolean isAutoUpdateOnMove()
          Returns true, when the focus point will be updated automatically on mouse move.
 void moveFocus(double dx, double dy)
          Moves the focus point by the given values.
 void setAutoUpdateOnDrag(boolean autoUpdate)
           
 void setAutoUpdateOnMove(boolean autoUpdate)
           
 void setBounds(java.awt.geom.Rectangle2D bounds)
          Sets the bounds.
 void setFocus(double x, double y)
          Sets the focus point.
 void setSpeed(float speed)
          Sets the speed.
 java.awt.geom.Point2D.Float transformPoint(float x, float y)
          Transforms the given points.
 float transformSize(float size, float x, float y, float newX, float newY)
          Transforms the given size. x,y are untransformed and newX, newY are the transformed coordinates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Effect

public Effect()
Method Detail

getSpeed

public float getSpeed()
Returns the speed.

Returns:
the speed.

setSpeed

public void setSpeed(float speed)
Sets the speed.

Parameters:
speed - the speed.

transformPoint

public java.awt.geom.Point2D.Float transformPoint(float x,
                                                  float y)
Transforms the given points.

Parameters:
x -
y -
Returns:

transformSize

public float transformSize(float size,
                           float x,
                           float y,
                           float newX,
                           float newY)
Transforms the given size. x,y are untransformed and newX, newY are the transformed coordinates.

Parameters:
size - size
x - untransformed x coord.
y - untransformed y coord.
newX - transformed x coord.
newY - transformed y coord.
Returns:

getBounds

public java.awt.geom.Rectangle2D getBounds()
Returns the bounds.

Returns:
the bounds.

setBounds

public void setBounds(java.awt.geom.Rectangle2D bounds)
Sets the bounds.

Parameters:
bounds - the bounds.

isAutoUpdateOnMove

public boolean isAutoUpdateOnMove()
Returns true, when the focus point will be updated automatically on mouse move.

Returns:
true, when the focus point will be updated automatically on mouse move.

setAutoUpdateOnMove

public void setAutoUpdateOnMove(boolean autoUpdate)

isAutoUpdateOnDrag

public boolean isAutoUpdateOnDrag()
Returns true, when the focus point will be updated automatically on mouse drag.

Returns:
true, when the focus point will be updated automatically on mouse drag.

setAutoUpdateOnDrag

public void setAutoUpdateOnDrag(boolean autoUpdate)

getFocus

public java.awt.geom.Point2D getFocus()
Returns the focus point.

Returns:
the focus point.

setFocus

public void setFocus(double x,
                     double y)
Sets the focus point.

Parameters:
x - x-coordinate
y - y-coordinate

moveFocus

public void moveFocus(double dx,
                      double dy)
Moves the focus point by the given values.

Parameters:
dx - delta x
dy - delta y