swing/src/net/sf/xframe/swing JXTable.java,1.11,1.12

I?aqui Medina <[email protected]> Thu, 07 Apr 2005 17:30:06 +0000
Newsgroups gmane.text.xml.xframe.xsddoc.devel
Message-ID <[email protected]>
Update of /cvsroot/xframe/swing/src/net/sf/xframe/swing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31168/src/net/sf/xframe/swing

Modified Files:
	JXTable.java 
Log Message:
Fix for bug 1177993: DnD problem

Index: JXTable.java
===================================================================
RCS file: /cvsroot/xframe/swing/src/net/sf/xframe/swing/JXTable.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** JXTable.java	6 Apr 2005 20:21:38 -0000	1.11
--- JXTable.java	7 Apr 2005 17:30:04 -0000	1.12
***************
*** 47,50 ****
--- 47,51 ----
  import javax.swing.ScrollPaneConstants;
  import javax.swing.Scrollable;
+ import javax.swing.TransferHandler;
  import javax.swing.border.Border;
  import javax.swing.event.CellEditorListener;
***************
*** 2707,2709 ****
--- 2708,2734 ----
          return adjuster;
      }
+     
+     /**
+      * Sets the <code>transferHandler</code> property,
+      * which is <code>null</code> if the component does
+      * not support data transfer operations.
+      * <p>
+      * If <code>newHandler</code> is not null, and the system property
+      * <code>suppressSwingDropSupport</code> is not true, this will 
+      * install a <code>DropTarget</code> on the <code>JComponent</code>.
+      * The default for the system property is false, so that a
+      * <code>DropTarget</code> will be added.
+      * 
+      * @param newHandler  mechanism for transfer of data to
+      *    and from the component
+      *
+      * @see TransferHandler
+      * @see javax.swing.JComponent#setTransferHandler(javax.swing.TransferHandler)
+      */
+     public void setTransferHandler(TransferHandler newHandler)
+     {
+         //The KTables are the ones that need the handler
+         getLockedTable().setTransferHandler(newHandler);
+         getScrollTable().setTransferHandler(newHandler);
+     }
  }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click