java.awt.Event (JDK 1.0)
This class contains public instance variables that describe some kind of GUI event. In Java 1.1, this class has been superseded by AWTEvent and the java.awt.event package.
The class contains a large number of constants. Some of the constants specify the event type and are values for the id variable. Other constants are values for keys, like the function keys, that do not have ASCII (or Latin-1) values, and are set on the key field. Other constants are mask values that are ORed into the modifiers field to describe the state of the modifier keys on the keyboard. The target field is very important--it is the object for which the event occurred. The when field specifies when the event occurred. The x and y fields specify the mouse coordinates at which it occurred. Finally, the arg field is a value specific to the type of the event. Not all fields have valid values for all types of events.
public classEventextends Object implements Serializable { //Public ConstructorspublicEvent(Objecttarget, longwhen, intid, intx, inty, intkey, intmodifiers, Objectarg); publicEvent(Objecttarget, longwhen, intid, intx, inty, intkey, intmodifiers); publicEvent(Objecttarget, intid, Objectarg); //Event Type Constantspublic static final intACTION_EVENT; public static final intGOT_FOCUS,LOST_FOCUS; public static final intKEY_ACTION,KEY_ACTION_RELEASE; public static final intKEY_PRESS,KEY_RELEASE; public static final intLIST_SELECT,LIST_DESELECT; public static final intLOAD_FILE,SAVE_FILE; public static final intMOUSE_DOWN,MOUSE_UP; public static final intMOUSE_DRAG,MOUSE_MOVE; public static final intMOUSE_ENTER,MOUSE_EXIT; public static final intSCROLL_ABSOLUTE; 1.1 public static final intSCROLL_BEGIN,SCROLL_END; public static final intSCROLL_LINE_DOWN,SCROLL_LINE_UP; public static final intSCROLL_PAGE_DOWN,SCROLL_PAGE_UP; public static final intWINDOW_EXPOSE; public static final intWINDOW_ICONIFY,WINDOW_DEICONIFY; public static final intWINDOW_DESTROY; public static final intWINDOW_MOVED; //Keyboard Modifier Constantspublic static final intALT_MASK; public static final intCTRL_MASK; public static final intMETA_MASK; public static final intSHIFT_MASK; //Function Key Constantspublic static final intF1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12; public static final intLEFT,RIGHT,UP,DOWN; public static final intPGUP,PGDN; public static final intHOME,END; 1.1 public static final intINSERT,DELETE; 1.1 public static final intBACK_SPACE; 1.1 public static final intENTER; 1.1 public static final intESCAPE; 1.1 public static final intTAB; 1.1 public static final intCAPS_LOCK,NUM_LOCK,SCROLL_LOCK; 1.1 public static final intPAUSE,PRINT_SCREEN; //Public Instance Variablespublic Objectarg; public intclickCount; public Eventevt; public intid; public intkey; public intmodifiers; public Objecttarget; public longwhen; public intx; public inty; //Public Instance Methodspublic booleancontrolDown(); public booleanmetaDown(); public booleanshiftDown(); public StringtoString(); //Overrides Objectpublic voidtranslate(intx, inty); //Protected Instance Methodsprotected StringparamString(); }
Passed To:
AWTEvent(), Component.action(), Component.deliverEvent(), Component.gotFocus(), Component.handleEvent(), Component.keyDown(), Component.keyUp(), Component.lostFocus(), Component.mouseDown(), Component.mouseDrag(), Component.mouseEnter(), Component.mouseExit(), Component.mouseMove(), Component.mouseUp(), Component.postEvent(), Container.deliverEvent(), MenuComponent.postEvent(), MenuContainer.postEvent(), PopupMenuPeer.show(), Window.postEvent()
Type Of:
Event.evt