1.0 - 1.6 upgrade, missing ColumnHeaderRenderer

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

1.0 - 1.6 upgrade, missing ColumnHeaderRenderer

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The new version is looking alright so far - hoping we get some demos up and running soon(ish).

Only one error here though which occurs when replacing swingX 1.0 with 1.6
--
import org.jdesktop.swingx.table.ColumnHeaderRenderer; can not be resolved
ColumnsHeaderRenderer cannot be resolved to a type
--
I had this class extended to be able to display some custom icons in the header.
What would be the new way to do this?
[Message sent by forum member 'bbrtki' (bbr_tki@...)]

http://forums.java.net/jive/thread.jspa?messageID=370280

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


Re: 1.0 - 1.6 upgrade, missing ColumnHeaderRenderer

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The new version is looking alright so far - hoping we
> get some demos up and running soon(ish).
>

good to hear that. They are - see the thread about the demos for a link - too early to advertise loudly. Feel free to contribute :-)

> Only one error here though which occurs when
> replacing swingX 1.0 with 1.6
> --
> import
> org.jdesktop.swingx.table.ColumnHeaderRenderer; can
> not be resolved
> ColumnsHeaderRenderer cannot be resolved to a type
> --

not an error, it's a feature: the only reason for having the custom renderer was to support sort icons (the enhanced configuration never really worked in the general case for several reasons) which is done in core now.

> I had this class extended to be able to display some
> custom icons in the header.
> What would be the new way to do this?

grab the old code and install in your header - but beware: there are issues as java6 sort icons are placed as the icon in the label (last time I looked), so your custom icons most probably clash with that.

CU
Jeanette
[Message sent by forum member 'kleopatra' (fastegal@...)]

http://forums.java.net/jive/thread.jspa?messageID=370294

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


Re: 1.0 - 1.6 upgrade, missing ColumnHeaderRenderer

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> grab the old code and install in your header - but beware: there are issues as java6 sort icons are > placed as the icon in the label (last time I looked), so your custom icons most probably clash with that.

Yeah it is, I wasn't showing an arrow in that case.

So basically I'll have to grab that part of the old swingx 1.0 code to get custom icons working again. No biggie.
But, I don't suppose a feature request for showing the sort arrow + a custom icon in a column header cell was already on the list of things to do? There's that nasty limitation of JLabels only supporting a single icon.

In theory that could be worked around by having something like:
[code]
        JPanel Panel = new JPanel( new FlowLayout( FlowLayout.CENTER, 0, 0));
        JLabel Icon1 = new JLabel(); // Add icon url here
        JLabel Icon2 = new JLabel(); // Add icon url here-

        Panel.add(Icon1);
        Panel.add(Icon2);
[/code]

And then returning the panel at the icon display location to display it in front or behind the label header text as desired.
[Message sent by forum member 'bbrtki' (bbr_tki@...)]

http://forums.java.net/jive/thread.jspa?messageID=370297

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