KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdic > browser > NativeEventData


1 /*
2  * Copyright (C) 2004 Sun Microsystems, Inc. All rights reserved. Use is
3  * subject to license terms.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the Lesser GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  */

20
21 package org.jdesktop.jdic.browser;
22
23 import java.awt.Rectangle JavaDoc;
24
25 /**
26  * An internal class that declares an event class used to be dispatched
27  * from <code>WebBrowser</code> to <code>NativeEventThread</code>.
28  *
29  * @see WebBrowser
30  * @see NativeEventThread
31  *
32  * @author Kyle Yuan
33  * @version 0.1, 03/07/17
34  */

35 class NativeEventData
36 {
37     final static int EVENT_INIT = 0;
38     final static int EVENT_CREATEWINDOW = 1;
39     final static int EVENT_DESTROYWINDOW = 2;
40     final static int EVENT_SHUTDOWN = 3;
41     final static int EVENT_SET_BOUNDS = 4;
42     final static int EVENT_NAVIGATE = 5;
43     final static int EVENT_NAVIGATE_POST = 6;
44     final static int EVENT_NAVIGATE_POSTDATA = 7;
45     final static int EVENT_GOBACK = 8;
46     final static int EVENT_GOFORWARD = 9;
47     final static int EVENT_REFRESH = 10;
48     final static int EVENT_STOP = 11;
49     final static int EVENT_GETURL = 12;
50     final static int EVENT_FOCUSGAINED = 13;
51     final static int EVENT_FOCUSLOST = 14;
52     final static int EVENT_GETCONTENT = 15;
53     final static int EVENT_SETCONTENT = 16;
54     final static int EVENT_EXECUTESCRIPT = 17;
55     
56     int instance;
57     int type;
58     Rectangle JavaDoc rectValue;
59     String JavaDoc stringValue;
60
61     NativeEventData (int instance, int type)
62     {
63         this.instance = instance;
64         this.type = type;
65     }
66
67     NativeEventData (int instance, int type, Rectangle JavaDoc rectValue)
68     {
69         this.instance = instance;
70         this.type = type;
71         this.rectValue = rectValue;
72     }
73
74     NativeEventData (int instance, int type, String JavaDoc stringValue)
75     {
76         this.instance = instance;
77         this.type = type;
78         this.stringValue = stringValue;
79     }
80 } // end of class NativeEventData
81
Popular Tags