United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4460011 : TransferHandler Actions should be registered by UI

Details
Type:
Bug
Submit Date:
2001-05-17
Status:
Resolved
Updated Date:
2001-06-22
Project Name:
JDK
Resolved Date:
2001-06-22
Component:
client-libs
OS:
solaris_7
Sub-Component:
javax.swing
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (beta2)

Related Reports

Sub Tasks

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



Hardware and Software, Engineered to Work Together