[kaffe] CVS kaffe (mkoch): libraries/javalib/javax/swing/JTable.java

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 17 00:52:20 PST 2004


PatchSet 5653 
Date: 2004/12/17 08:48:13
Author: mkoch
Branch: HEAD
Tag: (none) 
Log:
2004-12-17  Michael Koch  <konqueror at gmx.de>

	* libraries/javalib/javax/swing/JTable.java
	(addColumn): New method.
	(getColumnClass): Likewise.
	(getColumnName): Likewise.

Members: 
	ChangeLog:1.3198->1.3199 
	libraries/javalib/javax/swing/JTable.java:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3198 kaffe/ChangeLog:1.3199
--- kaffe/ChangeLog:1.3198	Fri Dec 17 07:56:48 2004
+++ kaffe/ChangeLog	Fri Dec 17 08:48:13 2004
@@ -1,3 +1,10 @@
+2004-12-17  Michael Koch  <konqueror at gmx.de>
+
+	* libraries/javalib/javax/swing/JTable.java
+	(addColumn): New method.
+	(getColumnClass): Likewise.
+	(getColumnName): Likewise.
+
 2004-12-17  Paul Jenner  <psj.home at ntlworld.com>
 
 	* libraries/javalib/javax/swing/TransferHandler.java
Index: kaffe/libraries/javalib/javax/swing/JTable.java
diff -u kaffe/libraries/javalib/javax/swing/JTable.java:1.10 kaffe/libraries/javalib/javax/swing/JTable.java:1.11
--- kaffe/libraries/javalib/javax/swing/JTable.java:1.10	Thu Dec 16 19:13:18 2004
+++ kaffe/libraries/javalib/javax/swing/JTable.java	Fri Dec 17 08:48:15 2004
@@ -426,6 +426,17 @@
     this(new DefaultTableModel(data, columnNames));
   }
 
+  public void addColumn(TableColumn column)
+  {
+    if (column.getHeaderValue() == null)
+      {
+	String name = getColumnName(column.getModelIndex());
+	column.setHeaderValue(name);
+      }
+    
+    columnModel.addColumn(column);
+  }
+  
   /**
    * @deprecated 1.0.2, replaced by <code>new JScrollPane(JTable)</code>
    */
@@ -1593,4 +1604,13 @@
     repaint();
   }
 
+  public Class getColumnClass(int column)
+  {
+    return dataModel.getColumnClass(column);
+  }
+  
+  public String getColumnName(int column)
+  {
+    return dataModel.getColumnName(column);
+  }
 }




More information about the kaffe mailing list