Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.event
Class ZoomSupport

    java.lang.Object
      com.bbn.openmap.event.ListenerSupport
          com.bbn.openmap.event.ZoomSupport

All Implemented Interfaces:
  java.io.Serializable

public class ZoomSupport
extends ListenerSupport

This is a utility class that can be used by beans that need support for handling ZoomListeners and firing ZoomEvents. You can use an instance of this class as a member field of your bean and delegate work to it.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.bbn.openmap.event.ListenerSupport
`listeners, source`

Constructor Summary
`ZoomSupport(java.lang.Object sourceBean)` Construct a ZoomSupport.

Method Summary
`void` | `addZoomListener(ZoomListener listener)` Add a ZoomListener to the listener list.
`void` | `fireZoom(int zoomType, float amount)` Send a zoom event to all registered listeners.
`void` | `removeZoomListener(ZoomListener listener)` Remove a ZoomListener from the listener list.

Methods inherited from class com.bbn.openmap.event.ListenerSupport
`addListener, getListeners, getSource, iterator, readObject, removeAll, removeListener, setSource, size, writeObject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ZoomSupport

    public ZoomSupport(java.lang.Object sourceBean)

  Construct a ZoomSupport.

Parameters:
  `sourceBean` - The bean to be given as the source for any events.

Method Detail

### addZoomListener

    public void addZoomListener(ZoomListener listener)

  Add a ZoomListener to the listener list.

  Parameters:
    `listener` - The ZoomListener to be added

### removeZoomListener

    public void removeZoomListener(ZoomListener listener)

  Remove a ZoomListener from the listener list.

  Parameters:
    `listener` - The ZoomListener to be removed

### fireZoom

    public void fireZoom(int zoomType,
                         float amount)

  Send a zoom event to all registered listeners.

  Parameters:
    `zoomType` - Either ZoomEvent.RELATIVE or ZoomEvent.ABSOLUTE
    `amount` - The new scale if ABSOLUTE, the multiplier if RELATIVE

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details