|
Quick Lists
|
|
Bug ID:
|
4519484
|
|
Votes
|
1
|
|
Synopsis
|
Add TransferHandler support to top-level containers
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
merlin-beta2
|
|
Release Fixed
|
mustang(b53)
|
|
State
|
10-Fix Delivered,
request for enhancement
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
|
|
Submit Date
|
25-OCT-2001
|
|
Description
|
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
I like the new Swing Data Transfer mechanism mechanism in the JDK 1.4 beta.
Unfortunately, I can't use it for my application, because I need to be able to
accept objects which are dropped anywhere at all - including objects dropped on
my frame's title bar.
Using the AWT drag and drop mechanism, I can implement what I need by creating
a DropTarget customer and then calling setDropTarget() on my JFrame; this works
because JFrame ultimately inherits from java.awt.Component, which defines
setDropTarget(). I would love to use the new Swing Data Transfer mechanism
instead so that I wouldn't have to implement my own DropTarget customer . But I
can't, because JFrame doesn't inherit from JComponent and so I can't call
setTransferHandler() on a JFrame. I could call setTransferHandler() on the
root pane, which is a JComponent - but that wouldn't accept objects dropped
onto the frame's title bar.
FYI, I'm using Windows 2000, although I suspect that this issue is platform-
independent.
(Review ID: 134445)
======================================================================
Posted Date : 2005-09-06 16:02:58.0
|
|
Work Around
|
use AWT drag-and-drop rather than the new Swing Data Transfer mechanism
======================================================================
|
|
Evaluation
|
This is an interesting idea that deserves to be investigated further.
xxxxx@xxxxx 2001-11-14
Targeting this to Mustang. The fix will be to add set/getTransferHandler() methods to JFrame, JDialog, JWindow and JApplet. Unfortunately, TransferHandler's import/export methods are currently all typed to JComponent. As such, export ability will not be implemented at this time. However, 1.6 adds new canImport(TransferInfo) and importData(TransferInfo) methods, and the TransferInfos can be changed from supporting JComponent to supporting Component. As such, it will be easy to make data import work with these top-level components through those methods.
Posted Date : 2005-09-06 16:02:58.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |