home *** CD-ROM | disk | FTP | other *** search
- package java.awt.event;
-
- import java.awt.Component;
-
- public abstract class InputEvent extends ComponentEvent {
- public static final int SHIFT_MASK = 1;
- public static final int CTRL_MASK = 2;
- public static final int META_MASK = 4;
- public static final int ALT_MASK = 8;
- public static final int BUTTON1_MASK = 16;
- public static final int BUTTON2_MASK = 8;
- public static final int BUTTON3_MASK = 4;
- long when;
- int modifiers;
-
- InputEvent(Component var1, int var2, long var3, int var5) {
- super(var1, var2);
- this.when = var3;
- this.modifiers = var5;
- }
-
- public boolean isShiftDown() {
- return (this.modifiers & 1) != 0;
- }
-
- public boolean isControlDown() {
- return (this.modifiers & 2) != 0;
- }
-
- public boolean isMetaDown() {
- return (this.modifiers & 4) != 0;
- }
-
- public boolean isAltDown() {
- return (this.modifiers & 8) != 0;
- }
-
- public long getWhen() {
- return this.when;
- }
-
- public int getModifiers() {
- return this.modifiers;
- }
-
- public void consume() {
- super.consumed = true;
- }
-
- public boolean isConsumed() {
- return super.consumed;
- }
- }
-