Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » KTable remove row
KTable remove row [message #459204] Wed, 03 August 2005 10:53 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:How to remove a control from a composite?
Next Topic:SWT GUI Designer
Goto Forum:
  


Current Time: Thu Oct 22 06:41:59 GMT 2020

Powered by FUDForum. Page generated in 0.01343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top