JTabbedPane and DecorationAreaType

View: New views
5 Messages — Rating Filter:   Alert me  

JTabbedPane and DecorationAreaType

by Matt234 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have an application that display a banner just under the title bar (a la JXLogginPanel). Right below the banner is a JTabbedPane. To make it all look good, I use:

SubstanceLookAndFeel.setDecorationType(bannerPanel, DecorationAreaType.HEADER);

on the banner panel. However, I would also like the tab row of the JTabbedPabe to be painted with the HEADER style, like the flamingo ribbon component (the contents of the JTabbedPane should have 'null' as its decoration type). Is it possible? I tried quite a few things but none of them seems to be working...

Parent Message unknown Re: JTabbedPane and DecorationAreaType

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

I've added an experimental SubstanceLookAndFeel.setDecorationType that gets an additional boolean parameter. If the value is false, only the component itself will be marked with the specified decoration type. Its children will continue being under either the default decoration type, or the decoration type specified under the closest ancestor that propagates its decoration type.

Note that the initial implementation has a slight visual noise on the content border of the tabbed pane - this should be addressed in the next few days. Also, using this method under Business Black Steel will result in white-on-white tab text color on selected tabs. I need to think this through, and it might still well be that this experimental API will be removed before the version is officially released - if it contributes too much to the code complexity or anything at all to the performance.

Thanks
Kirill

----- Original Message ----
From: Matt234 <ppinmatt@...>
To: users@...
Sent: Monday, May 12, 2008 11:57:51 AM
Subject: JTabbedPane and DecorationAreaType


I have an application that display a banner just under the title bar (a la
JXLogginPanel). Right below the banner is a JTabbedPane. To make it all look
good, I use:

SubstanceLookAndFeel.setDecorationType(bannerPanel,
DecorationAreaType.HEADER);

on the banner panel. However, I would also like the tab row of the
JTabbedPabe to be painted with the HEADER style, like the flamingo ribbon
component (the contents of the JTabbedPane should have 'null' as its
decoration type). Is it possible? I tried quite a few things but none of
them seems to be working...
--
View this message in context: http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17189929.html
Sent from the java.net - substance users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: JTabbedPane and DecorationAreaType

by Matt234 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your answer, I'm going to try it. However, while working with setDecorationType, I noticed that you can't remove the decoration type for some children once a parent has been modified because the internal function loops through parents to find a style. Now, the "experimental" setDecorationType with the boolean parameter might help, but wouldn't it be easier to add a NULL or NONE value to the DecorationAreaType enum? GENERAL doesn't work because it's not rendered the same way as null, but you can't do setDecorationType(comp, null) because the decoration type of the parent will be used.

BTW, Subtance rocks! I love it! :)

Matt

Kirill Grouchnikov wrote:
Hi,

I've added an experimental SubstanceLookAndFeel.setDecorationType that gets an additional boolean parameter. If the value is false, only the component itself will be marked with the specified decoration type. Its children will continue being under either the default decoration type, or the decoration type specified under the closest ancestor that propagates its decoration type.

Note that the initial implementation has a slight visual noise on the content border of the tabbed pane - this should be addressed in the next few days. Also, using this method under Business Black Steel will result in white-on-white tab text color on selected tabs. I need to think this through, and it might still well be that this experimental API will be removed before the version is officially released - if it contributes too much to the code complexity or anything at all to the performance.

Thanks
Kirill


----- Original Message ----
From: Matt234 <ppinmatt@videotron.ca>
To: users@substance.dev.java.net
Sent: Monday, May 12, 2008 11:57:51 AM
Subject: JTabbedPane and DecorationAreaType


I have an application that display a banner just under the title bar (a la
JXLogginPanel). Right below the banner is a JTabbedPane. To make it all look
good, I use:

SubstanceLookAndFeel.setDecorationType(bannerPanel,
DecorationAreaType.HEADER);

on the banner panel. However, I would also like the tab row of the
JTabbedPabe to be painted with the HEADER style, like the flamingo ribbon
component (the contents of the JTabbedPane should have 'null' as its
decoration type). Is it possible? I tried quite a few things but none of
them seems to be working...
--
View this message in context: http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17189929.html
Sent from the java.net - substance users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@substance.dev.java.net
For additional commands, e-mail: users-help@substance.dev.java.net


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Parent Message unknown Re: JTabbedPane and DecorationAreaType

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

The NONE value is already part of the DecorationAreaType enum.

Thanks
Kirill

----- Original Message ----
From: Matt234 <ppinmatt@...>
To: users@...
Sent: Tuesday, May 13, 2008 5:59:12 AM
Subject: Re: JTabbedPane and DecorationAreaType


Thanks for your answer, I'm going to try it. However, while working with
setDecorationType, I noticed that you can't remove the decoration type for
some children once a parent has been modified because the internal function
loops through parents to find a style. Now, the "experimental"
setDecorationType with the boolean parameter might help, but wouldn't it be
easier to add a NULL or NONE value to the DecorationAreaType enum? GENERAL
doesn't work because it's not rendered the same way as null, but you can't
do setDecorationType(comp, null) because the decoration type of the parent
will be used.

BTW, Subtance rocks! I love it! :)

Matt


Kirill Grouchnikov wrote:

>
> Hi,
>
> I've added an experimental SubstanceLookAndFeel.setDecorationType that
> gets an additional boolean parameter. If the value is false, only the
> component itself will be marked with the specified decoration type. Its
> children will continue being under either the default decoration type, or
> the decoration type specified under the closest ancestor that propagates
> its decoration type.
>
> Note that the initial implementation has a slight visual noise on the
> content border of the tabbed pane - this should be addressed in the next
> few days. Also, using this method under Business Black Steel will result
> in white-on-white tab text color on selected tabs. I need to think this
> through, and it might still well be that this experimental API will be
> removed before the version is officially released - if it contributes too
> much to the code complexity or anything at all to the performance.
>
> Thanks
> Kirill
>
>
> ----- Original Message ----
> From: Matt234 <ppinmatt@...>
> To: users@...
> Sent: Monday, May 12, 2008 11:57:51 AM
> Subject: JTabbedPane and DecorationAreaType
>
>
> I have an application that display a banner just under the title bar (a la
> JXLogginPanel). Right below the banner is a JTabbedPane. To make it all
> look
> good, I use:
>
> SubstanceLookAndFeel.setDecorationType(bannerPanel,
> DecorationAreaType.HEADER);
>
> on the banner panel. However, I would also like the tab row of the
> JTabbedPabe to be painted with the HEADER style, like the flamingo ribbon
> component (the contents of the JTabbedPane should have 'null' as its
> decoration type). Is it possible? I tried quite a few things but none of
> them seems to be working...
> --
> View this message in context:
> http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17189929.html
> Sent from the java.net - substance users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>     
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>

--
View this message in context: http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17207780.html
Sent from the java.net - substance users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Parent Message unknown Re: JTabbedPane and DecorationAreaType

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

The new experimental API to not propagate the decoration area type to container children now provides much better visuals when applied to tabbed panes. You can see an example of using it (and the resulting screenshot) at [1]. As i already mentioned, the value NONE is already part of DecorationAreaType enum, and you can use that as well to force default color scheme on each one of the children of tabbed pane (in your example).

Thanks
Kirill

[1] https://substance.dev.java.net/docs/api/SetDecorationTypeNoPropagate.html

----- Original Message ----
From: Matt234 <ppinmatt@...>
To: users@...
Sent: Tuesday, May 13, 2008 5:59:12 AM
Subject: Re: JTabbedPane and DecorationAreaType


Thanks for your answer, I'm going to try it. However, while working with
setDecorationType, I noticed that you can't remove the decoration type for
some children once a parent has been modified because the internal function
loops through parents to find a style. Now, the "experimental"
setDecorationType with the boolean parameter might help, but wouldn't it be
easier to add a NULL or NONE value to the DecorationAreaType enum? GENERAL
doesn't work because it's not rendered the same way as null, but you can't
do setDecorationType(comp, null) because the decoration type of the parent
will be used.

BTW, Subtance rocks! I love it! :)

Matt


Kirill Grouchnikov wrote:

>
> Hi,
>
> I've added an experimental SubstanceLookAndFeel.setDecorationType that
> gets an additional boolean parameter. If the value is false, only the
> component itself will be marked with the specified decoration type. Its
> children will continue being under either the default decoration type, or
> the decoration type specified under the closest ancestor that propagates
> its decoration type.
>
> Note that the initial implementation has a slight visual noise on the
> content border of the tabbed pane - this should be addressed in the next
> few days. Also, using this method under Business Black Steel will result
> in white-on-white tab text color on selected tabs. I need to think this
> through, and it might still well be that this experimental API will be
> removed before the version is officially released - if it contributes too
> much to the code complexity or anything at all to the performance.
>
> Thanks
> Kirill
>
>
> ----- Original Message ----
> From: Matt234 <ppinmatt@...>
> To: users@...
> Sent: Monday, May 12, 2008 11:57:51 AM
> Subject: JTabbedPane and DecorationAreaType
>
>
> I have an application that display a banner just under the title bar (a la
> JXLogginPanel). Right below the banner is a JTabbedPane. To make it all
> look
> good, I use:
>
> SubstanceLookAndFeel.setDecorationType(bannerPanel,
> DecorationAreaType.HEADER);
>
> on the banner panel. However, I would also like the tab row of the
> JTabbedPabe to be painted with the HEADER style, like the flamingo ribbon
> component (the contents of the JTabbedPane should have 'null' as its
> decoration type). Is it possible? I tried quite a few things but none of
> them seems to be working...
> --
> View this message in context:
> http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17189929.html
> Sent from the java.net - substance users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>     
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>

--
View this message in context: http://www.nabble.com/JTabbedPane-and-DecorationAreaType-tp17189929p17207780.html
Sent from the java.net - substance users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


LightInTheBox - Buy quality products at wholesale price