root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / fmap / data / feature / swing / FeatureCollectionTable.java @ 23697
History | View | Annotate | Download (3.12 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Gobernment (CIT)
|
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 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 {DiSiD Technologies} {{Task}}
|
26 |
*/
|
27 |
package org.gvsig.fmap.data.feature.swing; |
28 |
|
29 |
import java.util.Vector; |
30 |
|
31 |
import javax.swing.JTable; |
32 |
import javax.swing.ListSelectionModel; |
33 |
import javax.swing.table.TableColumnModel; |
34 |
import javax.swing.table.TableModel; |
35 |
|
36 |
import org.gvsig.fmap.data.feature.Feature; |
37 |
import org.gvsig.fmap.data.feature.swing.table.FeatureCellRenderer; |
38 |
import org.gvsig.fmap.data.feature.swing.table.GeometryCellRenderer; |
39 |
import org.gvsig.fmap.geom.Geometry; |
40 |
|
41 |
/**
|
42 |
* Table to show FeatureCollection data.
|
43 |
*
|
44 |
* @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
|
45 |
*/
|
46 |
public class FeatureCollectionTable extends JTable { |
47 |
|
48 |
/**
|
49 |
* Generated Serial UID
|
50 |
*/
|
51 |
private static final long serialVersionUID = -6139395189283163964L; |
52 |
|
53 |
/**
|
54 |
* @see JTable#JTable()
|
55 |
*/
|
56 |
public FeatureCollectionTable() {
|
57 |
super();
|
58 |
} |
59 |
|
60 |
/**
|
61 |
* @see JTable#JTable(int, int)
|
62 |
*/
|
63 |
public FeatureCollectionTable(int numRows, int numColumns) { |
64 |
super(numRows, numColumns);
|
65 |
} |
66 |
|
67 |
/**
|
68 |
* @see JTable#JTable(Object[][], Object[])
|
69 |
*/
|
70 |
public FeatureCollectionTable(Object[][] rowData, Object[] columnNames) { |
71 |
super(rowData, columnNames);
|
72 |
} |
73 |
|
74 |
/**
|
75 |
* @see JTable#JTable(TableModel, TableColumnModel, ListSelectionModel)
|
76 |
*/
|
77 |
public FeatureCollectionTable(TableModel dm, TableColumnModel cm, |
78 |
ListSelectionModel sm) {
|
79 |
super(dm, cm, sm);
|
80 |
} |
81 |
|
82 |
/**
|
83 |
* @see JTable#JTable(TableModel, TableColumnModel)
|
84 |
*/
|
85 |
public FeatureCollectionTable(TableModel dm, TableColumnModel cm) { |
86 |
super(dm, cm);
|
87 |
} |
88 |
|
89 |
/**
|
90 |
* @see JTable#JTable(TableModel)
|
91 |
*/
|
92 |
public FeatureCollectionTable(TableModel dm) { |
93 |
super(dm);
|
94 |
} |
95 |
|
96 |
/**
|
97 |
* @see JTable#JTable(Vector, Vector)
|
98 |
*/
|
99 |
@SuppressWarnings("unchecked") |
100 |
public FeatureCollectionTable(Vector rowData, Vector columnNames) { |
101 |
super(rowData, columnNames);
|
102 |
} |
103 |
|
104 |
protected void initializeLocalVars() { |
105 |
super.initializeLocalVars();
|
106 |
setDefaultRenderer(Geometry.class, new GeometryCellRenderer());
|
107 |
setDefaultRenderer(Feature.class, new FeatureCellRenderer());
|
108 |
// setDefaultRenderer(Date.class, new DateCellRenderer());
|
109 |
} |
110 |
} |