infovis.visualization.magicLens
Class DefaultMagicLens

java.lang.Object
  extended by infovis.visualization.magicLens.DefaultMagicLens
All Implemented Interfaces:
MagicLens
Direct Known Subclasses:
DefaultExcentricLabels, DefaultFisheye

public class DefaultMagicLens
extends Object
implements MagicLens

Class DefaultMagicLens

Version:
$Revision: 1.1 $
Author:
Jean-Daniel Fekete

Field Summary
 
Fields inherited from interface infovis.visualization.MagicLens
PROPERTY_ENABLED, PROPERTY_LENS_POSITION_X, PROPERTY_LENS_POSITION_Y, PROPERTY_LENS_RADIUS
 
Constructor Summary
DefaultMagicLens()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a PropertyChangeListener for a specific property.
 void firePropertyChange(String property, boolean oldV, boolean newV)
           
 void firePropertyChange(String property, float oldV, float newV)
           
 void firePropertyChange(String property, int oldV, int newV)
           
 void firePropertyChange(String property, Object oldV, Object newV)
           
 Rectangle2D getBounds()
          Returns the bounds of the transformed coordinates.
 float getLensRadius()
          Returns the lens radius.
 float getLensX()
          Returns the lens X center position.
 float getLensY()
          Returns the lens Y center position.
 boolean isEnabled()
          Returns whether this magic lens is enabled.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a PropertyChangeListener for a specific property.
 void setEnabled(boolean set)
          Sets the enabled state of the magic lens.
 void setLens(float x, float y)
          Sets for focus position
 void setLensRadius(float focusRadius)
          Sets the lens radius.
 void setLensX(float focusX)
          Sets the lensX.
 void setLensY(float focusY)
          Sets the lensY.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMagicLens

public DefaultMagicLens()
Method Detail

isEnabled

public boolean isEnabled()
Description copied from interface: MagicLens
Returns whether this magic lens is enabled.

Specified by:
isEnabled in interface MagicLens
Returns:
whether this magic lens is enabled.

setEnabled

public void setEnabled(boolean set)
Description copied from interface: MagicLens
Sets the enabled state of the magic lens.

Specified by:
setEnabled in interface MagicLens
Parameters:
set - the enabled state to set

getBounds

public Rectangle2D getBounds()
Description copied from interface: MagicLens
Returns the bounds of the transformed coordinates. Coordintates outside these bounds are not transformed.

Specified by:
getBounds in interface MagicLens
Returns:
the bounds of the transformed coordinates.

setLens

public void setLens(float x,
                    float y)
Description copied from interface: MagicLens
Sets for focus position

Specified by:
setLens in interface MagicLens
Parameters:
x - X coordinate of the position
y - X coordinate of the position

getLensX

public float getLensX()
Description copied from interface: MagicLens
Returns the lens X center position.

Specified by:
getLensX in interface MagicLens
Returns:
float

getLensY

public float getLensY()
Description copied from interface: MagicLens
Returns the lens Y center position.

Specified by:
getLensY in interface MagicLens
Returns:
float

setLensX

public void setLensX(float focusX)
Description copied from interface: MagicLens
Sets the lensX.

Specified by:
setLensX in interface MagicLens
Parameters:
focusX - The lest X to set

setLensY

public void setLensY(float focusY)
Description copied from interface: MagicLens
Sets the lensY.

Specified by:
setLensY in interface MagicLens
Parameters:
focusY - The lens Y to set

getLensRadius

public float getLensRadius()
Description copied from interface: MagicLens
Returns the lens radius.

Specified by:
getLensRadius in interface MagicLens
Returns:
the lens radius.

setLensRadius

public void setLensRadius(float focusRadius)
Description copied from interface: MagicLens
Sets the lens radius.

Specified by:
setLensRadius in interface MagicLens
Parameters:
focusRadius - the new radius.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from interface: MagicLens
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

Specified by:
addPropertyChangeListener in interface MagicLens
Parameters:
l - The PropertyChangeListener to be added

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Description copied from interface: MagicLens
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.

Specified by:
addPropertyChangeListener in interface MagicLens
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Description copied from interface: MagicLens
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Specified by:
removePropertyChangeListener in interface MagicLens
Parameters:
l - The PropertyChangeListener to be removed

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Description copied from interface: MagicLens
Remove a PropertyChangeListener for a specific property.

Specified by:
removePropertyChangeListener in interface MagicLens
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

public void firePropertyChange(String property,
                               Object oldV,
                               Object newV)

firePropertyChange

public void firePropertyChange(String property,
                               int oldV,
                               int newV)

firePropertyChange

public void firePropertyChange(String property,
                               float oldV,
                               float newV)

firePropertyChange

public void firePropertyChange(String property,
                               boolean oldV,
                               boolean newV)


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.