|
Last change
on this file since 2 was 2, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /* Copyright (C) 1999, 2000 Free Software Foundation
|
|---|
| 2 |
|
|---|
| 3 | This file is part of libjava.
|
|---|
| 4 |
|
|---|
| 5 | This software is copyrighted work licensed under the terms of the
|
|---|
| 6 | Libjava License. Please consult the file "LIBJAVA_LICENSE" for
|
|---|
| 7 | details. */
|
|---|
| 8 |
|
|---|
| 9 | package java.awt.event;
|
|---|
| 10 | import java.awt.*;
|
|---|
| 11 |
|
|---|
| 12 | /* Status: Believed complete and correct to JDK 1.2. */
|
|---|
| 13 |
|
|---|
| 14 | public class ActionEvent extends AWTEvent
|
|---|
| 15 | {
|
|---|
| 16 | public static final int ACTION_FIRST = 1001;
|
|---|
| 17 | public static final int ACTION_LAST = 1001;
|
|---|
| 18 | public static final int ACTION_PERFORMED = 1001;
|
|---|
| 19 | public static final int ALT_MASK = 8;
|
|---|
| 20 | public static final int CTRL_MASK = 2;
|
|---|
| 21 | public static final int META_MASK = 4;
|
|---|
| 22 | public static final int SHIFT_MASK = 1;
|
|---|
| 23 |
|
|---|
| 24 | String cmd;
|
|---|
| 25 | int modifiers;
|
|---|
| 26 |
|
|---|
| 27 | public ActionEvent (Object source, int id, String command)
|
|---|
| 28 | {
|
|---|
| 29 | super(source, id);
|
|---|
| 30 | cmd = command;
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | public ActionEvent (Object source, int id, String command, int modifiers)
|
|---|
| 34 | {
|
|---|
| 35 | super(source, id);
|
|---|
| 36 | cmd = command;
|
|---|
| 37 | this.modifiers = modifiers;
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | public String getActionCommand ()
|
|---|
| 41 | {
|
|---|
| 42 | return cmd;
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | public int getModifiers ()
|
|---|
| 46 | {
|
|---|
| 47 | return modifiers;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | public String paramString ()
|
|---|
| 51 | {
|
|---|
| 52 | String r;
|
|---|
| 53 | switch (id)
|
|---|
| 54 | {
|
|---|
| 55 | case ACTION_PERFORMED:
|
|---|
| 56 | r = "ACTION_PERFORMED";
|
|---|
| 57 | break;
|
|---|
| 58 | default:
|
|---|
| 59 | r = "unknown type";
|
|---|
| 60 | break;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | r += ",cmd=" + cmd;
|
|---|
| 64 | return r;
|
|---|
| 65 | }
|
|---|
| 66 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.