001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * StyleChangedEvent.java
028: *
029: * Created on 10 febbraio 2003, 2.04
030: *
031: */
032:
033: package it.businesslogic.ireport.gui.event;
034:
035: import it.businesslogic.ireport.*;
036:
037: /**
038: *
039: * @author Administrator
040: */
041: public class TemplateChangedEvent {
042:
043: public static final int ADDED = 0;
044: public static final int CHANGED = 1;
045: public static final int DELETED = 2;
046:
047: private Template oldValue;
048: private Template newValue;
049: private int action = 0;
050: private Object source = null;
051:
052: /** Creates a new instance of ValueChangedEvent */
053: public TemplateChangedEvent(Object source, int action,
054: Template oldValue, Template newValue) {
055:
056: this .source = source;
057: this .oldValue = oldValue;
058: this .newValue = newValue;
059: this .action = action;
060: }
061:
062: /** Getter for property source.
063: * @return Value of property source.
064: *
065: */
066: public Object getSource() {
067: return source;
068: }
069:
070: /** Setter for property source.
071: * @param source New value of property source.
072: *
073: */
074: public void setSource(Object source) {
075: this .source = source;
076: }
077:
078: /** Getter for property newValue.
079: * @return Value of property newValue.
080: *
081: */
082: public Template getNewValue() {
083: return newValue;
084: }
085:
086: /** Setter for property newValue.
087: * @param newValue New value of property newValue.
088: *
089: */
090: public void setNewValue(Template newValue) {
091: this .newValue = newValue;
092: }
093:
094: /** Getter for property oldValue.
095: * @return Value of property oldValue.
096: *
097: */
098: public Template getOldValue() {
099: return oldValue;
100: }
101:
102: /** Setter for property oldValue.
103: * @param oldValue New value of property oldValue.
104: *
105: */
106: public void setOldValue(Template oldValue) {
107: this .oldValue = oldValue;
108: }
109:
110: public int getAction() {
111: return action;
112: }
113:
114: public void setAction(int action) {
115: this.action = action;
116: }
117: }
|