buoy.event

Class CommandEvent

Implemented Interfaces:
WidgetEvent

public class CommandEvent
extends ActionEvent
implements WidgetEvent

This event represents a user action that issues a command, such as pressing a button or selecting a menu item.
Author:
Peter Eastman

Constructor Summary

CommandEvent(Widget source, long when, int modifiers)
Create a CommandEvent.
CommandEvent(Widget source, long when, int modifiers, String command)
Create a CommandEvent.

Method Summary

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

Constructor Details

CommandEvent

public CommandEvent(Widget source,
                    long when,
                    int modifiers)
Create a CommandEvent.
Parameters:
source - the widget to which this event occurred
when - the time at which the event occurred
modifiers - describes the state of various keys at the time when the event occurred (a sum of the constants defined by ActionEvent)

CommandEvent

public CommandEvent(Widget source,
                    long when,
                    int modifiers,
                    String command)
Create a CommandEvent.
Parameters:
source - the widget to which this event occurred
when - the time at which the event occurred
modifiers - describes the state of various keys at the time when the event occurred (a sum of the constants defined by ActionEvent)
command - the command String describing the action which was performed

Method Details

getWidget

public Widget getWidget()
Get the Widget which generated this event.
Specified by:
getWidget in interface WidgetEvent

Written by Peter Eastman.