|
|
Re: GUI with JIDE-Table / Column-Handling and DataChangedCallback
Posted:
Apr 12, 2012 6:19 AM
|
|
"matt dash" wrote in message <jm67ik$cjh$1@newscl01ah.mathworks.com>... > > That is exactly what I did. I already knew about the getDataVector. But it just wasn't there. > > > > By the way: My above example shows this behaviour. > >
> When i run your example with these lines, jtable.getModel returns a DefaultTableModel and I can use getDataVector. Maybe it is version dependent.
I had a short look on this.
It does not seem to be version dependend : checked it with 2011b and 2010b-SP0
But it (seems) to be constructur dependend:
The code ---------------------------------------------- Data = {'1','2';'3','4'};
% different constructors: jt1 = com.jidesoft.grid.JideTable(); % empty jt2 = com.jidesoft.grid.JideTable({'1'},{' '}); % data + headers jt3 = com.jidesoft.grid.JideTable(2,2); % numcol + numrow
% resulting table models disp(['empty: ',char(jt1.getModel)]) disp(['data+header: ',char(jt2.getModel)]) disp(['numcol+numrow: ',char(jt3.getModel)]) -----------------------------------------------
gives output
empty: javax.swing.table.DefaultTableModel@a49c14 data+header: javax.swing.JTable$1@14bd4d1 numcol+numrow: javax.swing.table.DefaultTableModel@18955ea
I would not expect this behaviour but it is good to know. Could you explain this?
Alexander
|
|