Thanks the workaround works fine 

Torsten Hofmann
Dipl. - Informatiker (FH)
IT Consultant Business Integration
 
Würth Phoenix GmbH
Drillberg 6
D-97980 Bad Mergentheim

(Phone: +49 7931 91 6284
7 Fax: +49 7931 91 7284
+E-Mail: [EMAIL PROTECTED]
     Website: www.wuerth-phoenix.de


-----Ursprüngliche Nachricht-----
Von: Janak Mulani [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 28. Juli 2006 16:48
An: Hofmann, Torsten
Cc: [EMAIL PROTECTED] Com
Betreff: RE: [ULC-developer] Error on ULCTree with drag and drop

Hi Torsten,

This is a bug with DnD in ULCInternalFrame:
https://www.canoo.com/jira/browse/UBA-6967

As workaround, you need to extend ULCInternalFrame as follows:

Server-side class: (remember to change the typeString appropriately when client 
and server are not running in DevelopmentRunner)

   public static class ULCMyInternalFrame extends ULCInternalFrame {

        protected String typeString() {
            return UIMyInternalFrame.class.getName();
        }

    }

Client-side class:

    public static class UIMyInternalFrame extends UIInternalFrame {

        protected Object createBasicObject(Anything args) {
            return new SpecialInternalFrame();
        }

        public static class SpecialInternalFrame extends 
UIInternalFrame.MyInternalFrame {

            protected JRootPane createRootPane() {
                return new MyRootPane();
            }

            public static class MyRootPane extends JRootPane {
                protected Container createContentPane() {
                    JPanel result = new JPanel();
                    result.setName(this.getName() + ".contentPane");
                    result.setLayout(new BorderLayout() {
                        /*
                         * This BorderLayout subclass maps a null constraints 
to CENTER. Although the reference
                         * BorderLayout also does this, some VMs throw an 
IllegalArgumentException.
                         */
                        public void addLayoutComponent(Component comp, Object 
constraints) {
                            if (constraints == null) {
                                constraints = BorderLayout.CENTER;
                            }
                            super.addLayoutComponent(comp, constraints);
                        }
                    });
                    return result;
                }

                public void setGlassPane(Component glass) {
                    if (glass.getClass().getName().endsWith("DnDGlassPane"))
{
                        return;
                    }
                    super.setGlassPane(glass);
                }
            }
        }
    }

Please try this out and let me know if it worked for you.

Thanks and regards,

Janak

>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Hofmann, 
>Torsten
>Sent: Thursday, July 27, 2006 9:43 AM
>To: [EMAIL PROTECTED] Com
>Subject: AW: [ULC-developer] Error on ULCTree with drag and drop
>
>
>Hello
>
>I only wants to know if there is now an workaround for this problem, 
>because we need this feature urgent.
>
>Regards
>
>
>Torsten Hofmann
>Dipl. - Informatiker (FH)
>IT Consultant Business Integration
>
>Würth Phoenix GmbH
>Drillberg 6
>D-97980 Bad Mergentheim
>
>(Phone: +49 7931 91 6284
>7 Fax: +49 7931 91 7284
>+E-Mail: [EMAIL PROTECTED]
>     Website: www.wuerth-phoenix.de
>
>
>-----Ursprüngliche Nachricht-----
>Von: Janak Mulani [mailto:[EMAIL PROTECTED]
>Gesendet: Montag, 24. Juli 2006 11:52
>An: Hofmann, Torsten
>Cc: [email protected]
>Betreff: RE: [ULC-developer] Error on ULCTree with drag and drop
>
>Hi Torsten,
>
>This appears to be a bug. The drop action is not recognized on the 
>target for some reason.
>
>It is not always reproducible and behaves differently for different JREs.
>
>We are investigating this and will try to find a work around if one is 
>possible. We will keep you updated.
>
>We will create a bug report for this once we have finished investigating.
>
>Thanks for pointing out this problem.
>
>Thanks and regards,
>
>Janak
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Hofmann, 
>Torsten
>Sent: Thursday, July 20, 2006 2:48 PM
>To: [email protected]
>Subject: [ULC-developer] Error on ULCTree with drag and drop
>
>
>Hello
>
>I have created an ULCApplication with a DesktopPane and one InternalFrame.
>On this InternalFrame is an ULCTree component with enabled Drag and 
>Drop I have implemented an Transferhandler for this tree, but the 
>method "importData" is never called. When i use this ULCTree without an 
>DesktopPane it works.
>
>Is this an error or have i done something wrong?
>
>Torsten Hofmann
>Dipl. - Informatiker (FH)
>IT Consultant Business Integration
>
>Würth Phoenix GmbH
>Drillberg 6
>D-97980 Bad Mergentheim
>
>(Phone: +49 7931 91 6284
>7 Fax: +49 7931 91 7284
>+E-Mail: [EMAIL PROTECTED]
>     Website: www.wuerth-phoenix.de
>
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to