Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Get the TableEditors objects hosted in a TableItem(Giving a TableItem containing some TableEditor objects, how to get those TableEditor objects)
Get the TableEditors objects hosted in a TableItem [message #501490] Wed, 02 December 2009 14:47 Go to next message
Oceanys  is currently offline Oceanys Friend
Messages: 3
Registered: December 2009
Junior Member
Hi,
I'm working with an SWT table and I added various TableEditor objects to its rows.
In each row we can find text inputs, calendars and combo boxes.
I want to delete a selected row, so using the remove method doesn't give me the wanted result, so I was obliged to get the "internal" TableEditor objects in the table row and dispose every TableEditor object.
Is there other method to remove a TableItem with its hosted TableEditor objects ?
Re: Get the TableEditors objects hosted in a TableItem [message #501706 is a reply to message #501490] Thu, 03 December 2009 14:36 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

You do need to explicitly dispose the associated TableEditors when you
dispose a TableItem. If you want an easy way to get a TableItem's
associated TableEditors, I think the best approach is to store them on the
TableItem with setData(...) when you create them, and then later at item
dispose time you can get them from the TableItem with getData(...).

If I've misunderstood your question then please follow up.

Grant


"Oceanys" <marouani.aymen@gmail.com> wrote in message
news:hf5um5$4et$1@build.eclipse.org...
> Hi,
> I'm working with an SWT table and I added various TableEditor objects to
its rows.
> In each row we can find text inputs, calendars and combo boxes.
> I want to delete a selected row, so using the remove method doesn't give
me the wanted result, so I was obliged to get the "internal" TableEditor
objects in the table row and dispose every TableEditor object.
> Is there other method to remove a TableItem with its hosted TableEditor
objects ?
Re: Get the TableEditors objects hosted in a TableItem [message #501711 is a reply to message #501706] Thu, 03 December 2009 14:56 Go to previous message
Oceanys  is currently offline Oceanys Friend
Messages: 3
Registered: December 2009
Junior Member
Hi,

Thank you for the help.
I used a different method which is storing the TableEditor objects in an ArrayList (in deed an ArrayList for text input, an other for calendars and a different one for combo box; so 3 ArrayLists). If I want to remove a TableItem, I get the related TableEditors from each ArrayList and then dispose them and finally remove them from the ArrayList.
Your method seems to be more eloquent.
Regards.
Previous Topic:freezing swt gui
Next Topic:Question: SWT analogue of java.awt.event.ContainerListener?
Goto Forum:
  


Current Time: Fri Apr 26 16:04:21 GMT 2024

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

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

Back to the top