Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drag the value From table viwer and Drop this value another specific table Viewer in SWT(Need Specific drop location value in table Viwer in SWT)
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 is currently offline Biswabir DeyFriend
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.
  • Attachment: drag&Drop.png
    (Size: 114.15KB, Downloaded 30 times)

[Updated on: Thu, 18 May 2017 14:09]

Report message to a moderator

Previous Topic:SWT Browser DND on MacOSX
Next Topic:Failed to create Ole Client. result = -2147467259
Goto Forum:
  


Current Time: Wed Dec 13 19:17:24 GMT 2017

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

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