Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » DnD question
DnD question [message #507686] Thu, 14 January 2010 06:42 Go to next message
Eclipse UserFriend
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 07:33 Go to previous messageGo to next message
Eclipse UserFriend
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 09:28 Go to previous messageGo to next message
Eclipse UserFriend
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 05:54 Go to previous messageGo to next message
Eclipse UserFriend
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 12:26 Go to previous messageGo to next message
Eclipse UserFriend
> 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 12:30 Go to previous message
Eclipse UserFriend
> 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: Wed Jul 23 14:22:10 EDT 2025

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

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

Back to the top