Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Tricks of the Trade? (and layout manager)
Tricks of the Trade? (and layout manager) [message #12992] Wed, 31 December 2003 06:58 Go to next message
Eclipse UserFriend
Originally posted by: geoffrobinson.yahoo.com

Hello all,

I downloaded the visual editor yesterday and have been playing around with
it. I've read a little bit of documentation and have rumaged through the
help files, but mainly have been finding my way via trial and error.

So before I get to my main question, let me ask this: Do any resources
exist yet for this plugin? Don't get me wrong. Blood, sweat, and tears.
I don't mind trial and error. But I would rather be productive about all
this.

Ok, that aside. Main question:
I changed the default layout manager for my auto-generated JFrame by going
directly into the source code and changing BorderLayout to null. Is there
a more automated way of doing that sort of thing?

thank you for your time and putting up with my ramblings,
Geoff
Re: Tricks of the Trade? (and layout manager) [message #13050 is a reply to message #12992] Wed, 31 December 2003 07:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

I think you should be able to change it by selecting the ContentPane and
in the Properties View changing the LayoutManager.

Hope this helps,

Chemi.

Geoff Robinson wrote:

>Hello all,
>
>I downloaded the visual editor yesterday and have been playing around with
>it. I've read a little bit of documentation and have rumaged through the
>help files, but mainly have been finding my way via trial and error.
>
>So before I get to my main question, let me ask this: Do any resources
>exist yet for this plugin? Don't get me wrong. Blood, sweat, and tears.
>I don't mind trial and error. But I would rather be productive about all
>this.
>
>Ok, that aside. Main question:
>I changed the default layout manager for my auto-generated JFrame by going
>directly into the source code and changing BorderLayout to null. Is there
>a more automated way of doing that sort of thing?
>
>thank you for your time and putting up with my ramblings,
>Geoff
>
Re: Tricks of the Trade? (and layout manager) [message #13078 is a reply to message #12992] Wed, 31 December 2003 09:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi Geoff,

> So before I get to my main question, let me ask this: Do any resources
> exist yet for this plugin?

By resources do you mean articles that describe it's functionality ? There
should be on-line help, and on the web site http://www.eclipse.org/vep there
are some viewlets. Also the Visual Editor in a previous life was included with
IBM's WebSphere Studio product line and there are a number of articles written
about it that, while slighlty dated, still provide a good introduction. One
of these is
http://www-106.ibm.com/developerworks/websphere/techjournal/ 0210_winchester/winchester.html
and if you use the keyword "Visual Editor" in the search bar you can find some
other articles. We should upgrade these however so they are more current and
link to them from the vep homepage.

> Ok, that aside. Main question:
> I changed the default layout manager for my auto-generated JFrame by going
> directly into the source code and changing BorderLayout to null. Is there
> a more automated way of doing that sort of thing?

As Chemi pointed out you can select the Java bean (in the GUI or in the Java
Beans tree view) and then you'll see its properties in the Properties view.
Select layout and you will get a drop down list of available layout managers
from which you can select null. Right now the list is hard coded and not
extensible although we do have a line item to open this up for people who have
their own custom layout managers. JFrame itself is slightly odd because it's
not the layout manager of the JFrame you should change, but instead it has a
priveledged child called the contentPane which is where the child components
go. The JFrame is basically a container for the contentPane and its JMenuBar
(if you need a menu bar), so select the central contentPane and change the
layout of this through the propertiew view.

One thing to note is that when using the properties view to change layout you
get more than just having the setLayout(null) method changed for you. All of
the correct constraints will be re-calculated for the new layout manager for
any existing components, so if the GUI did have border layout with some
components at the "North" or "East" regions for example, switching to null
would keep them at their same absolute position and now generate the correct
setBounds(Rectangle) calls for them. Likewsie when going from null to
GridBagLayout, or FlowLayout to BorderLayout or whatever. When you are in
null layout on the GUI you can also do precise positioning of components by
moving and dragging them where you want and the toolbar button with the hover
label "Alignment" brings up a dialog that lets you do things like line up the
edges and widths. You can also activate a grid from the pop-up menu and snap
the components between grid cells.

> thank you for your time and putting up with my ramblings,

np, please let us know how you get on and give us more feedback. It's
important that we improve the whole "out of the box" experience, so having
your insights in how you find the editor to use first time round is very
valuable.

Best regards,

Joe Winchester
Re: Tricks of the Trade? (and layout manager) [message #13195 is a reply to message #13050] Wed, 31 December 2003 13:36 Go to previous message
Eclipse UserFriend
Originally posted by: geoffrobinson.yahoo.com

Thank you very much. That was just what I needed. (Thanks to Mr.
Winchester as well.) Have a very happy new year.

Geoff

Chemi wrote:

> I think you should be able to change it by selecting the ContentPane and
> in the Properties View changing the LayoutManager.

> Hope this helps,

> Chemi.
Re: Tricks of the Trade? (and layout manager) [message #576339 is a reply to message #12992] Wed, 31 December 2003 07:41 Go to previous message
Eclipse UserFriend
I think you should be able to change it by selecting the ContentPane and
in the Properties View changing the LayoutManager.

Hope this helps,

Chemi.

Geoff Robinson wrote:

>Hello all,
>
>I downloaded the visual editor yesterday and have been playing around with
>it. I've read a little bit of documentation and have rumaged through the
>help files, but mainly have been finding my way via trial and error.
>
>So before I get to my main question, let me ask this: Do any resources
>exist yet for this plugin? Don't get me wrong. Blood, sweat, and tears.
>I don't mind trial and error. But I would rather be productive about all
>this.
>
>Ok, that aside. Main question:
>I changed the default layout manager for my auto-generated JFrame by going
>directly into the source code and changing BorderLayout to null. Is there
>a more automated way of doing that sort of thing?
>
>thank you for your time and putting up with my ramblings,
>Geoff
>
Re: Tricks of the Trade? (and layout manager) [message #576355 is a reply to message #12992] Wed, 31 December 2003 09:22 Go to previous message
Eclipse UserFriend
Hi Geoff,

> So before I get to my main question, let me ask this: Do any resources
> exist yet for this plugin?

By resources do you mean articles that describe it's functionality ? There
should be on-line help, and on the web site http://www.eclipse.org/vep there
are some viewlets. Also the Visual Editor in a previous life was included with
IBM's WebSphere Studio product line and there are a number of articles written
about it that, while slighlty dated, still provide a good introduction. One
of these is
http://www-106.ibm.com/developerworks/websphere/techjournal/ 0210_winchester/winchester.html
and if you use the keyword "Visual Editor" in the search bar you can find some
other articles. We should upgrade these however so they are more current and
link to them from the vep homepage.

> Ok, that aside. Main question:
> I changed the default layout manager for my auto-generated JFrame by going
> directly into the source code and changing BorderLayout to null. Is there
> a more automated way of doing that sort of thing?

As Chemi pointed out you can select the Java bean (in the GUI or in the Java
Beans tree view) and then you'll see its properties in the Properties view.
Select layout and you will get a drop down list of available layout managers
from which you can select null. Right now the list is hard coded and not
extensible although we do have a line item to open this up for people who have
their own custom layout managers. JFrame itself is slightly odd because it's
not the layout manager of the JFrame you should change, but instead it has a
priveledged child called the contentPane which is where the child components
go. The JFrame is basically a container for the contentPane and its JMenuBar
(if you need a menu bar), so select the central contentPane and change the
layout of this through the propertiew view.

One thing to note is that when using the properties view to change layout you
get more than just having the setLayout(null) method changed for you. All of
the correct constraints will be re-calculated for the new layout manager for
any existing components, so if the GUI did have border layout with some
components at the "North" or "East" regions for example, switching to null
would keep them at their same absolute position and now generate the correct
setBounds(Rectangle) calls for them. Likewsie when going from null to
GridBagLayout, or FlowLayout to BorderLayout or whatever. When you are in
null layout on the GUI you can also do precise positioning of components by
moving and dragging them where you want and the toolbar button with the hover
label "Alignment" brings up a dialog that lets you do things like line up the
edges and widths. You can also activate a grid from the pop-up menu and snap
the components between grid cells.

> thank you for your time and putting up with my ramblings,

np, please let us know how you get on and give us more feedback. It's
important that we improve the whole "out of the box" experience, so having
your insights in how you find the editor to use first time round is very
valuable.

Best regards,

Joe Winchester
Re: Tricks of the Trade? (and layout manager) [message #576542 is a reply to message #13050] Wed, 31 December 2003 13:36 Go to previous message
Eclipse UserFriend
Thank you very much. That was just what I needed. (Thanks to Mr.
Winchester as well.) Have a very happy new year.

Geoff

Chemi wrote:

> I think you should be able to change it by selecting the ContentPane and
> in the Properties View changing the LayoutManager.

> Hope this helps,

> Chemi.
Previous Topic:Installing plugins (CSharp feature)
Next Topic:Creating a new Visual Class
Goto Forum:
  


Current Time: Wed Apr 30 19:20:00 EDT 2025

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

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

Back to the top