KTable remove row [message #459204] |
Wed, 03 August 2005 10:53 |
Eclipse User |
|
|
|
Originally posted by: kongofrabongo.epost.no
Perhaps a silly question. But I cannot find a method that helps me
remove one row in the table. Do I have to generate a new content and
call redraw() ? In that case, isn't it a little bit odd that I have to
redraw the whole table if only one row has been deleted?
|
|
|
Re: KTable remove row [message #459211 is a reply to message #459204] |
Wed, 03 August 2005 12:54 |
Eclipse User |
|
|
|
Originally posted by: friederich.kupzog.de
Hi Ola,
since KTable is a data model driven table, yes, you have to "generate a
new content" and redraw the table. That is the standard way to solve the
problem.
The question is how to "generate a new content", which depends on your
table model. Given a model with an ArrayList as data storage element,
you simply have to delete the corresponding entry in the ArrayList.
Assuming that all functions like getContent and getRowCount etc. map to
the corresponding functions of the ArrayList, there is noting more to do
apart from calling table.redraw().
I do not think redrawig the whole table is odd. If one of the first rows
is deleted, the whole thing has to be redawn anyway ;) If you have
performance problems with that, check your renderer implementation.
Hope that helped,
Friederich
Ola wrote:
> Perhaps a silly question. But I cannot find a method that helps me
> remove one row in the table. Do I have to generate a new content and
> call redraw() ? In that case, isn't it a little bit odd that I have to
> redraw the whole table if only one row has been deleted?
--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
|
|
|
Powered by
FUDForum. Page generated in 0.01745 seconds