ColorConverter Without Text

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

ColorConverter Without Text

Postby nad » Mon Mar 31, 2014 5:35 am

I have a table that currently holds color objects within one of the columns. Is there a way to have the converter context for color only display the color as a small rectangle? For example, ColorConverter.CONTEXT_RGB displays the colored recantangle and the RGB values.

Thanks,
Nick
nad
 
Posts: 14
Joined: Wed Jul 25, 2012 7:55 am

Re: ColorConverter Without Text

Postby JIDE Support » Mon Mar 31, 2014 6:53 am

You cannot only use converter to do it because the converter only can convert the value to string. It cannot paint a color icon. What you need is a CellRenderer/CellEditor. Our ColorCellRenderer can already configured to only show a color icon. Please refer to examples\G26.ContextSensitiveTable\ContextSensitiveTableDemo.java for a complete demo that shows you how to do it.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36503
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 5 guests