Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Look & Feel
Look & Feel [message #103233] Wed, 24 August 2005 09:52 Go to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Hi,

it would be great to be able to change the look and feel of the VE
preview. Maybe the @jve tag could be extended to save the used look &
feel. Is this a planned feature?

There is even an issue by only using the default look & feel. If you
create a TitledBorder, save it and then reedit the properties the fields
"Title Font" and "Title Color" are filled by UIManager's defaults. These
defaults are different for each look and feel. For my current app I do the
following:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
For a JPanel I created a TitledBorder. The title appears with a thin blue
font. After reediting the title's caption, VE added font and color
specifications to the statement which creates the TitledBorder. So the
title is now bold gray instead of thin blue as before.

I write here as I think the bug reports are not really looked at often
enough. Btw could you please take a look at bug report #93503 which is a
bit annoying and maybe easy to fix.

Thanks,
Michael
Re: Look & Feel [message #103304 is a reply to message #103233] Wed, 24 August 2005 14:06 Go to previous messageGo to next message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Michael,
The Look&Feel can be changed in the VE preferences (Window >
Preferences > Java > Visual Editor > Swing Look and Feel.

Regarding the titledborder, I was able to set a text, font and color
from the property editor, saved it, and when i re-edited the text it
replaced correctly - please open a defect detailing the case so that we
can fix it soon if valid.

For defect #93503, please add yourself to CC to track its progress. We
will try to fix the defect soon.
Regards,
Sri.


michael wrote:
> Hi,
>
> it would be great to be able to change the look and feel of the VE
> preview. Maybe the @jve tag could be extended to save the used look &
> feel. Is this a planned feature?
>
> There is even an issue by only using the default look & feel. If you
> create a TitledBorder, save it and then reedit the properties the fields
> "Title Font" and "Title Color" are filled by UIManager's defaults. These
> defaults are different for each look and feel. For my current app I do the
> following:
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> For a JPanel I created a TitledBorder. The title appears with a thin blue
> font. After reediting the title's caption, VE added font and color
> specifications to the statement which creates the TitledBorder. So the
> title is now bold gray instead of thin blue as before.
>
> I write here as I think the bug reports are not really looked at often
> enough. Btw could you please take a look at bug report #93503 which is a
> bit annoying and maybe easy to fix.
>
> Thanks,
> Michael
Re: Look & Feel [message #103419 is a reply to message #103233] Wed, 24 August 2005 21:47 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi michael,

> it would be great to be able to change the look and feel of the VE
> preview. Maybe the @jve tag could be extended to save the used look &
> feel. Is this a planned feature?

As Sri said you can use the preferences page. The list shown in here
can actually be extended if you have your own look and feel that isn't
included. The syntax is

<extension point="org.eclipse.ve.java.core.lookandfeel"
name="MyCoolLookAndFeel" class="com.mystuff.MyLookAndFeel"/>

This should be picked up by the preferences page and displayed as one of
the allowable look and feel classes


> There is even an issue by only using the default look & feel. If you
> create a TitledBorder, save it and then reedit the properties the fields
> "Title Font" and "Title Color" are filled by UIManager's defaults. These
> defaults are different for each look and feel. For my current app I do the
> following:
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> For a JPanel I created a TitledBorder. The title appears with a thin blue
> font. After reediting the title's caption, VE added font and color
> specifications to the statement which creates the TitledBorder. So the
> title is now bold gray instead of thin blue as before.

Not sure I follow this completely. Is there something the VE is doing
wrong or is this something with JPanel ?

Best regards,

Joe Winchester
Re: Look & Feel [message #103752 is a reply to message #103304] Fri, 26 August 2005 08:53 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Hello Sri,

> The Look&Feel can be changed in the VE preferences (Window >
> Preferences > Java > Visual Editor > Swing Look and Feel.
Great, thanks. I didn't see that.

> Regarding the titledborder, I was able to set a text, font and color
> from the property editor, saved it, and when i re-edited the text it
> replaced correctly - please open a defect detailing the case so that we
> can fix it soon if valid.
Obviously I didn't explain it clear enough. Sorry for that.
Could you please try the following:
1. Set the "Preferences > Java > Visual Editor > Swing Look and Feel" to
Metal which was the default L&F used for my preview.

2. Create a new Visual Class with Style "Application"

3. Add
" UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name()); " to
the main method

4. Add a JPanel to the jContentPane (center)

5. Set the border of the
jPanel to TitledBorder, edit the Title and set it to "test". You see that
Title Font and Title Color are empty. Don't edit these attributes, just
click OK in the property editing dialog. This creates the following code
line:
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorde r(null,
"test", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));

titleFont and titleColor are each null.

6. Start the application. You see in the preview you have the metal
l&f with a dark bold font for the title. The runtime app uses a thin blue
font. Until now everything is still as expected.

7. Open the property editor for the border again. Now the attributes
Title Font and Title Color are filled with the defaults of the metal l&f.
Thus if you only want to change the caption you automatically change the
Title Font and Title Color, too. So changing "test" to "test1" and
clicking OK changes attributes which I did not want to change.
Changing only the caption creates the following line:
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorde r(null,
"test1", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new
java.awt.Font("Dialog", java.awt.Font.BOLD, 12), new
java.awt.Color(51,51,51)));

Now I have a titleFont and titleColor from the metal l&f in my windows l&f.

Of course it's maybe not a good idea to use different l&fs for preview and
runtime but it's still a behaviour which I didn't expect. Should I open a
defect on this?

> For defect #93503, please add yourself to CC to track its
progress. We
> will try to fix the defect soon.
Thanks a lot.

Michael
Re: Look & Feel [message #103766 is a reply to message #103419] Fri, 26 August 2005 08:56 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Hi Joe,

> As Sri said you can use the preferences page. The list shown in
here
> can actually be extended if you have your own look and feel that isn't
> included. The syntax is
>
> <extension point="org.eclipse.ve.java.core.lookandfeel"
> name="MyCoolLookAndFeel" class="com.mystuff.MyLookAndFeel"/>
>
> This should be picked up by the preferences page and displayed as one of
> the allowable look and feel classes
Thanks for that information.

> Not sure I follow this completely. Is there something the VE is doing
> wrong or is this something with JPanel ?
Please look at the folloup that I posted to Sri's answer.

Thanks,
Michael
Re: Look & Feel [message #103780 is a reply to message #103304] Fri, 26 August 2005 09:03 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
On Wed, 24 Aug 2005 10:06:37 -0400, Sri Gunturi wrote:

> Hi Michael,
> The Look&Feel can be changed in the VE preferences (Window >
> Preferences > Java > Visual Editor > Swing Look and Feel.
Btw if I change the l&f this way, for the first time I have to open a
Visual Class twice until VE changes the l&f. Can you reproduce this?
Re: Look & Feel [message #103840 is a reply to message #103780] Fri, 26 August 2005 10:17 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi michael,

> Btw if I change the l&f this way, for the first time I have to open a
> Visual Class twice until VE changes the l&f. Can you reproduce this?

The reason is that we only apply the look and feel when the VM for the
Visual Editor is started. Because we pre-start VMs to try to help
performance and avoid the overhead of the user having to wait for all
but the first startup, this means you won't get the new JVM with the new
look and feel until you get one that was started post the change.

Please open a bugzilla for us to fix this. What we should do is listen
to the preferences changing and make the look and feel change instant
across all open and future opened instances of the VE.

Best regards,

Joe
Re: Look & Feel [message #103935 is a reply to message #103840] Fri, 26 August 2005 18:54 Go to previous message
Joel Kamentz is currently offline Joel KamentzFriend
Messages: 30
Registered: July 2009
Member
I believe the equivalent bug has already been created: 106088, which is
marked as related to RFE/bug 48529.

Joel

"Joe Winchester" <winchest@uk.ibm.com> wrote in message
news:demq8p$kvq$1@news.eclipse.org...
> Hi michael,
>
>> Btw if I change the l&f this way, for the first time I have to open a
>> Visual Class twice until VE changes the l&f. Can you reproduce this?
>
> The reason is that we only apply the look and feel when the VM for the
> Visual Editor is started. Because we pre-start VMs to try to help
> performance and avoid the overhead of the user having to wait for all but
> the first startup, this means you won't get the new JVM with the new look
> and feel until you get one that was started post the change.
>
> Please open a bugzilla for us to fix this. What we should do is listen to
> the preferences changing and make the look and feel change instant across
> all open and future opened instances of the VE.
>
> Best regards,
>
> Joe
>
Re: Look & Feel [message #610367 is a reply to message #103233] Wed, 24 August 2005 14:06 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Michael,
The Look&Feel can be changed in the VE preferences (Window >
Preferences > Java > Visual Editor > Swing Look and Feel.

Regarding the titledborder, I was able to set a text, font and color
from the property editor, saved it, and when i re-edited the text it
replaced correctly - please open a defect detailing the case so that we
can fix it soon if valid.

For defect #93503, please add yourself to CC to track its progress. We
will try to fix the defect soon.
Regards,
Sri.


michael wrote:
> Hi,
>
> it would be great to be able to change the look and feel of the VE
> preview. Maybe the @jve tag could be extended to save the used look &
> feel. Is this a planned feature?
>
> There is even an issue by only using the default look & feel. If you
> create a TitledBorder, save it and then reedit the properties the fields
> "Title Font" and "Title Color" are filled by UIManager's defaults. These
> defaults are different for each look and feel. For my current app I do the
> following:
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> For a JPanel I created a TitledBorder. The title appears with a thin blue
> font. After reediting the title's caption, VE added font and color
> specifications to the statement which creates the TitledBorder. So the
> title is now bold gray instead of thin blue as before.
>
> I write here as I think the bug reports are not really looked at often
> enough. Btw could you please take a look at bug report #93503 which is a
> bit annoying and maybe easy to fix.
>
> Thanks,
> Michael
Re: Look & Feel [message #610376 is a reply to message #103233] Wed, 24 August 2005 21:47 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi michael,

> it would be great to be able to change the look and feel of the VE
> preview. Maybe the @jve tag could be extended to save the used look &
> feel. Is this a planned feature?

As Sri said you can use the preferences page. The list shown in here
can actually be extended if you have your own look and feel that isn't
included. The syntax is

<extension point="org.eclipse.ve.java.core.lookandfeel"
name="MyCoolLookAndFeel" class="com.mystuff.MyLookAndFeel"/>

This should be picked up by the preferences page and displayed as one of
the allowable look and feel classes


> There is even an issue by only using the default look & feel. If you
> create a TitledBorder, save it and then reedit the properties the fields
> "Title Font" and "Title Color" are filled by UIManager's defaults. These
> defaults are different for each look and feel. For my current app I do the
> following:
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name());
> For a JPanel I created a TitledBorder. The title appears with a thin blue
> font. After reediting the title's caption, VE added font and color
> specifications to the statement which creates the TitledBorder. So the
> title is now bold gray instead of thin blue as before.

Not sure I follow this completely. Is there something the VE is doing
wrong or is this something with JPanel ?

Best regards,

Joe Winchester
Re: Look & Feel [message #610400 is a reply to message #103304] Fri, 26 August 2005 08:53 Go to previous message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Hello Sri,

> The Look&Feel can be changed in the VE preferences (Window >
> Preferences > Java > Visual Editor > Swing Look and Feel.
Great, thanks. I didn't see that.

> Regarding the titledborder, I was able to set a text, font and color
> from the property editor, saved it, and when i re-edited the text it
> replaced correctly - please open a defect detailing the case so that we
> can fix it soon if valid.
Obviously I didn't explain it clear enough. Sorry for that.
Could you please try the following:
1. Set the "Preferences > Java > Visual Editor > Swing Look and Feel" to
Metal which was the default L&F used for my preview.

2. Create a new Visual Class with Style "Application"

3. Add
" UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClass Name()); " to
the main method

4. Add a JPanel to the jContentPane (center)

5. Set the border of the
jPanel to TitledBorder, edit the Title and set it to "test". You see that
Title Font and Title Color are empty. Don't edit these attributes, just
click OK in the property editing dialog. This creates the following code
line:
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorde r(null,
"test", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));

titleFont and titleColor are each null.

6. Start the application. You see in the preview you have the metal
l&f with a dark bold font for the title. The runtime app uses a thin blue
font. Until now everything is still as expected.

7. Open the property editor for the border again. Now the attributes
Title Font and Title Color are filled with the defaults of the metal l&f.
Thus if you only want to change the caption you automatically change the
Title Font and Title Color, too. So changing "test" to "test1" and
clicking OK changes attributes which I did not want to change.
Changing only the caption creates the following line:
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorde r(null,
"test1", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
javax.swing.border.TitledBorder.DEFAULT_POSITION, new
java.awt.Font("Dialog", java.awt.Font.BOLD, 12), new
java.awt.Color(51,51,51)));

Now I have a titleFont and titleColor from the metal l&f in my windows l&f.

Of course it's maybe not a good idea to use different l&fs for preview and
runtime but it's still a behaviour which I didn't expect. Should I open a
defect on this?

> For defect #93503, please add yourself to CC to track its
progress. We
> will try to fix the defect soon.
Thanks a lot.

Michael
Re: Look & Feel [message #610401 is a reply to message #103419] Fri, 26 August 2005 08:56 Go to previous message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Hi Joe,

> As Sri said you can use the preferences page. The list shown in
here
> can actually be extended if you have your own look and feel that isn't
> included. The syntax is
>
> <extension point="org.eclipse.ve.java.core.lookandfeel"
> name="MyCoolLookAndFeel" class="com.mystuff.MyLookAndFeel"/>
>
> This should be picked up by the preferences page and displayed as one of
> the allowable look and feel classes
Thanks for that information.

> Not sure I follow this completely. Is there something the VE is doing
> wrong or is this something with JPanel ?
Please look at the folloup that I posted to Sri's answer.

Thanks,
Michael
Re: Look & Feel [message #610402 is a reply to message #103304] Fri, 26 August 2005 09:03 Go to previous message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
On Wed, 24 Aug 2005 10:06:37 -0400, Sri Gunturi wrote:

> Hi Michael,
> The Look&Feel can be changed in the VE preferences (Window >
> Preferences > Java > Visual Editor > Swing Look and Feel.
Btw if I change the l&f this way, for the first time I have to open a
Visual Class twice until VE changes the l&f. Can you reproduce this?
Re: Look & Feel [message #610406 is a reply to message #103780] Fri, 26 August 2005 10:17 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi michael,

> Btw if I change the l&f this way, for the first time I have to open a
> Visual Class twice until VE changes the l&f. Can you reproduce this?

The reason is that we only apply the look and feel when the VM for the
Visual Editor is started. Because we pre-start VMs to try to help
performance and avoid the overhead of the user having to wait for all
but the first startup, this means you won't get the new JVM with the new
look and feel until you get one that was started post the change.

Please open a bugzilla for us to fix this. What we should do is listen
to the preferences changing and make the look and feel change instant
across all open and future opened instances of the VE.

Best regards,

Joe
Re: Look & Feel [message #610413 is a reply to message #103840] Fri, 26 August 2005 18:54 Go to previous message
Joel Kamentz is currently offline Joel KamentzFriend
Messages: 30
Registered: July 2009
Member
I believe the equivalent bug has already been created: 106088, which is
marked as related to RFE/bug 48529.

Joel

"Joe Winchester" <winchest@uk.ibm.com> wrote in message
news:demq8p$kvq$1@news.eclipse.org...
> Hi michael,
>
>> Btw if I change the l&f this way, for the first time I have to open a
>> Visual Class twice until VE changes the l&f. Can you reproduce this?
>
> The reason is that we only apply the look and feel when the VM for the
> Visual Editor is started. Because we pre-start VMs to try to help
> performance and avoid the overhead of the user having to wait for all but
> the first startup, this means you won't get the new JVM with the new look
> and feel until you get one that was started post the change.
>
> Please open a bugzilla for us to fix this. What we should do is listen to
> the preferences changing and make the look and feel change instant across
> all open and future opened instances of the VE.
>
> Best regards,
>
> Joe
>
Previous Topic:Indexed Propeties to be Supported?
Next Topic:VE development problem
Goto Forum:
  


Current Time: Sat Nov 09 03:15:05 GMT 2024

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

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

Back to the top