[Schmitzm-commits] r99 - trunk/src/schmitzm/swing/table

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 8 14:21:42 CEST 2009


Author: mojays
Date: 2009-05-08 14:21:42 +0200 (Fri, 08 May 2009)
New Revision: 99

Added:
   trunk/src/schmitzm/swing/table/PipedTableModel.java
Modified:
   trunk/src/schmitzm/swing/table/SelectionTableModel.java
Log:
new interface PipedTableModel

Added: trunk/src/schmitzm/swing/table/PipedTableModel.java
===================================================================
--- trunk/src/schmitzm/swing/table/PipedTableModel.java	2009-05-08 12:17:59 UTC (rev 98)
+++ trunk/src/schmitzm/swing/table/PipedTableModel.java	2009-05-08 12:21:42 UTC (rev 99)
@@ -0,0 +1,25 @@
+/** SCHMITZM - This file is part of the java library of Martin O.J. Schmitz (SCHMITZM)
+
+    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
+    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
+
+    Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen der GNU Lesser General Public License, wie von der Free Software Foundation veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
+    Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr Details finden Sie in der GNU Lesser General Public License.
+    Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
+ **/
+package schmitzm.swing.table;
+
+import javax.swing.table.TableModel;
+
+/**
+ * Interface for all table models which encapsulate another {@link TableModel}.
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
+ */
+public interface PipedTableModel {
+  /**
+   * Returns the original {@link TableModel}.
+   */
+  public TableModel getPipedModel();
+
+}

Modified: trunk/src/schmitzm/swing/table/SelectionTableModel.java
===================================================================
--- trunk/src/schmitzm/swing/table/SelectionTableModel.java	2009-05-08 12:17:59 UTC (rev 98)
+++ trunk/src/schmitzm/swing/table/SelectionTableModel.java	2009-05-08 12:21:42 UTC (rev 99)
@@ -34,7 +34,7 @@
  * selection when no Ctrl/Shift key is hold), when clicking the selection column. 
  * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
  */
-public class SelectionTableModel extends AbstractTableModel {
+public class SelectionTableModel extends AbstractTableModel implements PipedTableModel {
 
   /** Holds the table which controls the selection. */
   protected SelectableJTable table = null;
@@ -82,7 +82,8 @@
   /**
    * Returns the original {@link TableModel}.
    */
-  public TableModel getSourceModel() {
+  @Override
+  public TableModel getPipedModel() {
     return model;
   }
   



More information about the Schmitzm-commits mailing list