Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Class java.awt.Event
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt

Class Event

  • java.lang.Object
    • java.awt.Event
  • All Implemented Interfaces:
    java.io.Serializable
    public class Event extends java.lang.Object implements java.io.Serializable
    NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

    Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, the Event class is maintained only for backwards compatibilty. The information in this class description is provided to assist programmers in converting Java 1.0 programs to the new event model.

    In the Java 1.0 event model, an event contains an id field that indicates what type of event it is and which other Event variables are relevant for the event.

    For keyboard events, key contains a value indicating which key was activated, and modifiers contains the modifiers for that event. For the KEY_PRESS and KEY_RELEASE event ids, the value of key is the unicode character code for the key. For KEY_ACTION and KEY_ACTION_RELEASE, the value of key is one of the defined action-key identifiers in the Event class (PGUP, PGDN, F1, F2, etc).

    Since:
    JDK1.0
    See Also:
    Serialized Form
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator ACTION_EVENT Reveal DetailHide Detail
      static int ACTION_EVENT
      This event indicates that the user wants some action to occur.
      public static final int ACTION_EVENT
      This event indicates that the user wants some action to occur.
      See Also:
      Constant Field Values
      Ordinary member indicator ALT_MASK Reveal DetailHide Detail
      static int ALT_MASK
      This flag indicates that the Alt key was down when the event occurred.
      public static final int ALT_MASK
      This flag indicates that the Alt key was down when the event occurred. For mouse events, this flag indicates that the middle mouse button was pressed or released.
      See Also:
      Constant Field Values
      Ordinary member indicator arg Reveal DetailHide Detail
      java.lang.Object arg
      An arbitrary argument of the event.
      public java.lang.Object arg
      An arbitrary argument of the event. The value of this field depends on the type of event. arg has been replaced by event specific property.
      Ordinary member indicator BACK_SPACE Reveal DetailHide Detail
      static int BACK_SPACE
      The BackSpace key.
      public static final int BACK_SPACE
      The BackSpace key.
      See Also:
      Constant Field Values
      Ordinary member indicator CAPS_LOCK Reveal DetailHide Detail
      static int CAPS_LOCK
      The Caps Lock key, a non-ASCII action key.
      public static final int CAPS_LOCK
      The Caps Lock key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator clickCount Reveal DetailHide Detail
      int clickCount
      For MOUSE_DOWN events, this field indicates the number of consecutive clicks.
      public int clickCount
      For MOUSE_DOWN events, this field indicates the number of consecutive clicks. For other events, its value is 0. This field has been replaced by MouseEvent.getClickCount().
      See Also:
      MouseEvent.getClickCount().
      Ordinary member indicator CTRL_MASK Reveal DetailHide Detail
      static int CTRL_MASK
      This flag indicates that the Control key was down when the event occurred.
      public static final int CTRL_MASK
      This flag indicates that the Control key was down when the event occurred.
      See Also:
      Constant Field Values
      Ordinary member indicator DELETE Reveal DetailHide Detail
      static int DELETE
      The Delete key.
      public static final int DELETE
      The Delete key.
      See Also:
      Constant Field Values
      Ordinary member indicator DOWN Reveal DetailHide Detail
      static int DOWN
      The Down Arrow key, a non-ASCII action key.
      public static final int DOWN
      The Down Arrow key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator END Reveal DetailHide Detail
      static int END
      The End key, a non-ASCII action key.
      public static final int END
      The End key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator ENTER Reveal DetailHide Detail
      static int ENTER
      The Enter key.
      public static final int ENTER
      The Enter key.
      See Also:
      Constant Field Values
      Ordinary member indicator ESCAPE Reveal DetailHide Detail
      static int ESCAPE
      The Escape key.
      public static final int ESCAPE
      The Escape key.
      See Also:
      Constant Field Values
      Ordinary member indicator evt Reveal DetailHide Detail
      Event evt
      The next event.
      public Event evt
      The next event. This field is set when putting events into a linked list. This has been replaced by EventQueue.
      See Also:
      EventQueue
      Ordinary member indicator F1 Reveal DetailHide Detail
      static int F1
      The F1 function key, a non-ASCII action key.
      public static final int F1
      The F1 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F10 Reveal DetailHide Detail
      static int F10
      The F10 function key, a non-ASCII action key.
      public static final int F10
      The F10 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F11 Reveal DetailHide Detail
      static int F11
      The F11 function key, a non-ASCII action key.
      public static final int F11
      The F11 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F12 Reveal DetailHide Detail
      static int F12
      The F12 function key, a non-ASCII action key.
      public static final int F12
      The F12 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F2 Reveal DetailHide Detail
      static int F2
      The F2 function key, a non-ASCII action key.
      public static final int F2
      The F2 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F3 Reveal DetailHide Detail
      static int F3
      The F3 function key, a non-ASCII action key.
      public static final int F3
      The F3 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F4 Reveal DetailHide Detail
      static int F4
      The F4 function key, a non-ASCII action key.
      public static final int F4
      The F4 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F5 Reveal DetailHide Detail
      static int F5
      The F5 function key, a non-ASCII action key.
      public static final int F5
      The F5 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F6 Reveal DetailHide Detail
      static int F6
      The F6 function key, a non-ASCII action key.
      public static final int F6
      The F6 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F7 Reveal DetailHide Detail
      static int F7
      The F7 function key, a non-ASCII action key.
      public static final int F7
      The F7 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F8 Reveal DetailHide Detail
      static int F8
      The F8 function key, a non-ASCII action key.
      public static final int F8
      The F8 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator F9 Reveal DetailHide Detail
      static int F9
      The F9 function key, a non-ASCII action key.
      public static final int F9
      The F9 function key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator GOT_FOCUS Reveal DetailHide Detail
      static int GOT_FOCUS
      A component gained the focus.
      public static final int GOT_FOCUS
      A component gained the focus.
      See Also:
      Constant Field Values
      Ordinary member indicator HOME Reveal DetailHide Detail
      static int HOME
      The Home key, a non-ASCII action key.
      public static final int HOME
      The Home key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator id Reveal DetailHide Detail
      int id
      Indicates which type of event the event is, and which other Event variables are relevant for the event.
      public int id
      Indicates which type of event the event is, and which other Event variables are relevant for the event. This has been replaced by AWTEvent.getID()
      See Also:
      AWTEvent.getID()
      Ordinary member indicator INSERT Reveal DetailHide Detail
      static int INSERT
      The Insert key, a non-ASCII action key.
      public static final int INSERT
      The Insert key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator key Reveal DetailHide Detail
      int key
      The key code of the key that was pressed in a keyboard event.
      public int key
      The key code of the key that was pressed in a keyboard event. This has been replaced by KeyEvent.getKeyCode()
      See Also:
      KeyEvent.getKeyCode()
      Ordinary member indicator KEY_ACTION Reveal DetailHide Detail
      static int KEY_ACTION
      The user has pressed a non-ASCII action key.
      public static final int KEY_ACTION
      The user has pressed a non-ASCII action key. The key field contains a value that indicates that the event occurred on one of the action keys, which comprise the 12 function keys, the arrow (cursor) keys, Page Up, Page Down, Home, End, Print Screen, Scroll Lock, Caps Lock, Num Lock, Pause, and Insert.
      See Also:
      Constant Field Values
      Ordinary member indicator KEY_ACTION_RELEASE Reveal DetailHide Detail
      static int KEY_ACTION_RELEASE
      The user has released a non-ASCII action key.
      public static final int KEY_ACTION_RELEASE
      The user has released a non-ASCII action key. The key field contains a value that indicates that the event occurred on one of the action keys, which comprise the 12 function keys, the arrow (cursor) keys, Page Up, Page Down, Home, End, Print Screen, Scroll Lock, Caps Lock, Num Lock, Pause, and Insert.
      See Also:
      Constant Field Values
      Ordinary member indicator KEY_PRESS Reveal DetailHide Detail
      static int KEY_PRESS
      The user has pressed a normal key.
      public static final int KEY_PRESS
      The user has pressed a normal key.
      See Also:
      Constant Field Values
      Ordinary member indicator KEY_RELEASE Reveal DetailHide Detail
      static int KEY_RELEASE
      The user has released a normal key.
      public static final int KEY_RELEASE
      The user has released a normal key.
      See Also:
      Constant Field Values
      Ordinary member indicator LEFT Reveal DetailHide Detail
      static int LEFT
      The Left Arrow key, a non-ASCII action key.
      public static final int LEFT
      The Left Arrow key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator LIST_DESELECT Reveal DetailHide Detail
      static int LIST_DESELECT
      An item in a list has been deselected.
      public static final int LIST_DESELECT
      An item in a list has been deselected.
      See Also:
      Constant Field Values
      Ordinary member indicator LIST_SELECT Reveal DetailHide Detail
      static int LIST_SELECT
      An item in a list has been selected.
      public static final int LIST_SELECT
      An item in a list has been selected.
      See Also:
      Constant Field Values
      Ordinary member indicator LOAD_FILE Reveal DetailHide Detail
      static int LOAD_FILE
      A file loading event.
      public static final int LOAD_FILE
      A file loading event.
      See Also:
      Constant Field Values
      Ordinary member indicator LOST_FOCUS Reveal DetailHide Detail
      static int LOST_FOCUS
      A component lost the focus.
      public static final int LOST_FOCUS
      A component lost the focus.
      See Also:
      Constant Field Values
      Ordinary member indicator META_MASK Reveal DetailHide Detail
      static int META_MASK
      This flag indicates that the Meta key was down when the event occurred.
      public static final int META_MASK
      This flag indicates that the Meta key was down when the event occurred. For mouse events, this flag indicates that the right button was pressed or released.
      See Also:
      Constant Field Values
      Ordinary member indicator modifiers Reveal DetailHide Detail
      int modifiers
      The state of the modifier keys.
      public int modifiers
      The state of the modifier keys. This is replaced with InputEvent.getModifiers() In java 1.1 MouseEvent and KeyEvent are subclasses of InputEvent.
      See Also:
      InputEvent.getModifiers()
      Ordinary member indicator MOUSE_DOWN Reveal DetailHide Detail
      static int MOUSE_DOWN
      The user has pressed the mouse button.
      public static final int MOUSE_DOWN
      The user has pressed the mouse button. The ALT_MASK flag indicates that the middle button has been pressed. The META_MASKflag indicates that the right button has been pressed.
      See Also:
      ALT_MASK, META_MASK, Constant Field Values
      Ordinary member indicator MOUSE_DRAG Reveal DetailHide Detail
      static int MOUSE_DRAG
      The user has moved the mouse with a button pressed.
      public static final int MOUSE_DRAG
      The user has moved the mouse with a button pressed. The ALT_MASK flag indicates that the middle button is being pressed. The META_MASK flag indicates that the right button is being pressed.
      See Also:
      ALT_MASK, META_MASK, Constant Field Values
      Ordinary member indicator MOUSE_ENTER Reveal DetailHide Detail
      static int MOUSE_ENTER
      The mouse has entered a component.
      public static final int MOUSE_ENTER
      The mouse has entered a component.
      See Also:
      Constant Field Values
      Ordinary member indicator MOUSE_EXIT Reveal DetailHide Detail
      static int MOUSE_EXIT
      The mouse has exited a component.
      public static final int MOUSE_EXIT
      The mouse has exited a component.
      See Also:
      Constant Field Values
      Ordinary member indicator MOUSE_MOVE Reveal DetailHide Detail
      static int MOUSE_MOVE
      The mouse has moved with no button pressed.
      public static final int MOUSE_MOVE
      The mouse has moved with no button pressed.
      See Also:
      Constant Field Values
      Ordinary member indicator MOUSE_UP Reveal DetailHide Detail
      static int MOUSE_UP
      The user has released the mouse button.
      public static final int MOUSE_UP
      The user has released the mouse button. The ALT_MASK flag indicates that the middle button has been released. The META_MASKflag indicates that the right button has been released.
      See Also:
      ALT_MASK, META_MASK, Constant Field Values
      Ordinary member indicator NUM_LOCK Reveal DetailHide Detail
      static int NUM_LOCK
      The Num Lock key, a non-ASCII action key.
      public static final int NUM_LOCK
      The Num Lock key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator PAUSE Reveal DetailHide Detail
      static int PAUSE
      The Pause key, a non-ASCII action key.
      public static final int PAUSE
      The Pause key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator PGDN Reveal DetailHide Detail
      static int PGDN
      The Page Down key, a non-ASCII action key.
      public static final int PGDN
      The Page Down key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator PGUP Reveal DetailHide Detail
      static int PGUP
      The Page Up key, a non-ASCII action key.
      public static final int PGUP
      The Page Up key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator PRINT_SCREEN Reveal DetailHide Detail
      static int PRINT_SCREEN
      The Print Screen key, a non-ASCII action key.
      public static final int PRINT_SCREEN
      The Print Screen key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator RIGHT Reveal DetailHide Detail
      static int RIGHT
      The Right Arrow key, a non-ASCII action key.
      public static final int RIGHT
      The Right Arrow key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator SAVE_FILE Reveal DetailHide Detail
      static int SAVE_FILE
      A file saving event.
      public static final int SAVE_FILE
      A file saving event.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_ABSOLUTE Reveal DetailHide Detail
      static int SCROLL_ABSOLUTE
      The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion.
      public static final int SCROLL_ABSOLUTE
      The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_BEGIN Reveal DetailHide Detail
      static int SCROLL_BEGIN
      The scroll begin event.
      public static final int SCROLL_BEGIN
      The scroll begin event.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_END Reveal DetailHide Detail
      static int SCROLL_END
      The scroll end event.
      public static final int SCROLL_END
      The scroll end event.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_LINE_DOWN Reveal DetailHide Detail
      static int SCROLL_LINE_DOWN
      The user has activated the line down area of a scroll bar.
      public static final int SCROLL_LINE_DOWN
      The user has activated the line down area of a scroll bar.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_LINE_UP Reveal DetailHide Detail
      static int SCROLL_LINE_UP
      The user has activated the line up area of a scroll bar.
      public static final int SCROLL_LINE_UP
      The user has activated the line up area of a scroll bar.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_LOCK Reveal DetailHide Detail
      static int SCROLL_LOCK
      The Scroll Lock key, a non-ASCII action key.
      public static final int SCROLL_LOCK
      The Scroll Lock key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_PAGE_DOWN Reveal DetailHide Detail
      static int SCROLL_PAGE_DOWN
      The user has activated the page down area of a scroll bar.
      public static final int SCROLL_PAGE_DOWN
      The user has activated the page down area of a scroll bar.
      See Also:
      Constant Field Values
      Ordinary member indicator SCROLL_PAGE_UP Reveal DetailHide Detail
      static int SCROLL_PAGE_UP
      The user has activated the page up area of a scroll bar.
      public static final int SCROLL_PAGE_UP
      The user has activated the page up area of a scroll bar.
      See Also:
      Constant Field Values
      Ordinary member indicator SHIFT_MASK Reveal DetailHide Detail
      static int SHIFT_MASK
      This flag indicates that the Shift key was down when the event occurred.
      public static final int SHIFT_MASK
      This flag indicates that the Shift key was down when the event occurred.
      See Also:
      Constant Field Values
      Ordinary member indicator TAB Reveal DetailHide Detail
      static int TAB
      The Tab key.
      public static final int TAB
      The Tab key.
      See Also:
      Constant Field Values
      Ordinary member indicator target Reveal DetailHide Detail
      java.lang.Object target
      The target component.
      public java.lang.Object target
      The target component. This indicates the component over which the event occurred or with which the event is associated. This object has been replaced by AWTEvent.getSource()
      See Also:
      EventObject.getSource()
      Ordinary member indicator UP Reveal DetailHide Detail
      static int UP
      The Up Arrow key, a non-ASCII action key.
      public static final int UP
      The Up Arrow key, a non-ASCII action key.
      See Also:
      Constant Field Values
      Ordinary member indicator when Reveal DetailHide Detail
      long when
      The time stamp.
      public long when
      The time stamp. Replaced by InputEvent.getWhen().
      See Also:
      InputEvent.getWhen()
      Ordinary member indicator WINDOW_DEICONIFY Reveal DetailHide Detail
      static int WINDOW_DEICONIFY
      The user has asked the window manager to de-iconify the window.
      public static final int WINDOW_DEICONIFY
      The user has asked the window manager to de-iconify the window.
      See Also:
      Constant Field Values
      Ordinary member indicator WINDOW_DESTROY Reveal DetailHide Detail
      static int WINDOW_DESTROY
      The user has asked the window manager to kill the window.
      public static final int WINDOW_DESTROY
      The user has asked the window manager to kill the window.
      See Also:
      Constant Field Values
      Ordinary member indicator WINDOW_EXPOSE Reveal DetailHide Detail
      static int WINDOW_EXPOSE
      The user has asked the window manager to expose the window.
      public static final int WINDOW_EXPOSE
      The user has asked the window manager to expose the window.
      See Also:
      Constant Field Values
      Ordinary member indicator WINDOW_ICONIFY Reveal DetailHide Detail
      static int WINDOW_ICONIFY
      The user has asked the window manager to iconify the window.
      public static final int WINDOW_ICONIFY
      The user has asked the window manager to iconify the window.
      See Also:
      Constant Field Values
      Ordinary member indicator WINDOW_MOVED Reveal DetailHide Detail
      static int WINDOW_MOVED
      The user has asked the window manager to move the window.
      public static final int WINDOW_MOVED
      The user has asked the window manager to move the window.
      See Also:
      Constant Field Values
      Ordinary member indicator x Reveal DetailHide Detail
      int x
      The x coordinate of the event.
      public int x
      The x coordinate of the event. Replaced by MouseEvent.getX()
      See Also:
      MouseEvent.getX()
      Ordinary member indicator y Reveal DetailHide Detail
      int y
      The y coordinate of the event.
      public int y
      The y coordinate of the event. Replaced by MouseEvent.getY()
      See Also:
      MouseEvent.getY()
    • Constructors 
      Constructor and Description
      Ordinary member indicator Event Reveal DetailHide Detail
      Event(java.lang.Object target, int id, java.lang.Object arg)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public Event(java.lang.Object target, int id, java.lang.Object arg)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Creates an instance of Event with the specified target component, event type, and argument.

      Parameters:
      target - the target component.
      id - the event type.
      arg - the specified argument.
      Ordinary member indicator Event Reveal DetailHide Detail
      Event(java.lang.Object target, long when, int id, int x, int y, int key, int modifiers)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public Event(java.lang.Object target, long when, int id, int x, int y, int key, int modifiers)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Creates an instance of Event, with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and an argument set to null.

      Parameters:
      target - the target component.
      when - the time stamp.
      id - the event type.
      x - the x coordinate.
      y - the y coordinate.
      key - the key pressed in a keyboard event.
      modifiers - the state of the modifier keys.
      Ordinary member indicator Event Reveal DetailHide Detail
      Event(java.lang.Object target, long when, int id, int x, int y, int key, int modifiers, java.lang.Object arg)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public Event(java.lang.Object target, long when, int id, int x, int y, int key, int modifiers, java.lang.Object arg)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Creates an instance of Event with the specified target component, time stamp, event type, x and y coordinates, keyboard key, state of the modifier keys, and argument.

      Parameters:
      target - the target component.
      when - the time stamp.
      id - the event type.
      x - the x coordinate.
      y - the y coordinate.
      key - the key pressed in a keyboard event.
      modifiers - the state of the modifier keys.
      arg - the specified argument.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator controlDown Reveal DetailHide Detail
      boolean controlDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public boolean controlDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Checks if the Control key is down.

      Returns:
      true if the key is down; false otherwise.
      See Also:
      modifiers, shiftDown(), metaDown()
      Ordinary member indicator metaDown Reveal DetailHide Detail
      boolean metaDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public boolean metaDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Checks if the Meta key is down.

      Returns:
      true if the key is down; false otherwise.
      See Also:
      modifiers, shiftDown(), controlDown()
      Ordinary member indicator paramString Reveal DetailHide Detail
      protected java.lang.String paramString()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      protected java.lang.String paramString()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Returns a string representing the state of this Event. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

      Returns:
      the parameter string of this event
      Ordinary member indicator shiftDown Reveal DetailHide Detail
      boolean shiftDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public boolean shiftDown()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Checks if the Shift key is down.

      Returns:
      true if the key is down; false otherwise.
      See Also:
      modifiers, controlDown(), metaDown()
      Overridden member indicator toString Reveal DetailHide Detail
      java.lang.String toString()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public java.lang.String toString()
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Returns a representation of this event's values as a string.

      Overrides:
      toString in class java.lang.Object
      Returns:
      a string that represents the event and the values of its member fields.
      Since:
      JDK1.1
      See Also:
      paramString()
      Ordinary member indicator translate Reveal DetailHide Detail
      void translate(int dx, int dy)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility.
      public void translate(int dx, int dy)
      NOTE: The Event class is obsolete and is available only for backwards compatilibility. It has been replaced by the AWTEvent class and its subclasses.

      Translates this event so that its x and y coordinates are increased by dx and dy, respectively.

      This method translates an event relative to the given component. This involves, at a minimum, translating the coordinates into the local coordinate system of the given component. It may also involve translating a region in the case of an expose event.

      Parameters:
      dx - the distance to translate the x coordinate.
      dy - the distance to translate the y coordinate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge