KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > table > ITableComponent


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 /*
14  * Created on Jun 11, 2004
15  */

16 package com.tonbeller.wcf.table;
17
18 import com.tonbeller.wcf.component.Component;
19 import com.tonbeller.wcf.selection.SelectionModel;
20
21 /**
22  * Common behaviour of EditableTableComponent and TableComponent
23  *
24  * @author av
25  */

26 public interface ITableComponent extends Component {
27   /** set the data model and initializes everything */
28   void setModel(TableModel newModel);
29
30   /** the underlying data model w/o sort/paging decorators */
31   TableModel getModel();
32
33   /** the current selection */
34   void setSelectionModel(SelectionModel selectionModel);
35
36   /** the current selection */
37   SelectionModel getSelectionModel();
38
39   /** allows to enable/disable sorting of columns */
40   void setSortable(boolean newSortable);
41
42   /** allows to enable/disable sorting of columns */
43   boolean isSortable();
44
45   /** allows to enable/disable paging of rows */
46   void setPageable(boolean newPageable);
47
48   /** allows to enable/disable paging of rows */
49   boolean isPageable();
50
51   /** set the current sort column */
52   void setSortColumnIndex(int index);
53
54   RowComparator getRowComparator();
55
56   int getPageSize();
57
58   void setPageSize(int newPageSize);
59
60   int getCurrentPage();
61
62   void setCurrentPage(int newCurrentPage);
63
64   int getPageCount();
65
66   /**
67    * shall this table have a close button?
68    */

69   boolean isClosable();
70
71   /**
72    * shall this table have a close button?
73    */

74   void setClosable(boolean b);
75
76   /**
77    * gets the border attribute of the generated table.
78    * Overrides the global stylesheet parameter "border".
79    * @return the border attribute or null
80    */

81   String JavaDoc getBorder();
82
83   /**
84    * sets the border attribute of the generated table.
85    * Overrides the global stylesheet parameter "border".
86    * @param border the border attribute or null to use the stylesheet parameter
87    */

88   void setBorder(String JavaDoc border);
89
90   /**
91    * sets the renderId attribute of the generated table.
92    * Overrides the global stylesheet parameter "renderId".
93    * @param renderId the renderId attribute or null to use the stylesheet parameter
94    */

95   void setRenderId(String JavaDoc renderId);
96
97   /**
98    * gets the renderId attribute of the generated table.
99    * Overrides the global stylesheet parameter "renderId".
100    * @return the renderId attribute or null
101    */

102   String JavaDoc getRenderId();
103
104   /**
105    * sets the error message to display
106    * @param message the message to display or null to remove a previous error message
107    */

108   void setError(String JavaDoc message);
109
110   /**
111    * user may view data but not change the selection
112    */

113   public boolean isReadOnly();
114
115   /**
116    * user may view data but not change the selection
117    */

118   public void setReadOnly(boolean readOnly);
119
120 }
Popular Tags