01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.gvt.event;
20:
21: import org.apache.batik.gvt.GraphicsNode;
22:
23: /**
24: * An event which indicates that a change action occurred on a graphics node.
25: *
26: * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
27: * @version $Id: GraphicsNodeChangeEvent.java 475477 2006-11-15 22:44:28Z cam $
28: */
29: public class GraphicsNodeChangeEvent extends GraphicsNodeEvent {
30:
31: /**
32: * The first number in the range of ids used for change events.
33: */
34: static final int CHANGE_FIRST = 9800;
35:
36: /**
37: * The id for the "changeStarted" event. This change event occurs
38: * when a change has started on a graphics node (but no changes have
39: * occured on the graphics node it's self).
40: */
41: public static final int CHANGE_STARTED = CHANGE_FIRST;
42:
43: /**
44: * The id for the "changeCompleted" event. This change event
45: * occurs when a change has completed on a graphics node (all
46: * changes have completed on the graphics node it's self).
47: */
48: public static final int CHANGE_COMPLETED = CHANGE_FIRST + 1;
49:
50: protected GraphicsNode changeSource;
51:
52: /**
53: * Constructs a new graphics node event with the specified source and ID.
54: * @param source the graphics node where the event originated
55: * @param id the id of this event
56: */
57: public GraphicsNodeChangeEvent(GraphicsNode source, int id) {
58: super (source, id);
59: }
60:
61: public void setChangeSrc(GraphicsNode gn) {
62: this .changeSource = gn;
63: }
64:
65: public GraphicsNode getChangeSrc() {
66: return changeSource;
67: }
68: }
|