java.awt.event.InputEvent (JDK 1.1)
This abstract class serves as the superclass for the raw user input event types MouseEvent and KeyEvent.
Use the inherited getComponent() to determine in which component the event occurred. Use getWhen() to obtain a timestamp for the event. Use getModifiers() to determine which keyboard modifier keys or mouse buttons were down when the event occurred. You can decode the getModifiers() return value using the various _MASK constants defined by this class. The class also defines four convenience methods for determining the state of keyboard modifiers.
In Java 1.1, input events are delivered to the appropriate listener objects before they are delivered to the AWT components themselves. If a listener calls the consume() method of the event, the event is not passed on to the component. For example, if a listener registered on a Button "consumes" a mouse click, it prevents the button itself from responding to that event. You can use isConsumed() to test whether some other listener object has already consumed the event.
public abstract classInputEventextends ComponentEvent { //No Constructor//Constantspublic static final intALT_MASK; public static final intBUTTON1_MASK; public static final intBUTTON2_MASK; public static final intBUTTON3_MASK; public static final intCTRL_MASK; public static final intMETA_MASK; public static final intSHIFT_MASK; //Public Instance Methodspublic voidconsume(); //Overrides AWTEventpublic intgetModifiers(); public longgetWhen(); public booleanisAltDown(); public booleanisConsumed(); //Overrides AWTEventpublic booleanisControlDown(); public booleanisMetaDown(); public booleanisShiftDown(); }
Hierarchy:
Object->EventObject(Serializable)->AWTEvent->ComponentEvent->InputEvent
Extended By:
KeyEvent, MouseEvent