buoy.event

Class SelectionChangedEvent

Implemented Interfaces:
WidgetEvent

public class SelectionChangedEvent
extends EventObject
implements WidgetEvent

SelectionChangedEvents are generated by Widgets that allow the user to select part of their contents, whenever the selection changes.
Author:
Peter Eastman

Constructor Summary

SelectionChangedEvent(Widget widget)
Create a SelectionChangedEvent.
SelectionChangedEvent(Widget widget, boolean inProgress)
Create a SelectionChangedEvent.

Method Summary

Widget
getWidget()
Get the Widget which generated this event.
boolean
isInProgress()
Determine whether this event represents a selection change that is still in progress.

Constructor Details

SelectionChangedEvent

public SelectionChangedEvent(Widget widget)
Create a SelectionChangedEvent.
Parameters:
widget - the Widget whose selection has changed

SelectionChangedEvent

public SelectionChangedEvent(Widget widget,
                             boolean inProgress)
Create a SelectionChangedEvent.
Parameters:
widget - the Widget whose selection has changed
inProgress - specifies whether this event represents a selection 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 selection change that is still in progress. For example, if the user drags the mouse over a list to select multiple items, but has not yet released the mouse button, this method will return true. An in progress SelectionChangedEvent will always be followed by another one when the selection change is complete.

Written by Peter Eastman.