1 /*****************************************************************************
2 * Virtual Mockup for Machine Vision
3 * Copyright (C) 2001-2003 Fabio R. de Miranda, João E. Kogler Jr.,
4 * Carlos S. Santos.
5 * Virtual Mockup for Machine Vision Project funded by SENAC-SP
6 *
7 * Permission is granted to redistribute and/or modify this
8 * software under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License (http://www.gnu.org/copyleft/lesser.html)
16 * for more details.
17 *
18 *****************************************************************************/
19
20 package camera3d.event;
21
22 import camera3d.VcObject;
23 /***
24 * @author Fábio Roberto de Miranda e Carlos da Silva dos Santos
25 * @version 1.0
26 */
27
28 /***
29 * Event fired when a VcObject has its label changed.
30 * @author Fábio Roberto de Miranda e Carlos da Silva dos Santos
31 * @version 1.0
32 */
33 public class VcLabelChangedEvent extends VcObjectEvent {
34
35 /*** new label of the VcObject*/
36 private String newLabel;
37
38 private String oldLabel;
39
40 /***
41 * Constructor.
42 * @param source the VcObject whose label has been changed.
43 */
44 public VcLabelChangedEvent(Object source) {
45 super(source);
46 if(source instanceof VcObject)
47 setNewLabel(((VcObject)source).getLabel());
48 /* sets the type property for this event */
49 this.type = VcObjectEvent.LABEL_CHANGED;
50 }
51
52 public VcLabelChangedEvent(Object source, String newLabel, String oldLabel) {
53 this(source);
54 this.newLabel = newLabel;
55 this.oldLabel = oldLabel;
56 }
57
58 /***
59 * Sets the newLabel property for this object.
60 * @param label the new label of source object
61 */
62 public void setNewLabel(String label){
63 this.newLabel = label;
64 }
65
66 /***
67 * Gets the new label of source object.
68 * @return a String containing the new label.
69 */
70 public String getNewLabel(){
71 return this.newLabel;
72 }
73
74 /***
75 * Sets the oldLabel property for this object.
76 * @param label the new label of source object
77 */
78 public void setOldLabel(String label){
79 this.oldLabel = label;
80 }
81
82 /***
83 * Gets the old label of source object.
84 * @return a String containing the new label.
85 */
86 public String getOldLabel(){
87 return this.oldLabel;
88 }
89
90
91 }
This page was automatically generated by Maven