KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > base > entitylist > EntityList


1 /*
2  * Created on Jun 1, 2005
3  *
4  */

5 package com.nightlabs.base.entitylist;
6
7 import java.util.Collection JavaDoc;
8
9 import org.eclipse.jface.viewers.ITableLabelProvider;
10 import org.eclipse.swt.widgets.Table;
11
12 /**
13  * @author Niklas Schiffler <nick@nightlabs.de>
14  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
15  *
16  */

17 public interface EntityList
18 {
19     /**
20      * Get the unique list id
21      * @return the list id
22      */

23     public String JavaDoc getID();
24     
25     /**
26      * get a label for the selection
27      * @return the label for this list
28      */

29     public String JavaDoc getLabel();
30
31     /**
32    * This should return a collection of objects that can be managed by
33    * the EntityManager registered with this list (e.g. a user list)
34    * @return a Collection of entity objects
35    */

36   public Collection JavaDoc getEntities();
37
38   /**
39    * This should return a lable provider for the entities in this list
40    * @return the label provider
41    */

42   public ITableLabelProvider getLabelProvider();
43     
44     /**
45      * Should add as many columns to the table the
46      * ITableLabelProvider expects. Additionally a
47      * TableLayout should be added to the table
48      * when more than one column is added.
49      *
50      * @param table The cleared Table
51      */

52     public void addTableColumns(Table table);
53   
54 }
55
Popular Tags