Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Editing Layouts
Editing Layouts [message #145758] Wed, 18 March 2009 21:41 Go to next message
JC is currently offline JC
Messages: 10
Registered: July 2009
Junior Member
Hi,

How do I set the active card in a CardLayout?

How do I set the grid row/column size in a GridBagLayout?

Thanks,
MB
Re: Editing Layouts [message #145797 is a reply to message #145758] Wed, 18 March 2009 22:50 Go to previous messageGo to next message
JC is currently offline JC
Messages: 10
Registered: July 2009
Junior Member
> How do I set the active card in a CardLayout?

> How do I set the grid row/column size in a GridBagLayout?

I was able to set up the GridBagLayout using the constraints property in
the actual objects.

However, I still can't figure out how to set the active card in a
CardLayout.

Thanks,
MB
Re: Editing Layouts [message #145807 is a reply to message #145797] Thu, 19 March 2009 09:47 Go to previous messageGo to next message
Eclipse User
Originally posted by: matthew.leah.pdgm.nospam.com

mnbv wrote:
>> How do I set the active card in a CardLayout?
>
>> How do I set the grid row/column size in a GridBagLayout?
>
> I was able to set up the GridBagLayout using the constraints property in
> the actual objects.
>
> However, I still can't figure out how to set the active card in a
> CardLayout.
>
> Thanks,
> MB
>


I don't think it is possible to explicitly set the active card using VE.
The default card displayed tends to be the panel first in the list.

It is very easy to do programmatically. You can use the CardLayout's
show() method to set a specific panel active.


CardLayout layout = (CardLayout)cardPanel.getLayout();

layout.show(cardPanel, "activePanel");


Alternatively, the next() and previous() methods can be used to navigate
through the sequence of panels in the card layout.


Hope that helps,

Matt.
Re: Editing Layouts [message #145814 is a reply to message #145807] Thu, 19 March 2009 13:57 Go to previous message
Eclipse User
Originally posted by: richkulp.us.NO_SPAM.ibm.com

If you want to switch between the cards while in the VE, just select the
card (or any component under that card) in the Beans viewer. It will
bring that card to the top.


--
Thanks,
Rich Kulp
Re: Editing Layouts [message #617337 is a reply to message #145758] Wed, 18 March 2009 22:50 Go to previous message
JC is currently offline JC
Messages: 10
Registered: July 2009
Junior Member
> How do I set the active card in a CardLayout?

> How do I set the grid row/column size in a GridBagLayout?

I was able to set up the GridBagLayout using the constraints property in
the actual objects.

However, I still can't figure out how to set the active card in a
CardLayout.

Thanks,
MB
Re: Editing Layouts [message #617338 is a reply to message #145797] Thu, 19 March 2009 09:47 Go to previous message
Matthew Leah is currently offline Matthew Leah
Messages: 5
Registered: July 2009
Junior Member
mnbv wrote:
>> How do I set the active card in a CardLayout?
>
>> How do I set the grid row/column size in a GridBagLayout?
>
> I was able to set up the GridBagLayout using the constraints property in
> the actual objects.
>
> However, I still can't figure out how to set the active card in a
> CardLayout.
>
> Thanks,
> MB
>


I don't think it is possible to explicitly set the active card using VE.
The default card displayed tends to be the panel first in the list.

It is very easy to do programmatically. You can use the CardLayout's
show() method to set a specific panel active.


CardLayout layout = (CardLayout)cardPanel.getLayout();

layout.show(cardPanel, "activePanel");


Alternatively, the next() and previous() methods can be used to navigate
through the sequence of panels in the card layout.


Hope that helps,

Matt.
Re: Editing Layouts [message #617339 is a reply to message #145807] Thu, 19 March 2009 13:57 Go to previous message
Eclipse User
Originally posted by: richkulp.us.NO_SPAM.ibm.com

If you want to switch between the cards while in the VE, just select the
card (or any component under that card) in the Beans viewer. It will
bring that card to the top.


--
Thanks,
Rich Kulp
Previous Topic:Broken GUI Editor after adding field to frame.
Next Topic:Broken GUI Editor after adding field to frame.
Goto Forum:
  


Current Time: Thu Oct 30 15:17:37 GMT 2014

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

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