JDK-4460011 : TransferHandler Actions should be registered by UI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2001-05-17
  • Updated: 2001-06-22
  • Resolved: 2001-06-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Description
With the introduction of the DnD support in Swing JComponent.setTransferHandler registers Actions directly in the JComponent's ActionMap.  This is something that we have said we won't do as these ActionMaps are meant for the developer to use.  In order for the UIs to register the Action the Actions need to be public.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
2004-06-14

EVALUATION We can accomodate this by adding the following to TransferHandler: /** * Returns an <code>Action</code> that behaves like a 'cut' operation. * That is, this will invoke <code>exportToClipboard</code> with * a <code>MOVE</code> argument on the <code>TransferHandler</code> * associated with the <code>JComponent</code> that is the source of * the <code>ActionEvent</code>. * * @return cut Action */ public static Action getCutAction(); /** * Returns an <code>Action</code> that behaves like a 'copy' operation. * That is, this will invoke <code>exportToClipboard</code> with * a <code>COPY</code> argument on the <code>TransferHandler</code> * associated with the <code>JComponent</code> that is the source of * the <code>ActionEvent</code>. * * @return cut Action */ public static Action getCopyAction(); /** * Returns an <code>Action</code> that behaves like a 'paste' operation. * That is, this will invoke <code>importData</code> on the * <code>TransferHandler</code> * associated with the <code>JComponent</code> that is the source of * the <code>ActionEvent</code>. * * @return cut Action */ public static Action getPasteAction(); scott.violet@eng 2001-05-17
2001-05-17