Skip to main content

(No) Problem with AlternateRowHighlighter in a JXTreeTable (resolved)

5 replies [Last post]
mkreth
Offline
Joined: 2006-07-14
Points: 0

Hi all,

in a JXTreeTable with showVerticalLines set to true an AlternateRowHighlighter has a bug: The vertical lines are interrupted in every odd row.

Any hints to a workaround or fix for this?

Btw: swingx as of 05/21/2006.

Kind regards,
Magnus Kreth

I was irritated by the fact that AlternateRowHighlighter works as expected with showVerticalLines in JXTable but shows the described behaviour in a JXTreeTable. After finding out that I should better set columnMargin > 0 with showVerticalLines I apologize for wasting anyones time here.

Message was edited by: mkreth

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kleopatra
Offline
Joined: 2003-06-11
Points: 0

Magnus,

> I was irritated by the fact that
> AlternateRowHighlighter works as expected with
> showVerticalLines in JXTable but shows the described
> behaviour in a JXTreeTable. After finding out that I
> should better set columnMargin > 0 with
> showVerticalLines I apologize for wasting anyones
> time here.
>

nothing to apologize, I don't regard it as a waste to be reminded of the rough edges :-) After all, the inconsitency is confusing and should be at least documented.

Thanks!
Jeanette

BTW: editing a post in this forum has the unfortunate quirk that the edited portion never makes it to the mailing list (that is I didn't see it).

Message was edited by: kleopatra

Testing: the non-synch is reported to be fixed... is it?

david_hall
Offline
Joined: 2003-06-12
Points: 0

(BTW: editing a post in this forum has the unfortunate quirk that the edited portion never makes it to the mailing list (that is I didn't see it).)

That's terribly unfortunate: I can't tell you how many times I've written something that I then modified almost immediately. I assume that most of the Sun folks are using the mailing list rather than the web forum S/W.

Kleopatra

jdnc-interest@javadesktop.org wrote:
> (BTW: editing a post in this forum has the unfortunate quirk that the edited portion never makes it to the mailing list (that is I didn't see it).)
>
> That's terribly unfortunate: I can't tell you how many times I've written something that I then modified almost immediately.

doooohhh ... indeed terribly unfortunate.

> I assume that most of the Sun folks are using the mailing list rather than the web forum S/W.

can't know :-) Personally I rarely go to the forum, only if a suspect
any malfunction in synching mailinglist and forum. Hmmm ... will see if
we can apply some pressure on the forum responsibles

Jeanette

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

kleopatra
Offline
Joined: 2003-06-11
Points: 0

Testing: the not-synchronizing edits from forum to mailing list might be fixed .. we'll see

Message was edited by: kleopatra

hmm.. the overall synch time is loooww

Kleopatra

Hi Magnus,
>
> in a JXTreeTable with showVerticalLines set to true an AlternateRowHighlighter has a bug: The vertical lines are interrupted in every odd row.
>
> Any hints to a workaround or fix for this?
>

the problem is not the highlighter but the table cell margins: if you
want grid lines, you have to make sure that there's space for them to
draw, otherwise the renderer paints over them :-)

TreeTable's default settings (which I think are buggy anyway, see issue
#342-swingx) differ from those in table, that's why it doesn't show up.

[code]
// for vertical lines
treeTable.setVerticalLines(true);
treeTable.setColumnMargin(1);
// for horizontal lines
treeTable.setHorizontalLines(true);
treeTable.setRowMargin(1);
// alternatively, enabling both
treeTable.setShowGrid(true);
treeTable.setIntercellSpacing(new Dimension(1,1);
[/code]

Though I dont like convenience method, I had been musing about one for
doing the above:

[code]
setDefaultMarginsAndLines(verticalOn, horizontalOn);
[code]

Hmm...

Jeanette

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