KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > mail > gui > table > ITableController


1 // The contents of this file are subject to the Mozilla Public License Version
2
// 1.1
3
//(the "License"); you may not use this file except in compliance with the
4
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
5
//
6
//Software distributed under the License is distributed on an "AS IS" basis,
7
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
8
//for the specific language governing rights and
9
//limitations under the License.
10
//
11
//The Original Code is "The Columba Project"
12
//
13
//The Initial Developers of the Original Code are Frederik Dietz and Timo
14
// Stich.
15
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
16
//
17
//All Rights Reserved.
18
package org.columba.mail.gui.table;
19
20 import java.util.Observable JavaDoc;
21
22 import javax.swing.ListSelectionModel JavaDoc;
23 import javax.swing.table.TableColumn JavaDoc;
24 import javax.swing.table.TableColumnModel JavaDoc;
25 import javax.swing.tree.TreePath JavaDoc;
26
27 import org.columba.mail.folder.IMailbox;
28 import org.columba.mail.message.IHeaderList;
29
30 /**
31  * @author fdietz
32  *
33  */

34 public interface ITableController {
35     /**
36      * Get view of table controller
37      *
38      * @return table view
39      */

40     //TableView getView();
41

42     /**
43      * Get table model
44      *
45      * @return table model
46      */

47     IHeaderTableModel getHeaderTableModel();
48
49     /**
50      * Show the headerlist of currently selected folder.
51      * <p>
52      * Additionally, implements folderoptions plugin entrypoint.
53      *
54      * @see org.columba.mail.folder.folderoptions
55      * @see org.columba.mail.gui.frame.ViewHeaderListInterface#showHeaderList(org.columba.mail.folder.Folder,
56      * org.columba.mail.message.HeaderList)
57      */

58     void showHeaderList(IMailbox folder, IHeaderList headerList)
59             throws Exception JavaDoc;
60     
61     
62     IMessageNode[] getSelectedNodes();
63     void setSelected(Object JavaDoc[] uids);
64     int[] getSelectedRows();
65     TreePath JavaDoc getPathForRow(int row);
66     
67     int getRowCount();
68     
69     Object JavaDoc selectFirstRow();
70     Object JavaDoc selectLastRow();
71     void selectRow(int row);
72     void clearSelection();
73     void makeSelectedRowVisible();
74     
75     IMessageNode getMessageNode(Object JavaDoc uid);
76     
77     void enableThreadedView(boolean enableThreadedMode, boolean updateModel);
78     boolean isThreadedViewEnabled();
79     
80     Observable JavaDoc getSortingStateObservable();
81     void setSortingOrder(boolean order);
82     void setSortingColumn(String JavaDoc column);
83     String JavaDoc getSortingColumn();
84     boolean getSortingOrder();
85     
86     void clear();
87     
88     TableColumnModel JavaDoc getColumnModel();
89     void resetColumnModel();
90     TableColumn JavaDoc createTableColumn(String JavaDoc name, int size);
91     void addColumn(TableColumn JavaDoc column);
92     
93     ListSelectionModel JavaDoc getListSelectionModel();
94     
95     public void addMessageListSelectionListener(IMessageListSelectionListener l);
96
97     public void removeMessageListSelectionListener(IMessageListSelectionListener l);
98 }
Popular Tags