edit row cells in a jtable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

edit row cells in a jtable

mongaru
hello, I`m new in glazed list and I wanted to know how to edit cells of a jtable
i`m using the tutorial to learn glazed but it does not says nothing about it.

I have searched in the net about it and all i can found is how to add a defaultCellEditor
to a jtable. I tried the examples on the web and they work just fine but with glazed list
I can not make it work. How can I do this.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: edit row cells in a jtable

hbrands
Administrator
In addition to using your "normal" cell editors,
your TableFormat should implement the interface
ca.odell.glazedlists.gui.WritableTableFormat.

The isEditable-method determines if the column value can be edited.
The setColumnValue-method is called after editing and specifies how to
modify the base object with the column value.

Please have a look at the Javadoc for details.

Hope this helps,
Holger

2010/1/23 mongaru <[hidden email]>

hello, I`m new in glazed list and I wanted to know how to edit cells of a
jtable
i`m using the tutorial to learn glazed but it does not says nothing about
it.

I have searched in the net about it and all i can found is how to add a
defaultCellEditor
to a jtable. I tried the examples on the web and they work just fine but
with glazed list
I can not make it work. How can I do this.

Thanks.
--
View this message in context: http://old.nabble.com/edit-row-cells-in-a-jtable-tp27289642p27289642.html
Sent from the GlazedLists - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: edit row cells in a jtable

Ted Zlatanov
On Sat, 23 Jan 2010 22:14:32 +0100 Holger Brands <[hidden email]> wrote:

HB> In addition to using your "normal" cell editors,
HB> your TableFormat should implement the interface
HB> ca.odell.glazedlists.gui.WritableTableFormat.

HB> The isEditable-method determines if the column value can be edited.
HB> The setColumnValue-method is called after editing and specifies how to
HB> modify the base object with the column value.

HB> Please have a look at the Javadoc for details.

For an editable table, in addition to setting the default renderer it's
also very useful to set the default editor for non-string objects, e.g.

my_table.setDefaultEditor(Boolean.class, new DefaultCellEditor(HudWidgetFactory.createHudCheckBox("")));

Ted


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]