001: // The contents of this file are subject to the Mozilla Public License Version
002: // 1.1
003: //(the "License"); you may not use this file except in compliance with the
004: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
005: //
006: //Software distributed under the License is distributed on an "AS IS" basis,
007: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
008: //for the specific language governing rights and
009: //limitations under the License.
010: //
011: //The Original Code is "The Columba Project"
012: //
013: //The Initial Developers of the Original Code are Frederik Dietz and Timo
014: // Stich.
015: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
016: //
017: //All Rights Reserved.
018: package org.columba.mail.gui.table;
019:
020: import java.util.Observable;
021:
022: import javax.swing.ListSelectionModel;
023: import javax.swing.table.TableColumn;
024: import javax.swing.table.TableColumnModel;
025: import javax.swing.tree.TreePath;
026:
027: import org.columba.mail.folder.IMailbox;
028: import org.columba.mail.message.IHeaderList;
029:
030: /**
031: * @author fdietz
032: *
033: */
034: public interface ITableController {
035: /**
036: * Get view of table controller
037: *
038: * @return table view
039: */
040: //TableView getView();
041: /**
042: * Get table model
043: *
044: * @return table model
045: */
046: IHeaderTableModel getHeaderTableModel();
047:
048: /**
049: * Show the headerlist of currently selected folder.
050: * <p>
051: * Additionally, implements folderoptions plugin entrypoint.
052: *
053: * @see org.columba.mail.folder.folderoptions
054: * @see org.columba.mail.gui.frame.ViewHeaderListInterface#showHeaderList(org.columba.mail.folder.Folder,
055: * org.columba.mail.message.HeaderList)
056: */
057: void showHeaderList(IMailbox folder, IHeaderList headerList)
058: throws Exception;
059:
060: IMessageNode[] getSelectedNodes();
061:
062: void setSelected(Object[] uids);
063:
064: int[] getSelectedRows();
065:
066: TreePath getPathForRow(int row);
067:
068: int getRowCount();
069:
070: Object selectFirstRow();
071:
072: Object selectLastRow();
073:
074: void selectRow(int row);
075:
076: void clearSelection();
077:
078: void makeSelectedRowVisible();
079:
080: IMessageNode getMessageNode(Object uid);
081:
082: void enableThreadedView(boolean enableThreadedMode,
083: boolean updateModel);
084:
085: boolean isThreadedViewEnabled();
086:
087: Observable getSortingStateObservable();
088:
089: void setSortingOrder(boolean order);
090:
091: void setSortingColumn(String column);
092:
093: String getSortingColumn();
094:
095: boolean getSortingOrder();
096:
097: void clear();
098:
099: TableColumnModel getColumnModel();
100:
101: void resetColumnModel();
102:
103: TableColumn createTableColumn(String name, int size);
104:
105: void addColumn(TableColumn column);
106:
107: ListSelectionModel getListSelectionModel();
108:
109: public void addMessageListSelectionListener(
110: IMessageListSelectionListener l);
111:
112: public void removeMessageListSelectionListener(
113: IMessageListSelectionListener l);
114: }
|