KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2002-2003 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  * An event which indicates that a change action occurred on a graphics node.
24  *
25  * @author <a HREF="mailto:deweese@apache.org">Thomas DeWeese</a>
26  * @version $Id: GraphicsNodeChangeEvent.java,v 1.7 2004/08/18 07:14:30 vhardy Exp $
27  */

28 public class GraphicsNodeChangeEvent extends GraphicsNodeEvent {
29
30     /**
31      * The first number in the range of ids used for change events.
32      */

33     static final int CHANGE_FIRST = 9800;
34
35     /**
36      * The id for the "changeStarted" event. This change event occurs
37      * when a change has started on a graphics node (but no changes have
38      * occured on the graphics node it's self).
39      */

40     public static final int CHANGE_STARTED = CHANGE_FIRST;
41
42     /**
43      * The id for the "changeCompleted" event. This change event
44      * occurs when a change has completed on a graphics node (all
45      * changes have completed on the graphics node it's self).
46      */

47     public static final int CHANGE_COMPLETED = CHANGE_FIRST+1;
48
49     protected GraphicsNode changeSource;
50
51     /**
52      * Constructs a new graphics node event with the specified source and ID.
53      * @param source the graphics node where the event originated
54      * @param id the id of this event
55      */

56     public GraphicsNodeChangeEvent(GraphicsNode source, int id) {
57         super(source, id);
58     }
59     public void setChangeSrc(GraphicsNode gn) { this.changeSource = gn; }
60     public GraphicsNode getChangeSrc() { return changeSource; }
61 }
62
Popular Tags