-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
6
-
Cause Known
-
generic
-
generic
TransferHandler's paste action uses Clipboard.getContents()
to retrieve a Transferable from the clipboard and pass it to
TransferHandler.importData(). Clipboard.getContents() is known
to be quite expensive as it fetches data in all available flavors:
refer to the bug 4790833(Memory usage shoots way up using
Clipboard.getContents()) which was fixed in tiger. On the other
part, data in only one flavor are pasted typically.
The fix for 4790833 introduced new Clipboard methods:
getAvailableDataFlavors(), isDataFlavorAvailable() and
getData() that allows to fetch data for only one flavor.
So I propose to make use of these Clipboard methods in the
implementation of TransferHandler's paste action.
###@###.### 2005-04-15 10:05:54 GMT
to retrieve a Transferable from the clipboard and pass it to
TransferHandler.importData(). Clipboard.getContents() is known
to be quite expensive as it fetches data in all available flavors:
refer to the bug 4790833(Memory usage shoots way up using
Clipboard.getContents()) which was fixed in tiger. On the other
part, data in only one flavor are pasted typically.
The fix for 4790833 introduced new Clipboard methods:
getAvailableDataFlavors(), isDataFlavorAvailable() and
getData() that allows to fetch data for only one flavor.
So I propose to make use of these Clipboard methods in the
implementation of TransferHandler's paste action.
###@###.### 2005-04-15 10:05:54 GMT
- relates to
-
JDK-4790833 Memory usage shoots way up using Clipboard.getContents()
- Resolved
-
JDK-4818143 NetBeans Hungs on sun.awt.datatransfer.ClipboardTransferable.getClipboardData
- Resolved
-
JDK-4287795 Would like Clipboard.isDataFlavorSupported() method
- Resolved