Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.swing / org.gvsig.raster.swing.api / src / main / java / org / gvsig / raster / swing / pagedtable / PagedTable.java @ 1701

History | View | Annotate | Download (3.23 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2012 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.raster.swing.pagedtable;
25

    
26
import javax.swing.JComponent;
27

    
28
import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
29

    
30
/**
31
 * API for a <code>PagedTable</code>
32
 * @author Nacho Brodin (nachobrodin@gmail.com)
33
 *
34
 */
35
public interface PagedTable {
36
        /**
37
         * Gets the value at the selected position
38
         * @param row
39
         * @param col
40
         * @return
41
         */
42
        public Object getValueAt(int row, int col);
43
        
44
        /**
45
         * Sets a value in a cell
46
         * @param obj
47
         * @param row
48
         * @param column
49
         */
50
        public void setValueAt(Object obj, int row, int column);
51
        /**
52
         * Gets the number of columns
53
         * @return
54
         */
55
        public int getColumnCount();
56
        /**
57
         * Gets the number of rows
58
         * @return
59
         */
60
        public int getRowCount();
61
        /**
62
         * Adds a row to the table.
63
         * @param list List of strings
64
         */
65
        public void addRow(Object[] list);
66
        
67
        /**
68
         * Deletes a row from the table.
69
         * @param Global position of the entry
70
         */
71
        public void delRow(int i);
72
        
73
        /**
74
         * Removes all rows of this table.
75
         */
76
        public void removeAllRows();
77
        
78
        /**
79
         * Gets the selected rows
80
         * @return
81
         * @throws NotInitializeException
82
         */
83
        public int[] getSelectedRows();
84
        
85
        /**
86
         * Swap two rows
87
         * @param i Row to delete
88
         */
89
        public void swapRow(int i, int j);
90
        
91
        /**
92
         * Sets the rows selected
93
         * @param rows
94
         */
95
        public void setSelectedRows(int[] rows);
96
        
97
        /**
98
         * Sets the row selected
99
         * @param rows
100
         */
101
        public void setSelectedRow(int row);
102
        
103
        /**
104
         * Increase the selected row
105
         */
106
        public void increaseSelectedRows();
107
        
108
        /**
109
         * Decrease the selected row
110
         */
111
        public void decreaseSelectedRows();
112
        
113
        /**
114
         * Adds a new row selected without deselecting the old ones
115
         * @param row
116
         */
117
        public void addSelectedRow(int row);
118
        
119
        /**
120
         * Shows or hides the controls to move rows
121
         * @param show
122
         */
123
        public void showMoveRowsControls(boolean show);
124
        
125
        /**
126
         * Shows or hides the table controller
127
         * @param show
128
         */
129
        public void showControllerTable(boolean show);
130
        
131
        /**
132
         * Selects the next page
133
         */
134
        public void nextPage();
135
        
136
        /**
137
         * Selects the previous page
138
         */
139
        public void prevPage();
140
        
141
        /**
142
         * Sets the page selected
143
         * @param pageNumber
144
         */
145
        public void setSelectedPage(int pageNumber);
146
        
147
        /**
148
         * Gets the table data model
149
         * @return
150
         */
151
        public TableModel getTableModel();
152
        
153
        /**
154
         * Gets the component
155
         * @return
156
         */
157
        public JComponent getComponent();
158
}