buoy.event

Class ValueChangedEvent

Implemented Interfaces:
WidgetEvent

public class ValueChangedEvent
extends EventObject
implements WidgetEvent

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

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.

Constructor Details

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 Details

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.