Class CommandEvent
All Packages Class Hierarchy This Package Previous Next Index
Class CommandEvent
public class netscape.application.CommandEvent
extends netscape.application.Event
implements netscape.application.EventProcessor
{
/* Constructors
*/
public CommandEvent();
public CommandEvent(Target, String, Object);
/* Methods
*/
public String command();
public Object data();
public void processEvent(Event);
public void setCommand(String);
public void setData(Object);
public void setTarget(Target);
public Target target();
}
Event subclass that sends the performCommand() message to its Target
when processed. To use, you must instantiate a CommandEvent, configure
its Target, command and data, and add it to an EventLoop.
- See Also:
- performCommandAndWait, performCommandLater
Constructors
CommandEvent
public CommandEvent()
- Constructs a CommandEvent.
CommandEvent
public CommandEvent(Target target,
String command,
Object data)
- Convenience for constructing a CommandEvent. Equivalent
to the following code:
newEvent = new CommandEvent();
newEvent.setTarget(target);
newEvent.setCommand(command);
newEvent.setData(data);
Methods
setTarget
public void setTarget(Target target)
- Sets the CommandEvent's Target.
target
public Target target()
- Returns the CommandEvent's Target.
- See Also:
- setTarget
setCommand
public void setCommand(String command)
- Sets the CommandEvent's command.
command
public String command()
- Returns the CommandEvent's command.
- See Also:
- setCommand
setData
public void setData(Object data)
- Sets the CommandEvent's data object, the object sent in the
performCommand() message to its Target.
- See Also:
- setTarget
data
public Object data()
- Returns the CommandEvent's data object.
- See Also:
- setData
processEvent
public void processEvent(Event event)
- Called by an EventLoop to process the CommandEvent, which results in
the CommandEvent sending its Target the performCommand()
message. You should never call this method.
All Packages Class Hierarchy This Package Previous Next Index