Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula grid - get selected values
Nebula grid - get selected values [message #478828] Fri, 07 August 2009 07:35 Go to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Hello,

i use the nebula grid component to load spreadsheet values.
In some operations i need to get all selected values which can be in one block (as usual) or in many blocks (using control and/or Shift).
If i want to get all values in many blocks (using the Control-key: select one column->pressing Control->select another column)

i get some values twice (the first number in the spread in the next selection block).

i use:

Point[] sel = grid.getCellSelection();

String[] data = new String[sel.length];
for (int i = 0; i < sel.length; i++) {

data[i] = grid.getItem(sel[i].y).getText(sel[i].x);

System.out.println(data[i]);

}



Is this a normal behaviour of nebula grid?

With kind regards

Marcel
Re: Nebula grid - get selected values [message #489272 is a reply to message #478828] Fri, 02 October 2009 08:08 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
I could remove double entries of the selection as a workaround
but is this a bug of the Nebula grid component?

I also want to remove columns from a selection reliable.

Any information is appreciated!
Re: Nebula grid - get selected values [message #489309 is a reply to message #489272] Fri, 02 October 2009 11:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
Most likely but I don't have time to work on it :-(

Tom

Marcel schrieb:
> I could remove double entries of the selection as a workaround
> but is this a bug of the Nebula grid component?
>
> I also want to remove columns from a selection reliable.
>
> Any information is appreciated!
>
Re: Nebula grid - get selected values [message #489317 is a reply to message #489309] Fri, 02 October 2009 12:12 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Crying or Very Sad
It would help me to avoid selections if control is pressed together
with a mouse drag event (to remove columns reliable).

Is there a swt mouse drag listener available i could use for the nebula grid?
Re: Nebula grid - get selected values [message #490911 is a reply to message #478828] Mon, 12 October 2009 11:37 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
My workaround for the moment is that i do not permit a selection
(delete selection) if a drag event occurs and the controll key
is pressed. This works so far for my purposes.

Re: Nebula grid - get selected values [message #494470 is a reply to message #490911] Fri, 30 October 2009 18:54 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
I have uploaded a patch to fix this bug.

Here is the link to the patch.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=293824

Marty
Re: Nebula grid - get selected values [message #494677 is a reply to message #494470] Mon, 02 November 2009 07:49 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Great!

Is the patch available with the nightly built?
Re: Nebula grid - get selected values [message #494683 is a reply to message #494677] Mon, 02 November 2009 07:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
No, not yet because I didn't had time to apply it.

Tom

Marcel schrieb:
> Great!
>
> Is the patch available with the nightly built?
>
Re: Nebula grid - get selected values [message #494720 is a reply to message #494683] Mon, 02 November 2009 11:14 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Thanks for the information!
Can i patch the class myself?
I only found the code fragment not the whole class which was patched.
Re: Nebula grid - get selected values [message #494721 is a reply to message #494720] Mon, 02 November 2009 11:16 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
You need to fetch the sources from CVS, Copy the patch and Apply it
using Eclipse (Team > Apply Patch).

Tom

Marcel schrieb:
> Thanks for the information! Can i patch the class myself?
> I only found the code fragment not the whole class which was patched.
>
Re: Nebula grid - get selected values [message #494749 is a reply to message #494721] Mon, 02 November 2009 13:52 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
I applied the patch and it seems to work!
Many thanks for your efforts (and fast replies!).

Best regards

Marcel
Re: Nebula grid - get selected values [message #494759 is a reply to message #494749] Mon, 02 November 2009 14:38 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
Good deal.
Re: Nebula grid - get selected values [message #598345 is a reply to message #489309] Fri, 02 October 2009 12:12 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
:cry:
It would help me to avoid selections if control is pressed together
with a mouse drag event (to remove columns reliable).

Is there a swt mouse drag listener available i could use for the nebula grid?
Re: Nebula grid - get selected values [message #598523 is a reply to message #490911] Fri, 30 October 2009 18:54 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
I have uploaded a patch to fix this bug.

Here is the link to the patch.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=293824

Marty
Re: Nebula grid - get selected values [message #598529 is a reply to message #598523] Mon, 02 November 2009 07:49 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Great!

Is the patch available with the nightly built?
Re: Nebula grid - get selected values [message #598535 is a reply to message #598529] Mon, 02 November 2009 07:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
No, not yet because I didn't had time to apply it.

Tom

Marcel schrieb:
> Great!
>
> Is the patch available with the nightly built?
>
Re: Nebula grid - get selected values [message #598537 is a reply to message #494683] Mon, 02 November 2009 11:14 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
Thanks for the information!
Can i patch the class myself?
I only found the code fragment not the whole class which was patched.
Re: Nebula grid - get selected values [message #598542 is a reply to message #598537] Mon, 02 November 2009 11:16 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
You need to fetch the sources from CVS, Copy the patch and Apply it
using Eclipse (Team > Apply Patch).

Tom

Marcel schrieb:
> Thanks for the information! Can i patch the class myself?
> I only found the code fragment not the whole class which was patched.
>
Re: Nebula grid - get selected values [message #598549 is a reply to message #494721] Mon, 02 November 2009 13:52 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 134
Registered: July 2009
Senior Member
I applied the patch and it seems to work!
Many thanks for your efforts (and fast replies!).

Best regards

Marcel
Re: Nebula grid - get selected values [message #598555 is a reply to message #494749] Mon, 02 November 2009 14:38 Go to previous message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
Good deal.
Previous Topic:GridTableViewer Sorting
Next Topic:Date/Calendar widgets - any validation support?
Goto Forum:
  


Current Time: Thu Dec 18 04:18:41 GMT 2014

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

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