Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] double click problem

You have to look into the SWT API.  I don't think it can be done without hacking SWT directly for the tablet.  But maybe there is a tablet SWT abstraction that can be used.  I am afraid you are in new territory here.

Jesse

On Thu, Oct 28, 2010 at 8:49 AM, andrea antonello <andrea.antonello@xxxxxxxxx> wrote:
Alright, since I didn't hear back from anyone on idea about how to
bypass the engine, I am assuming it is not really possible (code is
quite complex, not really documented and I am too afraid to break the
use of the mouse :)).

I decided therefore to implement a long click as Jody suggested. I
made some test and it works well and it doesn't conflict with any
other mouse event. It will require to add a preference for how long a
long click should be.
What will that mean? Whenever you hold the left button down for more
than the defined time preference, it will issue a double-click.
In fact it would be then possible to issue any command. Is this the
moment we could start to thing about gestures? :) I love gestures.

Comments welcome,
Andrea


On Tue, Oct 26, 2010 at 10:35 AM, andrea antonello
<andrea.antonello@xxxxxxxxx> wrote:
> We are not yet there. I hacked around in that classes for some time
> trying to find a solution to the pen tap but wasn't able to.
>
> The fact that the tap is translated into a move event makes it
> impossible for me to create the logic to trap the event.
>
> That is why I am tempted to try to bypass ti to see what happens.
> Obviously I am not aware of what the consequences are and even on how
> to best do it.
>
> Andrea
>
>
>
> On Tue, Oct 26, 2010 at 10:25 AM, Jesse Eichar
> <jesse.eichar@xxxxxxxxxxxxxx> wrote:
>> Sorry I misunderstood.  SO the classes you want are:
>> EventHandler and EventJob
>> Jesse
>>
>> On Tue, Oct 26, 2010 at 10:18 AM, andrea antonello
>> <andrea.antonello@xxxxxxxxx> wrote:
>>>
>>> Hi Jesse,
>>> that is not the problem I am having.
>>> I remember us having the preference added.
>>> The problem is the fact that tablet pens give different events due to
>>> the user not being precise enough in tapping on the screen.
>>> I debugged through the engine, and what happens is mainly that "move"
>>> events come in the engine. SO it is not possible to handle the timing
>>> as we did throught the preferences time.
>>>
>>> Andrea
>>>
>>>
>>>
>>>
>>> On Tue, Oct 26, 2010 at 10:11 AM, Jesse Eichar
>>> <jesse.eichar@xxxxxxxxxxxxxx> wrote:
>>> > Ok.  So double click speed is configurable:
>>> > See ProjectUIPlugin.getDoubleClickSpeed()
>>> > You have to configure it in the preference store for the ProjectUI
>>> > plugin.
>>> >  I am trying to remember how to do that.  I think it is in the
>>> > plugin_customization.ini file in the net.refractions.udig plugin.  I
>>> > have
>>> > not tried it but I think if you add:
>>> > net.refractions.udig.project.ui/MOUSE_SPEED_KEY=1500
>>> > you will change the double click speed from 1000 ms to 1500 ms
>>> >
>>> > (Although in practice the time may not be 1500ms you will have to play
>>> > with
>>> > it)
>>> > Jesse
>>> > On Tue, Oct 26, 2010 at 9:58 AM, Jesse Eichar
>>> > <jesse.eichar@xxxxxxxxxxxxxx>
>>> > wrote:
>>> >>
>>> >> Checking...
>>> >>
>>> >> On Tue, Oct 26, 2010 at 9:54 AM, andrea antonello
>>> >> <andrea.antonello@xxxxxxxxx> wrote:
>>> >>>
>>> >>> > I am trying to remember where we use double click; mostly I can
>>> >>> > think
>>> >>> > of ending a polygon or linestring.
>>> >>>
>>> >>> Yes, that is it basically, and distance tool.
>>> >>> We added the custom time setting to the click event engine, and it was
>>> >>> fine for mouse usage. Doesn't work for pen.
>>> >>>
>>> >>> > We may need to back out and have a general "accepts" preference;
>>> >>> > that
>>> >>> > can be changed from "double click"  (for mouse); to something
>>> >>> > specific
>>> >>> > for pen computing (sometimes there is a pressure sensor on the
>>> >>> > stylus;
>>> >>> > so a "deep" press register as the single to accept the end of a
>>> >>> > linestring? A more general solution for you may be a "long" press;
>>> >>> > where to end a line string you hold the stylus in contact with the
>>> >>> > screen for longer.
>>> >>>
>>> >>> I can't remember really well why the clicks are trapped. Is it worth
>>> >>> to have it? The OS usually has tweaks and drivers for different input
>>> >>> devices, so perhaps that should be left to the OS?
>>> >>>
>>> >>> Adding long click support may even work, but I would not want to
>>> >>> overload that part of the code, which already is a bit fragile to me.
>>> >>>
>>> >>> Andrea
>>> >>>
>>> >>>
>>> >>>
>>> >>> >
>>> >>> > Jody
>>> >>> >
>>> >>> > On Tue, Oct 26, 2010 at 4:40 PM, andrea antonello
>>> >>> > <andrea.antonello@xxxxxxxxx> wrote:
>>> >>> >> Hi Jesse,
>>> >>> >> I have a problem regarding the double click, which in uDig is
>>> >>> >> customized.
>>> >>> >> The problem is that on tablet pc the pen tap doesn't respond as a
>>> >>> >> double click. In fact all events of click come in as a "move" event
>>> >>> >> instead of click and release (due to the fact that it is not easy
>>> >>> >> to
>>> >>> >> tab twice in the same place), making it impossible for the current
>>> >>> >> engine to trap double clicks properly.
>>> >>> >>
>>> >>> >> I tried really a lot to find a way to trap those events with some
>>> >>> >> logic, but none makes sense, since it blocks other events.
>>> >>> >> the only way I see possible is that to deactivate (through a
>>> >>> >> preference) the uDig dc management and enable the system one.
>>> >>> >>
>>> >>> >> What do you think?
>>> >>> >> Can you give me a hint about how to bypass the customized double
>>> >>> >> click?
>>> >>> >>
>>> >>> >> Thanks,
>>> >>> >> Andrea
>>> >>> >> _______________________________________________
>>> >>> >> User-friendly Desktop Internet GIS (uDig)
>>> >>> >> http://udig.refractions.net
>>> >>> >> http://lists.refractions.net/mailman/listinfo/udig-devel
>>> >>> >>
>>> >>> > _______________________________________________
>>> >>> > User-friendly Desktop Internet GIS (uDig)
>>> >>> > http://udig.refractions.net
>>> >>> > http://lists.refractions.net/mailman/listinfo/udig-devel
>>> >>> >
>>> >>> _______________________________________________
>>> >>> User-friendly Desktop Internet GIS (uDig)
>>> >>> http://udig.refractions.net
>>> >>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>> >>
>>> >
>>> >
>>> > _______________________________________________
>>> > User-friendly Desktop Internet GIS (uDig)
>>> > http://udig.refractions.net
>>> > http://lists.refractions.net/mailman/listinfo/udig-devel
>>> >
>>> >
>>> _______________________________________________
>>> User-friendly Desktop Internet GIS (uDig)
>>> http://udig.refractions.net
>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top