Reordering components

Just had a serious play with the GUI designer. I really like the way it
doesn't even both trying to handle event code and just binds onto private
members. This is what GUI builders should have been doing all along!

However - there appears to be something really important missing -
reordering components! If I have a row of buttons, and they are horizontally
aligned (and then probably "gridded up" within other JPanels) I can't see
any way to reorder the buttons easily - they won't drag!

You can drag the button out of the layout (leaving an empty column), move
the buttons internally (using the empty column as a "buffer"), and then
finally drag the button back in to the empty column - but this quickly turns
into a game of hanoi! It would be ever so much simpler if dragging a
component around within a grid swapped it "live" with the component being
dragged over. This would make reordering components ever so much easier!
Maybe I've missed something obvious?

Cheers,

TicH

-


Name - Richard Kent (TicH)
EMail - tichkent@blueyonder.co.uk
WWW - http://www.cee.hw.ac.uk/~richardk
-




5 comments

On Thu, 26 Feb 2004 17:22:30 +0000, Richard Kent wrote:

You can drag the button out of the layout (leaving an empty column), move
the buttons internally (using the empty column as a "buffer"), and then
finally drag the button back in to the empty column - but this quickly
turns into a game of hanoi! It would be ever so much simpler if dragging a
component around within a grid swapped it "live" with the component being
dragged over. This would make reordering components ever so much easier!
Maybe I've missed something obvious?


I'm finding the same fustrations and Hanoi like gameplay with JTabbedPanes
and reordering the panes - as much as I drag the tab to a new location, it
just ends up dragging the WHOLE JTabbedPane :(

0

You can use aligning about you said. If i understand you right.

Just put on empty area buttons, then select them all and choose layouting
type. UIDesigner must automatical create JPanle and put components to it.

It described here:
http://www.intellij.org/twiki/bin/view/Main/IntelliJUIDesignerGuide#Working_with_layout

Thanks!

"Richard Kent" <tichkent@blueyonder.co.uk> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:c1l9vs$cb0$1@is.intellij.net...

Just had a serious play with the GUI designer. I really like the way it
doesn't even both trying to handle event code and just binds onto private
members. This is what GUI builders should have been doing all along!

>

However - there appears to be something really important missing -
reordering components! If I have a row of buttons, and they are

horizontally

aligned (and then probably "gridded up" within other JPanels) I can't see
any way to reorder the buttons easily - they won't drag!

>

You can drag the button out of the layout (leaving an empty column), move
the buttons internally (using the empty column as a "buffer"), and then
finally drag the button back in to the empty column - but this quickly

turns

into a game of hanoi! It would be ever so much simpler if dragging a
component around within a grid swapped it "live" with the component being
dragged over. This would make reordering components ever so much easier!
Maybe I've missed something obvious?

>

Cheers,

>

TicH

>

-----------------------------------------------------------------------
Name - Richard Kent (TicH)
EMail - tichkent@blueyonder.co.uk
WWW - http://www.cee.hw.ac.uk/~richardk
-----------------------------------------------------------------------

>
>


0

You can use aligning about you said. If i understand you right.

>

Just put on empty area buttons, then select them all and choose layouting
type. UIDesigner must automatical create JPanle and put components to it.


The problem is once you actually have the components within a JPanel (ie you
have already chosen the layout type and a JPanel has been created for you)
how do you then reorder the components within the JPanel (I don't always
order them correctly first time :)). At the moment it isn't that easy :( You
really should just be able to drag them around. This should be easy to
implement in horizontal/vertical alignments but maybe slightly harder in
grid alignments?

Cheers,

TicH


0

Richard Kent wrote:
>>You can use aligning about you said. If i understand you right.
>>
>>Just put on empty area buttons, then select them all and choose layouting
>>type. UIDesigner must automatical create JPanle and put components to it.


The problem is once you actually have the components within a JPanel (ie you
have already chosen the layout type and a JPanel has been created for you)
how do you then reorder the components within the JPanel (I don't always
order them correctly first time :)). At the moment it isn't that easy :( You
really should just be able to drag them around. This should be easy to
implement in horizontal/vertical alignments but maybe slightly harder in
grid alignments?

Cheers,

TicH


Just try to break the layout, reorder button in XY and gather them
together again.

--
Vladimir Kondratyev
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Just try to break the layout, reorder button in XY and gather them
together again.


Yep - absolutely right! This does work - but if you have a whole bunch of
panel layers (eg panel -> panel -> panel -> buttons) you have to break them
all one by one (from top to bottom in the hierarchy), then move the buttons
round, then re-do all the panels again (trying to remember how they were all
structured when you broke them - and resetting any bindings/settings you had
for each panel). In fact this was exactly the way I did my reordering but it
was a real pain undoing all my layouts then rebuilding them all up again
just to reorder my OK/Cancel buttons!

You really need a way to reorder without having to "break layout". There is
functionality to drag components within a panel to any empty cells, but not
functionality to drag them to simply swap components. I think this is pretty
important as this is one of the key advantages to a graphical GUI builder
(rather than hand coding).

Cheers,

TicH



0

Please sign in to leave a comment.