This is working as designed, however
it is not working as desired. :-( The problem is that JLabel is what we
called GLOBAL_LOCAL. Which means it doesn't have an getLabel() method of
its own. This means that it is created and initialized in the same method
as its parent. That means if we want it to go on a different parent we
need to move all of the code from one method to another method. We don't
yet do that because there are complications. Complications such as we could
move what we know about, the creation and the property settings, to another
method, but there could very easily be code we can't move and that would
cause compile errors. We shouldn't create compile errors, but in this case
it is possible that it might be unavoidable. We haven't figured out how
to handle this yet.
Labels were created this way because
typically labels do not need to be referenced by any other component. They
are just there in the parent. They have no events. So the most natural
coding of labels is to have them local in the method.
We have a high piority goal to try to
handle moving such local components to another method for VE 1.2.
Thanks,
Rich
Ali Ikinci <aikinci@xxxxxxxxxxxxxxxxxxxxx> Sent by: ve-dev-bounces@xxxxxxxxxxx
08/17/2005 07:40 AM
Please respond to
Discussions people developing code for the Visual Editor project
To
ve-dev@xxxxxxxxxxx
cc
Subject
[ve-dev] Potentially Bug
in VE (jfc) detected
Hi there,
I guess I found a Bug in VE (jfc) but I don't know really so if we agree
on this case we can report it. It's about adding an existing JLabel to
an existing JPanel with dragging it on it, in the Visual Editor View or
in the Java Beans View. To replicate this behaviour you can do the
following:
1. Install Eclipse SDK 3.1,EMF 2.1, GEF 3.1 and VE 1.1 (the actual
official versions)
2. Create a new Visual Class with a JFrame
3. Change the Layout of the JFrame to null Layout in Properties View
4. Add a JPanel from the Swing Container Palette to the JFrame but leave
somewhat place in the JFrame
5. Add a JLabel from the Swing Components Palette to the JFrame, and not
on the JPanel
6. Drag the JLabel from the JFrame to the JPanel (in the Visual Editor
view or in the Java Beans view) and it doesn't function, nothing happens.
But with all other elements from the Swing Components Palette this
functions like expected. So my question to the developers is, is this
behavior normal because of the JLabel has something special to all other
components. And are others experiencing the same behavior.
I have to mention that I'm using Eclipse on Linux with gtk+ and jdk1.5
from sun.
With kind regards
Ali Ikinci
_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev