Home » Archived » Visual Editor (VE) » Look & Feel
|
Re: Look & Feel [message #103304 is a reply to message #103233] |
Wed, 24 August 2005 14:06 |
Srimanth 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 #103752 is a reply to message #103304] |
Fri, 26 August 2005 08:53 |
Michael 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 #610367 is a reply to message #103233] |
Wed, 24 August 2005 14:06 |
Srimanth 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 #610400 is a reply to message #103304] |
Fri, 26 August 2005 08:53 |
Michael 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
|
|
| | | | |
Goto Forum:
Current Time: Sat Nov 09 03:15:05 GMT 2024
Powered by FUDForum. Page generated in 0.04479 seconds
|