ElegantJ Gauges Java API Specification v1.1

com.elegantj.gauges
Class ChangeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.elegantj.gauges.ChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ChangeEvent
extends java.util.EventObject

The ChangeEvent is generated by a Gauge (such as a DialGauge) when the Gauge-specific action occurs (such as value changed or zone changed). The event is passed to every ChangeListener object that registered to receive such events using the gauge's addChangeListener method. The object that implements the ChangeListener interface gets this ChangeEvent when the event occurs.

See Also:
Serialized Form

Field Summary
static int VALUE_CHANGED
          This event id indicates that value has been changed into gauge
static int ZONE_CHANGED
          This event id indicates that zone has been changed into gauge
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ChangeEvent(java.lang.Object source, double oldValue, double newValue, int oldZoneValue, int newZoneValue)
          Creates a ChangeEvent with specified source object and values(old and new).
 
Method Summary
 double getNewValue()
          Returns the new value for which the event occurred.
 int getNewZoneValue()
          Returns the new zone value for which the event occurred.
 double getOldValue()
          Returns the old value before the event occurred.
 int getOldZoneValue()
          Returns the old zone value before the event occurred.
 java.lang.String toString()
          Returns the string representation of this EventObject
 
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

VALUE_CHANGED

public static final int VALUE_CHANGED
This event id indicates that value has been changed into gauge

See Also:
Constant Field Values

ZONE_CHANGED

public static final int ZONE_CHANGED
This event id indicates that zone has been changed into gauge

See Also:
Constant Field Values
Constructor Detail

ChangeEvent

public ChangeEvent(java.lang.Object source,
                   double oldValue,
                   double newValue,
                   int oldZoneValue,
                   int newZoneValue)
Creates a ChangeEvent with specified source object and values(old and new).

Parameters:
source - the object on which the Event initially occurred
oldValue - the value before the event occurred
newValue - the value for which the event occurred
Method Detail

getOldValue

public double getOldValue()
Returns the old value before the event occurred.


getNewValue

public double getNewValue()
Returns the new value for which the event occurred.


getOldZoneValue

public int getOldZoneValue()
Returns the old zone value before the event occurred.


getNewZoneValue

public int getNewZoneValue()
Returns the new zone value for which the event occurred.


toString

public java.lang.String toString()
Returns the string representation of this EventObject

Returns:
the string

ElegantJ Gauges Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.