Drag the value From table viwer and Drop this value another specific table Viewer in SWT [message #1763557] |
Wed, 17 May 2017 11:56 |
Biswabir Dey Messages: 7 Registered: March 2017 |
Junior Member |
|
|
I have create a RCP application where i need to drag table Viewer column value to drop another Specific table viewer column.currently i got default drop location from my code. if i drop on specific column, by default this drag value set to another column. that is the issue i am facing now. drag functionality is not column specific.please find below code of my implementation,
else if(data[0].equals("PARAMS"))
{
Point point = new Point(event.x,event.y);
TableItem item = (TableItem)event.item;
if(item!=null) //if item has a value then
{
String findIndex[] = item.toString().split("\\{|\\}");
int index = new Integer(findIndex[1]);
List<TCStepsGSON> tcIPatPos = (ArrayList<TCStepsGSON>) testscriptsViewer.getInput();
TCStepsGSON tcStep = tcIPatPos.get(index-1);
tcStep.stepArgument = data[1];
testscriptsViewer.refresh();
if(!isDirty)
{
isDirty = true;
firePropertyChange(PROP_DIRTY);
}
}
}
Here TableViewer is testscriptsViewer. From this code I am getting row index in table. But i need column index to set the data on specific column.
tcStep.stepArgument = data[1];
From this code i have set value in perticular column. But if need more column for drop value, no option to drop another column. so it is very hard to find specific column to drop data. Please suggest.
[Updated on: Thu, 18 May 2017 14:09] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02615 seconds