## com.bbn.openmap.event
Class CenterSupport

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

All Implemented Interfaces:
  java.io.Serializable

public class CenterSupport
extends ListenerSupport

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

A center event is one that sets the center of a map by specifying latitude and longitude.

See Also:
  Serialized Form

Field Summary

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

Constructor Summary
`CenterSupport(java.lang.Object sourceBean)`

Method Summary
`void` `addCenterListener(CenterListener listener)` Add a CenterListener to the listener list.
`void` `fireCenter(float latitude, float longitude)` Send a center event to all registered listeners.
`void` `removeCenterListener(CenterListener listener)` Remove a CenterListener 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

### CenterSupport

    public CenterSupport(java.lang.Object sourceBean)

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

Method Detail

### addCenterListener

    public void addCenterListener(CenterListener listener)

  Add a CenterListener to the listener list.

  Parameters:
    `listener` - The CenterListener to be added

### removeCenterListener

    public void removeCenterListener(CenterListener listener)

  Remove a CenterListener from the listener list.

  Parameters:
    `listener` - The CenterListener to be removed

### fireCenter

    public void fireCenter(float latitude,
                           float longitude)

  Send a center event to all registered listeners.

  Parameters:
    `latitude` - the latitude
    `longitude` - the longitude
  See Also:
    `CenterEvent`

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