Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » DnD question
DnD question [message #507686] Thu, 14 January 2010 11:42 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hi,

Is there a way to get information about the keystat while a drop occurs?
I'd like to know wether Shift or Control is pressed, simultaneously.

Regards,

Niels
Re: DnD question [message #507706 is a reply to message #507686] Thu, 14 January 2010 12:33 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

The value of "detail" is decided by the modifiers pressed:

DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
DND.DROP_COPY => Control
DND.DROP_LINK => Alt or Shift + Control

But only if the dragSource and dropTarget both support the operation,
otherwise its DND.DROP_NONE.

Greetings,
Tim

> Hi,
> Is there a way to get information about the keystat while a drop occurs?
> I'd like to know wether Shift or Control is pressed, simultaneously.
> Regards,
> Niels
Re: DnD question [message #507747 is a reply to message #507706] Thu, 14 January 2010 14:28 Go to previous messageGo to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hmm, somehow it is not working for me. I can see Alt or Control, but never
Shift.

One more question: I'm using a LocalSelectionTransfer to see what kind of
selection is going to be dropped. If the dropTarget component doesn't like
the selection is it possible to programmatically stop the drag event?

Thanks, Niels

"Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
news:hin2ug$tpu$1@build.eclipse.org...
> Hi.
>
> The value of "detail" is decided by the modifiers pressed:
>
> DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
> DND.DROP_COPY => Control
> DND.DROP_LINK => Alt or Shift + Control
>
> But only if the dragSource and dropTarget both support the operation,
> otherwise its DND.DROP_NONE.
>
> Greetings,
> Tim
>
>> Hi,
>> Is there a way to get information about the keystat while a drop occurs?
>> I'd like to know wether Shift or Control is pressed, simultaneously.
>> Regards,
>> Niels
Re: DnD question [message #507777 is a reply to message #507747] Thu, 14 January 2010 10:54 Go to previous messageGo to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Ok, I can answer the last question by myself: using event.detail =
DND.DROP_NONE.

But Shift is not working for me...


"Niels Lippke" <niels.lippke@airpas.com> schrieb im Newsbeitrag
news:hin9mi$3vf$1@build.eclipse.org...
> Hmm, somehow it is not working for me. I can see Alt or Control, but never
> Shift.
>
> One more question: I'm using a LocalSelectionTransfer to see what kind of
> selection is going to be dropped. If the dropTarget component doesn't like
> the selection is it possible to programmatically stop the drag event?
>
> Thanks, Niels
>
> "Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
> news:hin2ug$tpu$1@build.eclipse.org...
>> Hi.
>>
>> The value of "detail" is decided by the modifiers pressed:
>>
>> DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
>> DND.DROP_COPY => Control
>> DND.DROP_LINK => Alt or Shift + Control
>>
>> But only if the dragSource and dropTarget both support the operation,
>> otherwise its DND.DROP_NONE.
>>
>> Greetings,
>> Tim
>>
>>> Hi,
>>> Is there a way to get information about the keystat while a drop occurs?
>>> I'd like to know wether Shift or Control is pressed, simultaneously.
>>> Regards,
>>> Niels
>
Re: DnD question [message #507799 is a reply to message #507747] Thu, 14 January 2010 17:26 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
> Hmm, somehow it is not working for me. I can see Alt or Control, but
> never Shift.

Well, Shift is the same as no modifier pressed (DND.DROP_MOVE), so there
is no change. So, no, Shift can not be detected.

>
> One more question: I'm using a LocalSelectionTransfer to see what kind
> of selection is going to be dropped. If the dropTarget component doesn't
> like the selection is it possible to programmatically stop the drag event?

Setting operation to DND.DROP_NONE during dropAccept prevents the drop
event. Does that help?

Greetings,
Tim

>
> Thanks, Niels
>
> "Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
> news:hin2ug$tpu$1@build.eclipse.org...
>> Hi.
>>
>> The value of "detail" is decided by the modifiers pressed:
>>
>> DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
>> DND.DROP_COPY => Control
>> DND.DROP_LINK => Alt or Shift + Control
>>
>> But only if the dragSource and dropTarget both support the operation,
>> otherwise its DND.DROP_NONE.
>>
>> Greetings,
>> Tim
>>
>>> Hi,
>>> Is there a way to get information about the keystat while a drop
>>> occurs? I'd like to know wether Shift or Control is pressed,
>>> simultaneously.
>>> Regards,
>>> Niels
>
Re: DnD question [message #507800 is a reply to message #507799] Thu, 14 January 2010 17:30 Go to previous message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
> Setting operation to DND.DROP_NONE during dropAccept prevents the drop
> event.
Yeah, i meant detail, not operation.
Previous Topic:Browser issue with Composites
Next Topic:widget.upload and RAP 1.3M4
Goto Forum:
  


Current Time: Fri Apr 26 19:25:02 GMT 2024

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

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

Back to the top