Class CommandEvent

All Implemented Interfaces:
com.globalmentor.event.Event, FocusedInputEvent, GuiseEvent, InputEvent, Serializable

public class CommandEvent extends AbstractFocusedInputEvent
A focused event providing information on an input user command.
Author:
Garret Wilson
See Also:
  • Constructor Details

    • CommandEvent

      public CommandEvent(Object source, Command command)
      Command constructor.
      Parameters:
      source - The object on which the event initially occurred.
      command - The command.
      Throws:
      NullPointerException - if the given source and/or command is null.
    • CommandEvent

      public CommandEvent(Object source, CommandInput commandInput)
      Command input constructor.
      Parameters:
      source - The object on which the event initially occurred.
      commandInput - The command input the properties of which will be copied.
      Throws:
      NullPointerException - if the given source and/or input is null.
    • CommandEvent

      public CommandEvent(Object source, CommandEvent commandEvent)
      Copy constructor that specifies a different source.
      Parameters:
      source - The object on which the event initially occurred.
      commandEvent - The event the properties of which will be copied.
      Throws:
      NullPointerException - if the given source and/or event is null.
  • Method Details

    • getCommand

      public Command getCommand()
      Returns:
      The command.
    • getInput

      public CommandInput getInput()
      Returns:
      The input associated with this event, or null if there is no input associated with this event.