Problem with comboboxs that have custom renderer

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

Problem with comboboxs that have custom renderer

by Pedro Duque Vieira :: 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,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4






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

ComboBoxRollOverApp.java (871 bytes) Download Attachment
ColorIcon.java (993 bytes) Download Attachment
ColorPickerComboBox.java (1K) Download Attachment
ColorPickerComboBoxRenderer.java (1K) Download Attachment

Re: Problem with comboboxs that have custom renderer

by PEL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 damn i was too slow:

[img]http://666kb.com/i/azv25g6ym31mn6gzl.png[/img]

sample jar file NO rollover on custom renderer with aligned Text

http://www.sendspace.com/file/d7enw1

thank you for fixing it fast :)

Parent Message unknown Re: Problem with comboboxs that have custom renderer

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.
Not sure what did you mean in your reply - i haven't yet looked into the original question by Pedro.

Thanks
Kirill

----- Original Message ----
From: PEL <liquidc4d@...>
To: users@...
Sent: Thursday, June 26, 2008 1:57:32 PM
Subject: Re: Problem with comboboxs that have custom renderer


damn i was too slow:

[img]http://666kb.com/i/azv25g6ym31mn6gzl.png[/img]

sample jar file NO rollover:

http://www.sendspace.com/file/d7enw1

thank you for fixing it fast :)

--
View this message in context: http://www.nabble.com/Problem-with-comboboxs-that-have-custom-renderer-tp18139170p18142368.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: Problem with comboboxs that have custom renderer

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.
Please see if [1] has the answer to your question. If marking your custom renderer as non-opaque doesn't work, i will take a look at this.

Thanks
Kirill

[1] https://substance.dev.java.net/servlets/ReadMsg?list=users&msgNo=667

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 10:27:58 AM
Subject: Problem with comboboxs that have custom renderer

Hi,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4

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


RE: Problem with comboboxs that have custom renderer

by Pedro Duque Vieira :: 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

 

Tried marking it as non-opaque but still doesn’t work.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 22:07
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Please see if [1] has the answer to your question. If marking your custom renderer as non-opaque doesn't work, i will take a look at this.

Thanks
Kirill

[1] https://substance.dev.java.net/servlets/ReadMsg?list=users&msgNo=667

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 10:27:58 AM
Subject: Problem with comboboxs that have custom renderer

Hi,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4

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

 


Parent Message unknown Re: Problem with comboboxs that have custom renderer

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,

There are two separate issues. The issue mentioned before was on the selected item. If you set your renderer to be non-opaque, you will have the highlight gradient painted beneath it (in 5.0).

The second issue is the elements in the popup list itself. In version 5.0 the list cells are rendered differently than in 4.3. If the list cell renderer is not SubstanceDefautlListCellRenderer (or its extension), Substance will just ask the basic UI delegate to render the cell - this means no rollover and no selection highlights (just like in core look-and-feels). This has been a concious decision after seeing applications (especially NB) doing "crazy" things in their custom renderers, overriding paint(), paintComponent(), relying on opacity behavior and other quirks.

To get the full functionality of Substance highlight effects, it has always been recommended to extend SubstanceDefault*Renderer classes and not override the paint / paintComponent methods.

Thanks
Kirill

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 2:33:10 PM
Subject: RE: Problem with comboboxs that have custom renderer

Hi

 

Tried marking it as non-opaque but still doesn’t work.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 22:07
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Please see if [1] has the answer to your question. If marking your custom renderer as non-opaque doesn't work, i will take a look at this.

Thanks
Kirill

[1] https://substance.dev.java.net/servlets/ReadMsg?list=users&msgNo=667

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 10:27:58 AM
Subject: Problem with comboboxs that have custom renderer

Hi,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4

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

 



Re: Problem with comboboxs that have custom renderer

by PEL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Kirill Grouchnikov wrote:
> To get the full functionality of Substance highlight effects, it has
> always been recommended to extend SubstanceDefault*Renderer classes and
> not override the paint / paintComponent methods.

great extending the SubstanceDefaultListCellRenderer class and all works fine!

Parent Message unknown Re: Problem with comboboxs that have custom renderer

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.
For comboboxes it would be SubstanceDefaultComboBoxRenderer

Thanks
Kirill

----- Original Message ----
From: PEL <liquidc4d@...>
To: users@...
Sent: Thursday, June 26, 2008 4:15:30 PM
Subject: Re: Problem with comboboxs that have custom renderer



Kirill Grouchnikov wrote:
> To get the full functionality of Substance highlight effects, it has
> always been recommended to extend SubstanceDefault*Renderer classes and
> not override the paint / paintComponent methods.

great extending the SubstanceDefaultListCellRenderer class and all works
fine!
--
View this message in context: http://www.nabble.com/Problem-with-comboboxs-that-have-custom-renderer-tp18139170p18145317.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: Problem with comboboxs that have custom renderer

by Pedro Duque Vieira :: 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.

Hello Kirill,

 

I made my renderer extend SubstanceDefaultRenderer instead of just implementing ListCellRenderer, and now it works fine.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 23:40
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Hi,

There are two separate issues. The issue mentioned before was on the selected item. If you set your renderer to be non-opaque, you will have the highlight gradient painted beneath it (in 5.0).

The second issue is the elements in the popup list itself. In version 5.0 the list cells are rendered differently than in 4.3. If the list cell renderer is not SubstanceDefautlListCellRenderer (or its extension), Substance will just ask the basic UI delegate to render the cell - this means no rollover and no selection highlights (just like in core look-and-feels). This has been a concious decision after seeing applications (especially NB) doing "crazy" things in their custom renderers, overriding paint(), paintComponent(), relying on opacity behavior and other quirks.

To get the full functionality of Substance highlight effects, it has always been recommended to extend SubstanceDefault*Renderer classes and not override the paint / paintComponent methods.

Thanks
Kirill

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 2:33:10 PM
Subject: RE: Problem with comboboxs that have custom renderer

Hi

 

Tried marking it as non-opaque but still doesn’t work.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 22:07
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Please see if [1] has the answer to your question. If marking your custom renderer as non-opaque doesn't work, i will take a look at this.

Thanks
Kirill

[1] https://substance.dev.java.net/servlets/ReadMsg?list=users&msgNo=667

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 10:27:58 AM
Subject: Problem with comboboxs that have custom renderer

Hi,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4

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

 

 


Parent Message unknown Re: Problem with comboboxs that have custom renderer

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'm glad to hear that it works now.

Thanks
Kirill

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Friday, June 27, 2008 8:05:15 AM
Subject: RE: Problem with comboboxs that have custom renderer

Hello Kirill,

 

I made my renderer extend SubstanceDefaultRenderer instead of just implementing ListCellRenderer, and now it works fine.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 23:40
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Hi,

There are two separate issues. The issue mentioned before was on the selected item. If you set your renderer to be non-opaque, you will have the highlight gradient painted beneath it (in 5.0).

The second issue is the elements in the popup list itself. In version 5.0 the list cells are rendered differently than in 4.3. If the list cell renderer is not SubstanceDefautlListCellRenderer (or its extension), Substance will just ask the basic UI delegate to render the cell - this means no rollover and no selection highlights (just like in core look-and-feels). This has been a concious decision after seeing applications (especially NB) doing "crazy" things in their custom renderers, overriding paint(), paintComponent(), relying on opacity behavior and other quirks.

To get the full functionality of Substance highlight effects, it has always been recommended to extend SubstanceDefault*Renderer classes and not override the paint / paintComponent methods.

Thanks
Kirill

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 2:33:10 PM
Subject: RE: Problem with comboboxs that have custom renderer

Hi

 

Tried marking it as non-opaque but still doesn’t work.

 

Thanks.

 

From: Kirill Grouchnikov [mailto:kirillcool@...]
Sent: quinta-feira, 26 de Junho de 2008 22:07
To: users@...
Subject: Re: Problem with comboboxs that have custom renderer

 

Please see if [1] has the answer to your question. If marking your custom renderer as non-opaque doesn't work, i will take a look at this.

Thanks
Kirill

[1] https://substance.dev.java.net/servlets/ReadMsg?list=users&msgNo=667

----- Original Message ----
From: Pedro Duque Vieira <pedro.duquevieira@...>
To: users@...
Sent: Thursday, June 26, 2008 10:27:58 AM
Subject: Problem with comboboxs that have custom renderer

Hi,

 

Comboboxs that have a custom renderer don’t render rollover effects and selected item.

 

Attached is a sample small application that shows this problem.

 

Thanks =)

 

P.S.: This does not happen with substance 4

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

 

 


LightInTheBox - Buy quality products at wholesale price