How can I keep an extra empty row in a SWT table without adding dummy value in the model? I want to show an empty row always for the purpose of painting a rectangle around the last row? Any clue?
Scenario: The table size is going to be fixed. If I have 5 items then I want the sixth row as empty where I can draw. If I have 100 rows then I want the empty row at the 101st position and the table should scroll on some event and show that painted rectangle.
Hope to see an answer soon.
Finally I am able to add an empty row in the table without adding a dummy value in the content provider. Here is what I did: I extended the JFace TableViewer class and overrided the refresh(), refresh(Object element) and inputChanged(Object input, Object oldInput) method. Basically in all these three methods I first remove the empty Item if there is any and then let the original jface method call happen and then I again add the new empty table item.
Below is the code which worked for me.
Thanks... Amit Kumar