KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > ExtendedTableModel


1 /*
2   Copyright (C) 2002 Laurent Martelli <laurent@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.gui;
20
21 import javax.swing.table.TableModel JavaDoc;
22 import org.objectweb.jac.core.rtti.FieldItem;
23 import org.objectweb.jac.core.rtti.MemberItem;
24
25 /**
26  * Data model for tables.
27  */

28 public interface ExtendedTableModel extends TableModel JavaDoc, CollectionModel {
29
30     /**
31      * Returns the members that are displayed in the table.
32      *
33      * @return one member per column */

34     MemberItem[] getMembers();
35    
36     /**
37      * Gets the headers' titles.
38      *
39      * @return one title per column */

40     String JavaDoc[] getHeaders();
41
42     int getColumnIndex(FieldItem field);
43
44     /**
45      * Gets the value at a given row, column couple. */

46     Object JavaDoc getObject(int row, int column);
47
48     /**
49      * Build a cell render for a given column.
50      *
51      * @param tableView the actual table view
52      * @param column the column for which to build the viewer
53      * @param factory the factory to use
54      * @param context the display context
55      */

56     Object JavaDoc getCellRenderer(View tableView, int column,
57                            ViewFactory factory, DisplayContext context);
58
59     TableFilter getFilter();
60     TableSorter getSorter();
61 }
62
63
Popular Tags