Re: Editor / Renderer: data flow
- From: zero <zero@xxxxxxx>
- Date: Thu, 23 Feb 2006 19:37:49 GMT
"Denis" <denis.mazzucato@xxxxxxxxx> wrote in news:1140695584.873035.240170
@f14g2000cwb.googlegroups.com:
Hi all.
When I set an editor and a renderer to a jtable, which is the data
flow?
My editor return an Object from getCellEditorValue method. And then?
Which method proces that object?
I ask this cause I've set an editor with a comboBox to a jxtreetable
and when I click I see the comboBox. But when I select a value the
comboBox disappear and the cell remains as before...
Please help!
Thanks all,
DM
When the editor stops or cancels editing (fireEditingStopped or
fireEditingCanceled), the renderer takes over again. Or, more accurately,
every cell is rendered by the renderer, and the editor only pops up when a
cell is being edited, and only for that duration. If I understand
correctly, in your case you get the combobox editor when you click the
cell. Then, when you select a value from the combobox, that value is set
in the table's model, and the (default?) renderer renders it. Since the
renderer is not a combobox, the combobox disappears from the screen,
because editing has finished (stopped). The same thing happens when
editing is cancelled (typically if the combobox loses focus or you cancel
with escape), only then the original value remains.
Does this answer your question?
.
- Follow-Ups:
- Re: Editor / Renderer: data flow
- From: Denis
- Re: Editor / Renderer: data flow
- References:
- Editor / Renderer: data flow
- From: Denis
- Editor / Renderer: data flow
- Prev by Date: Re: Sorting JTable with fixed column
- Next by Date: Re: setVisible on a JWindow steals focus from other apps?
- Previous by thread: Editor / Renderer: data flow
- Next by thread: Re: Editor / Renderer: data flow
- Index(es):
Relevant Pages
|