Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Re: Change the order of JXTables visible columns

From:Kleopatra [fastegal@masked-domain]
Sent on:Tue, 08 Jul 2008 13:10:38 +0200
In reply to:Re: Change the order of JXTables visible columns sent on Tue, 08 Jul 2008 03:28:41 PDT by [jdnc-interest@masked-domain]
Richard,

(I'm not here yet - but) can't bear to see you suffering <g> A couple
of comments:

- can't reproduce the multiple call of createDefaultColumns, how about a
short runnable .. blablabla .. A test fixture shows it's called exactly
once per new (table) model

[code]
public void testColumnCreate() {
JTable table = new JXTable() {

[@masked-domain]
public void createDefaultColumnsFromModel() {
super.createDefaultColumnsFromModel();
LOG.info("columnModel after" + getColumnModel());
}

};
table.setModel(new DefaultTableModel(30, 4));
}

[/code]

- it's never null except in the veery early stages of initialization.
The header might be a slightly different story, remember that there had
been issues in core with ill-defined responsibilities. Typically, the
header's column model should be the same as the table's column model.

- I think we have an open issue about re-ordering and hopefully the
issue has a reference to the discussion we had at that time. Which
should have a (nasty) way of achieving whatever order you want.

- to be honest, I don't quite understand what you are trying to achieve
;-) If it is about persisting and restoring user-triggered moves, the
xproperties in my incubator do it. And the xtable itself has a
setColumnSequence which can handle reordering the columns contained in
the model. If you want to re-order columns which are not in the column
model ... can't think of a use-case.

- to move the bulk config (that is give both table and columnModel) over
to the ColumnFactory, is .. Pending, as you noted ;-) Probably don't yet
have an issue, so feel free to file one. If you could come up with a
tested (meaning with unit tests) enhancement patch, it would increase
its probability for getting applied in the nearer future - I regard
swingx as being in something similar to a feature freeze right now but
could be convinced.

HTH
Jeanette

---------------------------------------------------------------------
To unsubscribe, e-mail: [jdnc-unsubscribe@masked-domain]
For additional commands, e-mail: [jdnc-help@masked-domain]
Found what you were looking for? If not - continue at Wiki Index

Other messages in this topic

SenderDate sentSubject
Kleopatra [fastegal@masked-domain]Tue, 08 Jul 2008 15:22:29 +0200Re: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 06:36:17 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 05:59:08 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 05:49:21 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 05:40:07 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 05:17:17 PDTRe: Change the order of JXTables visible columns
Kleopatra [fastegal@masked-domain]Tue, 08 Jul 2008 13:16:12 +0200Re: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 04:01:17 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 03:28:41 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 03:26:01 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Tue, 08 Jul 2008 03:04:33 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Mon, 07 Jul 2008 10:04:09 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Mon, 07 Jul 2008 05:17:26 PDTRe: Change the order of JXTables visible columns
[jdnc-interest@masked-domain]Fri, 04 Jul 2008 09:00:42 PDTChange the order of JXTables visible columns

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources| Agile acceptance testing resources