001: //The contents of this file are subject to the Mozilla Public License Version 1.1
002: //(the "License"); you may not use this file except in compliance with the
003: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
004: //
005: //Software distributed under the License is distributed on an "AS IS" basis,
006: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
007: //for the specific language governing rights and
008: //limitations under the License.
009: //
010: //The Original Code is "The Columba Project"
011: //
012: //The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
013: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
014: //
015: //All Rights Reserved.
016: package org.columba.mail.gui.table.model;
017:
018: import org.columba.mail.folder.IMailFolder;
019: import org.columba.mail.message.IHeaderList;
020:
021: /**
022: * @author freddy
023: *
024: * To change this generated comment edit the template variable "typecomment":
025: * Window>Preferences>Java>Templates.
026: * To enable and disable the creation of type comments go to
027: * Window>Preferences>Java>Code Generation.
028: */
029: public class TableModelChangedEvent {
030: public final static int UPDATE = 0;
031: public final static int SET = 1;
032: public final static int REMOVE = 2;
033: public final static int MARK = 3;
034: protected IMailFolder srcFolder;
035: protected Object[] uids;
036: protected int markVariant;
037: protected int eventType;
038: protected IHeaderList headerList;
039:
040: /**
041: * Constructor for TableChangedEvent.
042: */
043: public TableModelChangedEvent(int eventType) {
044: this .eventType = eventType;
045: }
046:
047: public TableModelChangedEvent(int eventType, IMailFolder srcFolder) {
048: this .eventType = eventType;
049: this .srcFolder = srcFolder;
050: }
051:
052: public TableModelChangedEvent(int eventType, IMailFolder srcFolder,
053: Object[] uids) {
054: this .eventType = eventType;
055: this .srcFolder = srcFolder;
056: this .uids = uids;
057: }
058:
059: public TableModelChangedEvent(int eventType, IMailFolder srcFolder,
060: IHeaderList headerList) {
061: this .eventType = eventType;
062: this .srcFolder = srcFolder;
063: this .headerList = headerList;
064: }
065:
066: public TableModelChangedEvent(int eventType, IMailFolder srcFolder,
067: Object[] uids, int markVariant) {
068: this .eventType = eventType;
069: this .srcFolder = srcFolder;
070: this .uids = uids;
071: this .markVariant = markVariant;
072: }
073:
074: /**
075: * Returns the markVariant.
076: * @return int
077: */
078: public int getMarkVariant() {
079: return markVariant;
080: }
081:
082: /**
083: * Returns the srcFolder.
084: * @return FolderTreeNode
085: */
086: public IMailFolder getSrcFolder() {
087: return srcFolder;
088: }
089:
090: /**
091: * Returns the uids.
092: * @return Object[]
093: */
094: public Object[] getUids() {
095: return uids;
096: }
097:
098: /**
099: * Returns the eventType.
100: * @return int
101: */
102: public int getEventType() {
103: return eventType;
104: }
105:
106: /**
107: * Returns the headerList.
108: * @return HeaderInterface[]
109: */
110: public IHeaderList getHeaderList() {
111: return headerList;
112: }
113: }
|