org.zaval.lw.event
Class LwTrackerEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.zaval.util.event.EvObject
              |
              +--org.zaval.lw.event.LwTrackerEvent
All Implemented Interfaces:
java.io.Serializable

public class LwTrackerEvent
extends EvObject

This class represents tracker event. The event is performed by the tracker component when: a tracker value has been changed, a new bundle has been added, a bundle has been removed, value changing process has been finished, the information event has been performed.

See Also:
Serialized Form

Field Summary
static int BUNDLE_ADDED
          The tracker bundle added event type.
static int BUNDLE_REMOVED
          The tracker bundle removed event type.
static int VALUE_CHANGED
          The tracker value changed event type.
static int VALUE_CHANGED_DONE
          The tracker value changing done event type.
static int VALUE_INFO
          The tracker info performed event type.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LwTrackerEvent(LwComponent target, int bi, int bv, int obv, int id)
          Constructs the event object with the specified source object, the bundle index, the bundle value, the bundle previous value an the event id.
 
Method Summary
protected  boolean checkID(int id)
          The method returns true if the specified id is valid for the event, otherwise returns false.
 int getBundleIndex()
          Gets the tracker bundle index.
 int getPrevValue()
          Gets the previous value (for the specified by the event tracker bundle element).
 int getValue()
          Gets the value (for the specified by the event tracker bundle element).
 
Methods inherited from class org.zaval.util.event.EvObject
getID
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_CHANGED

public static final int VALUE_CHANGED
The tracker value changed event type.

BUNDLE_ADDED

public static final int BUNDLE_ADDED
The tracker bundle added event type.

BUNDLE_REMOVED

public static final int BUNDLE_REMOVED
The tracker bundle removed event type.

VALUE_INFO

public static final int VALUE_INFO
The tracker info performed event type.

VALUE_CHANGED_DONE

public static final int VALUE_CHANGED_DONE
The tracker value changing done event type.
Constructor Detail

LwTrackerEvent

public LwTrackerEvent(LwComponent target,
                      int bi,
                      int bv,
                      int obv,
                      int id)
Constructs the event object with the specified source object, the bundle index, the bundle value, the bundle previous value an the event id.
Parameters:
target - the object where the event originated.
bi - the specified bundle id. The value can be -1 if the bundle element is not specified.
bv - the bundle value.
obv - the previous bundle value.
id - the specified event id.
Method Detail

getValue

public int getValue()
Gets the value (for the specified by the event tracker bundle element).
Returns:
a value.

getPrevValue

public int getPrevValue()
Gets the previous value (for the specified by the event tracker bundle element).
Returns:
a previous value.

getBundleIndex

public int getBundleIndex()
Gets the tracker bundle index.
Returns:
a tracker bundle index.

checkID

protected boolean checkID(int id)
Description copied from class: EvObject
The method returns true if the specified id is valid for the event, otherwise returns false. The method is called with the event constructor to test if the event id is valid and if the event is not valid the IllegalArgumentException will be thrown.
Overrides:
checkID in class EvObject
Following copied from class: org.zaval.util.event.EvObject
Parameters:
id - the specified id.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org