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:[jdnc-interest@masked-domain]
Sent on:Tue, 08 Jul 2008 03:04:33 PDT
In reply to:Re: Change the order of JXTables visible columns sent on Mon, 07 Jul 2008 05:17:26 PDT by [jdnc-interest@masked-domain]
Ok so packAll(0 and what have you won't cause the ColumnModel to be configured, only adding data to the table model seems to do something during visualisation, guess it's a lazy thing, which makes it a PITA to trap.

Latest trick was to create a custom JXTable to trip a new event after configuration:
[code]
table = new JXTable() {
[@masked-domain]
public void createDefaultColumnsFromModel() {
super.createDefaultColumnsFromModel();
if (this.getColumnModel() != null) {
firePropertyChange("columnModelConfigured", null, this.getColumnModel());
}
}
};
[/code]

If I call 'columnModelConfigured' a synthetic property it almost sounds like its not a hack. For some reason despite 'columnModel' appearing to be a bound property I can't intercept it's change events? just don't see any? Also in JTable.setColumnModel() it clearly states it can't be set to null - although with JXTable at least it very much is.. createDefaultColumnsFromModel() above gets called four times for every one of my tables and the column model is always null for the first pass? weird.
[Message sent by forum member 'osbald' (osbald)]

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

---------------------------------------------------------------------
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
Kleopatra [fastegal@masked-domain]Tue, 08 Jul 2008 13:10:38 +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]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