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: * SubDatasetObjectChangedEvent.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 SubDatasetObjectChangedEvent {
042:
043: public static final int FIELD = 0;
044: public static final int VARIABLE = 1;
045: public static final int PARAMETER = 2;
046: public static final int QUERY = 3;
047: public static final int QUERY_LANGUAGE = 4;
048: public static final int SORTFIELD = 5;
049:
050: public static final int ADDED = 0;
051: public static final int MODIFIED = 1;
052: public static final int DELETED = 2;
053: public static final int ORDER_CHANGED = 3;
054:
055: private Object oldValue;
056: private Object newValue;
057: private int type = 0;
058: private int action = 0;
059: private SubDataset source = null;
060:
061: /** Creates a new instance of ValueChangedEvent */
062: public SubDatasetObjectChangedEvent(SubDataset source,
063: int objectType, int action, Object oldValue, Object newValue) {
064:
065: this .source = source;
066: this .oldValue = oldValue;
067: this .newValue = newValue;
068: this .action = action;
069: this .type = objectType;
070: }
071:
072: /** Getter for property source.
073: * @return Value of property source.
074: *
075: */
076: public SubDataset getSource() {
077: return source;
078: }
079:
080: /** Setter for property source.
081: * @param source New value of property source.
082: *
083: */
084: public void setSource(Report source) {
085: this .source = source;
086: }
087:
088: /** Getter for property newValue.
089: * @return Value of property newValue.
090: *
091: */
092: public Object getNewValue() {
093: return newValue;
094: }
095:
096: /** Setter for property newValue.
097: * @param newValue New value of property newValue.
098: *
099: */
100: public void setNewValue(Object newValue) {
101: this .newValue = newValue;
102: }
103:
104: /** Getter for property oldValue.
105: * @return Value of property oldValue.
106: *
107: */
108: public Object getOldValue() {
109: return oldValue;
110: }
111:
112: /** Setter for property oldValue.
113: * @param oldValue New value of property oldValue.
114: *
115: */
116: public void setOldValue(Object oldValue) {
117: this .oldValue = oldValue;
118: }
119:
120: public int getType() {
121: return type;
122: }
123:
124: public void setType(int type) {
125: this .type = type;
126: }
127:
128: public int getAction() {
129: return action;
130: }
131:
132: public void setAction(int action) {
133: this.action = action;
134: }
135:
136: }
|