com.bbn.openmap.event
Class ZoomEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.bbn.openmap.event.ZoomEvent
All Implemented Interfaces:
java.io.Serializable

public class ZoomEvent
extends java.util.EventObject
implements java.io.Serializable

An event to request that the map zoom in or out. Event specifies the type and amount of zoom of the map.

See Also:
Serialized Form

Field Summary
static int ABSOLUTE
          Type that specifies that the amount should be used as the new scale.
protected  float amount
          The zoom factor.
static int RELATIVE
          Type that specifies that the amount should be used as a multiplier to the current scale.
protected  int type
          The type of zooming.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ZoomEvent(java.lang.Object source, int type, float amount)
          Construct a ZoomEvent.
 
Method Summary
 float getAmount()
          Get the amount of zoom.
 boolean isAbsolute()
          Check if the type is ABSOLUTE.
 boolean isRelative()
          Check if the type is RELATIVE.
 java.lang.String toString()
          Stringify the object.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RELATIVE

public static final transient int RELATIVE
Type that specifies that the amount should be used as a multiplier to the current scale.

See Also:
Constant Field Values

ABSOLUTE

public static final transient int ABSOLUTE
Type that specifies that the amount should be used as the new scale.

See Also:
Constant Field Values

type

protected int type
The type of zooming.


amount

protected float amount
The zoom factor.

Constructor Detail

ZoomEvent

public ZoomEvent(java.lang.Object source,
                 int type,
                 float amount)
Construct a ZoomEvent.

Parameters:
source - the creator of the ZoomEvent.
type - the type of the event, referring to how to use the amount.
amount - the value of the ZoomEvent.
Method Detail

isRelative

public boolean isRelative()
Check if the type is RELATIVE.

Returns:
boolean

isAbsolute

public boolean isAbsolute()
Check if the type is ABSOLUTE.

Returns:
boolean

getAmount

public float getAmount()
Get the amount of zoom.

Returns:
float

toString

public java.lang.String toString()
Stringify the object.

Overrides:
toString in class java.util.EventObject
Returns:
String


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