Re: Change the order of JXTables visible columns
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]
Other messages in this topic
| Sender | Date sent | Subject |
| Kleopatra [fastegal@masked-domain] | Tue, 08 Jul 2008 15:22:29 +0200 | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 06:36:17 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 05:59:08 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 05:49:21 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 05:40:07 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 05:17:17 PDT | Re: Change the order of JXTables visible columns |
| Kleopatra [fastegal@masked-domain] | Tue, 08 Jul 2008 13:16:12 +0200 | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 04:01:17 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 03:28:41 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 03:26:01 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Tue, 08 Jul 2008 03:04:33 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Mon, 07 Jul 2008 10:04:09 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Mon, 07 Jul 2008 05:17:26 PDT | Re: Change the order of JXTables visible columns |
| [jdnc-interest@masked-domain] | Fri, 04 Jul 2008 09:00:42 PDT | Change the order of JXTables visible columns |