[Schmitzm-commits] r73 - trunk/src/schmitzm/geotools/gui
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Apr 21 19:26:39 CEST 2009
Author: alfonx
Date: 2009-04-21 19:26:39 +0200 (Tue, 21 Apr 2009)
New Revision: 73
Modified:
trunk/src/schmitzm/geotools/gui/FeatureTablePane.java
Log:
* Added a public function getTable() to access the Table.
Modified: trunk/src/schmitzm/geotools/gui/FeatureTablePane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/FeatureTablePane.java 2009-04-21 17:14:13 UTC (rev 72)
+++ trunk/src/schmitzm/geotools/gui/FeatureTablePane.java 2009-04-21 17:26:39 UTC (rev 73)
@@ -17,6 +17,7 @@
import java.util.Vector;
import javax.swing.BorderFactory;
+import javax.swing.JCheckBox;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTable;
@@ -65,7 +66,13 @@
public class FeatureTablePane extends JPanel {
/** Tabelle in der die Features angezeigt werden. */
protected SortableJTable featuresTable = null;
- /** Tabellen-Modell der Feature-Tabelle. */
+
+ /** Erlaubt den externen Zugriff auf die Tabelle */
+ public SortableJTable getTable() {
+ return featuresTable;
+ }
+
+/** Tabellen-Modell der Feature-Tabelle. */
protected FeatureCollectionTableModel featuresTableModel = null;
/** Preview-Bereich fuer die in der Tabelle selektierten Features. */
protected JMapPane mapPane = null;
@@ -194,6 +201,10 @@
featuresTable.setModel( new SelectionTableModel(featuresTableModel, featuresTable) );
featuresTable.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
featuresTable.setColumnSelectionAllowed(false);
+
+ // Added by SK: If i see it right, then because SortableJTable is used, the first col is always a checkbox. TODO: How wide is a CheckBox in differnet L'n'F s?
+ featuresTable.getColumnModel().getColumn((int)0).setMaxWidth(17);
+
featuresTable.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
// Wenn Auswahl in Tabelle sich aendert, Vorschau anpassen
featuresTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
More information about the Schmitzm-commits
mailing list