#181-swing - convenience table.getColumnByModelIndex(column)?
I'm moving this here because I want to get more opinions (maybe you can
convince me by drumming up support ) The issue is
Though I have stumbled into wanting such a method myself
(TableComponentAdapter has it :-) I'm reluctant in introducing it into
the public api of JXTable because it breaks the overall and simple
convention that every coordinate in a public method is in view coordinates.
The convention has a principal problem with hidden columns: they don't
have view coordinates and consequently are not directly accessible by
the JXTable api. But they are indirectly accessible by
table.getColumns(includeHidden) and looping through the columns returned.
Additionally, I favour going into the direction of identifiers vs.
coordinates: I always see an index as a "weak" hook into the actual
object (here that's the column) because it can easily get invalid due to
removing/adding items (in the model). Accessing columns (hidden as well
as visible) by identifier is supported in JXTable.
As to the use-case example in the bug report - that looks like a initial
configuration issue, which might be abstracted a bit more and maybe
solved by a custom ColumnFactory: the binding project f.i. has a
metadata-aware ColumnFactoryExt which configures the columns accordingly.