buoy.event
Class ValueChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by buoy.event.ValueChangedEvent
All Implemented Interfaces:
WidgetEvent, java.io.Serializable

public class ValueChangedEvent
extends java.util.EventObject
implements WidgetEvent

ValueChangedEvents are generated by Widgets that allow the user to enter a value, whenever the value changes.

Author:
Peter Eastman
See Also:
Serialized Form

Constructor Summary
ValueChangedEvent(Widget widget)
          Create a ValueChangedEvent.
ValueChangedEvent(Widget widget, boolean inProgress)
          Create a ValueChangedEvent.
 
Method Summary
 Widget getWidget()
          Get the Widget which generated this event.
 boolean isInProgress()
          Determine whether this event represents a value change that is still in progress.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueChangedEvent

public ValueChangedEvent(Widget widget)
Create a ValueChangedEvent.

Parameters:
widget - the Widget whose value has changed

ValueChangedEvent

public ValueChangedEvent(Widget widget,
                         boolean inProgress)
Create a ValueChangedEvent.

Parameters:
widget - the Widget whose value has changed
inProgress - specifies whether this event represents a value change that is still in progress
Method Detail

getWidget

public Widget getWidget()
Get the Widget which generated this event.

Specified by:
getWidget in interface WidgetEvent

isInProgress

public boolean isInProgress()
Determine whether this event represents a value change that is still in progress. For example, if the user drags the thumb of a scrollbar but has not yet released the mouse button, this method will return true. An in progress ValueChangedEvent will always be followed by another one when the value change is complete.



Written by Peter Eastman.