Skip to main content

JNTable first contact - notices, sugestions, defect?

1 reply [Last post]
Anonymous

Hi,
First i have to say that it really looks good and feels good too.

I notice some things after play for a few minutes with the JNTable:

- It uses its own scrollbar, it doesn't need a scrollpane as the jtable
does, this confused me at start, as a consequence of this i can't figure
out how to make the horizontal scrollbar to work...

Posible defects:

- rowHeaderLocked(true) : the locked column looks diferent than the
other columns, the row height of the locked column changes, and it looks
bad/confusing.

- hasColumnControl(true) : it only works if the scrollbars are used, i
agree with this, but it should have something to make the scrollbars
allways visible, like |ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, to
show allways the scrollbars and the ColumnControl, this is a consequence
of using its own scrollbar. I think something like this on JNTable would
do the work:

public void setScrollBarPolicy(int hpolicy, int vpolicy) {
|| this.scrollPane.setHorizontalScrollBarPolicy(vpolicy);|
| this.scrollPane.setVerticalScrollBarPolicy(vpolicy);|
|}

- odd/even RowBackground and highlighters: if i have a highlighter for
the jntable (dont matter what kind) the oddRowBackground and
evenRowBackground properties are ignored. I think it would be better if
those properties were ignored _ONLY_ when an AlternateRowHighlighter is set.

That was all for now, keep the excelent work.

Ricardo Lopes.
||
|

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

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

Hi Ricardo,

>
> I notice some things after play for a few minutes
> with the JNTable:

good you played with it - it triggered me to file some issues to solve :-)

>
> - It uses its own scrollbar, it doesn't need a
> scrollpane as the jtable
> does, this confused me at start, as a consequence of
> this i can't figure
> out how to make the horizontal scrollbar to work...
>

it's on old issue related to the behaviour of the underlying table: a horizontal scrollbar is "working" - meaning that it allows the table to expand wider than the scrollpane's width - only if the table's resize mode is off. Currently you have to do so manually:

[code]
jnTable.getTable().setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
[/code]

There should be a better way to achieve this (issue #145).

> Posible defects:
>
> - rowHeaderLocked(true) : the locked column looks
> diferent than the
> other columns, the row height of the locked column
> changes, and it looks
> bad/confusing.
>

that's clearly a bug - consistency between rowheader and the other columns is bad both in terms of appearence as you noted and in terms of function - sorting/filtering is not synched (issues #141, #142)

> - hasColumnControl(true) : it only works if the
> scrollbars are used, i
> agree with this, but it should have something to make
> the scrollbars
> allways visible, like
> |ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, to
> show allways the scrollbars and the ColumnControl,
> this is a consequence
> of using its own scrollbar.

That's a good idea - in fact there's already a related issue (#11), maybe you want to add a comment there?

> - odd/even RowBackground and highlighters: if i have
> a highlighter for
> the jntable (dont matter what kind) the
> oddRowBackground and
> evenRowBackground properties are ignored. I think it
> would be better if
> those properties were ignored _ONLY_ when an
> AlternateRowHighlighter is set.
>

that's a "silently known" issue (read: JNTable.setHighlighters() has a code comment that something needs to be done about it) - to make it more open, there's now an issue #144 - maybe you can add a comment there as well, especially about your ideas how to solve it.

A hack around is to set the highlighter before setting the odd/even background.

Thanks for taking the time to write down your constructive feedback - it's highly welcome!

Jeanette