Render cell over a whole row in JXTreeTable

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

Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to create a "group node"-behaviour (like in outlook, where mails for an example can be grouped in weekdays and so on). Each group node title is stored in column 0, but is there any way to render this so column 0 can overlap the other columns in the treetable? Can anyone point me in the right direction?
[Message sent by forum member 'd_l' (daniel.lundin@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Something like described here? :
* http://forums.java.net/jive/thread.jspa?messageID=362337
[Message sent by forum member 'bbrtki' (bbr_tki@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As I understand this right it's about grouping columns, what I meant was grouping rows in the JXTreeTable, something like this:
http://www.devexpress.com/Products/VCL/ExQuantumTreeList/i/screenshots/tlf_12.gif

Om the screenshot there are four "row groups": "Standard Editions", "ComboBoxes", "Blobs" and "Popups".

The "Standard Editions" group is simply a node with a number of childs. The problem is how the render the "group node" so it overlaps all columns and looks like a header?
[Message sent by forum member 'd_l' (daniel.lundin@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Return null values or something similar for the other columns (and render them as as blank cells), then install a highlighter that will take care of the background color of the row. Treat other cells as usual.

For the highlighter you'll have to implement a custom HighlightPredicate that knows how to distinguish between normal rows and the group rows.
[Message sent by forum member 'noelopan' (palm86@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the tip, I will try it out and see if it works.
[Message sent by forum member 'd_l' (daniel.lundin@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It turns out that the first column in the treetable doesn't get affected by the highlighter, but I can successfully draw the other columns. A workaround for this is to simply make the first column not visible. Also, the highlighter drawing is column-based, so it doesnt seems to be possible to overlap another column when drawing. My thought was that I paint the row group header title, but the text will get truncated at the end of the column and this is not desired for a header. Anyone having an idea of how to do?
[Message sent by forum member 'd_l' (daniel.lundin@...)]

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

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


Re: Render cell over a whole row in JXTreeTable

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've used the above method with success. Don't know why the highlighter doesn't work in your first column though.

Yes, the highlighter is column-based, but not necessarily. You can "base" all the columns on the value of the hierarchical column, for instance. Here's what i mean:

[code]
    public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
        Object value = adapter.getValue(0);
        return value instanceof Group;
    }
[/code]

In this way, whether a cell in the row is highlighted depends on column 0.
[Message sent by forum member 'noelopan' (palm86@...)]

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

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