KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > gvt > event > GraphicsNodeFocusEvent


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.gvt.event;
19
20 import org.apache.batik.gvt.GraphicsNode;
21
22 /**
23  * A low-level event which indicates that a graphics node has gained or
24  * lost the keyboard focus.
25  *
26  * @author <a HREF="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
27  * @version $Id: GraphicsNodeFocusEvent.java,v 1.3 2004/08/18 07:14:30 vhardy Exp $
28  */

29 public class GraphicsNodeFocusEvent extends GraphicsNodeEvent {
30
31     /**
32      * The first number in the range of ids used for focus events.
33      */

34     static final int FOCUS_FIRST = 1004;
35
36     /**
37      * The id for the "focusGained" event. This event indicates that
38      * the component gained the keyboard focus.
39      */

40     public static final int FOCUS_GAINED = FOCUS_FIRST;
41
42     /**
43      * The id for the "focusLoses" event. This event indicates that
44      * the component lost the keyboard focus.
45      */

46     public static final int FOCUS_LOST = FOCUS_FIRST + 1;
47
48     /**
49      * Constructs a new graphics node focus event.
50      * @param source the graphics node where the event originated
51      * @param id the id of this event
52      */

53     public GraphicsNodeFocusEvent(GraphicsNode source, int id) {
54         super(source, id);
55     }
56 }
57
Popular Tags