01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/namecontrol/NameUpdateEvent.java,v 1.1 2005/04/20 21:04:36 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is Java 3D(tm) Fly Through.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dfly.namecontrol;
19:
20: /**
21: *
22: * @author paulby
23: * @version $I$ $G$
24: */
25: public class NameUpdateEvent extends Object {
26:
27: /**
28: * EventType when a new scene is added, OBJECT_ADDED events are
29: * NOT generated for each object in the scene
30: */
31: public static final int SCENE_ADDED = 1;
32:
33: /**
34: * EventType when a new name is added to the scene
35: */
36: public static final int OBJECT_ADDED = 2;
37:
38: /**
39: * EventType when a name is changed
40: */
41: public static final int NAME_CHANGED = 3;
42:
43: /**
44: * EventType when a name is removed
45: */
46: public static final int NAME_REMOVED = 4;
47:
48: private int eventType;
49: private String sceneName;
50: private String nodeName;
51:
52: /** Creates new NameUpdateEvent */
53: public NameUpdateEvent(int eventType, String sceneName,
54: String nodeName) {
55: this .eventType = eventType;
56: this .sceneName = sceneName;
57: this .nodeName = nodeName;
58: }
59:
60: /**
61: * Return the type of the event
62: */
63: public int getType() {
64: return eventType;
65: }
66:
67: /**
68: * Get the node name associated with this event, NodeName may be
69: * null.
70: */
71: public String getNodeName() {
72: return nodeName;
73: }
74:
75: /**
76: * Get the scene name associated with this event
77: */
78: public String getSceneName() {
79: return sceneName;
80: }
81:
82: }
|