Skip to main content



      Home
Home » Archived » Visual Editor (VE) » How to move components to a sub-panel?
How to move components to a sub-panel? [message #610046] Wed, 27 July 2005 16:09
Eclipse UserFriend
Perhaps I'm missing something, but it seems very frustrating trying to
create the layout I want with VE.

I'm designing a dialog. (VE doesn't appear to support dialogs, so I'm using
VE to design a Composite which I then plan to display in a Dialog subclass.
For that matter, even doing this seems more difficult than it should be.
Are there any easy dialog classes to host my content in an ok/cancel
fashion? In Swing, JOptionPane had the option of displaying an arbitrary
component instead of a simple message or text field. And, with Swing/AWT
dialogs in general, it's fairly easy to create a generic dialog and just add
some content to it. For SWT / JFace it seems I'm forced to subclass
Dialog?)

Since VE doesn't support FormLayout, and the other choices -- fill, flow and
grid -- are somewhat limited, achieving the layout I want requires nesting
Composites. However, I keep running into the case where, as I'm
experimenting arranging things, I then decide I need to take some existing
components and nest them and then put the new composite in their place.
Some problems trying to do this are:

1) I can't seem to just drag-n-drop the components / controls in order to
move them into a newly created composite / group or other container
2) Cutting and pasting seems to trash field names and otherwise disrupt any
even handlers I may have created. For example, I have a scale and a label
associated with it which textually displays the value which the scale
represents.
3) Why, why, why is the event for a value change called widget selection?
4) I tried avoiding some of problem 2 by cutting-and-pasting multiple
controls at once. Unfortunately this isn't possible -- can only cut / copy
one thing at a time.


Some other hindrances which I've encountered:
Imagine some nested composites and one of them has a grid layout like:

| A | B | C
_________
| D | B | E

where component B has vertical span of 2 and D is a composite. (Actually,
the problem would probably still occur with a simple 2x2 grid with none of
the cells being occupied by a composite.)

Try swapping D and A, or otherwise dragging to re-arrange things. I've run
into all sorts of slow-downs including explosions of label placeholders,
etc. I've concluded that in many cases the only reasonable way to get
things done is to do cut-and-paste within the source code. Unfortunately,
this tends to lead to orphaned or missing GridData instances and generally
seems to cause VE some confusion or trouble (at least some times).

Am I just ignorant of the proper UI interactions to do some of this stuff?

Would it be possible to add arrangement operations like swapping components
which are siblings? How about being able to marquee-select some stuff and
having group/ungroup commands which would wrap them in a composite?

It would also be cool if I could select a composite in the bean tree (or in
the visual) have a popup menu command that would allow me to change the
Composite to a Group or some other container class.

Joel
Previous Topic:VE 1.1 from update manager available.
Next Topic:How to move components to a sub-panel?
Goto Forum:
  


Current Time: Tue Jun 24 10:18:37 EDT 2025

Powered by FUDForum. Page generated in 0.08743 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top