Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Comments on setDefaultButton(...)

> So the default button behavior of the view/surrounding container rules over the table enter/doubleclick?

Yes, at least on Vista where I tried it. If curious, see the attached
example :-)

Elias.

On Mon, Jan 18, 2010 at 9:05 AM, Flick, Stefan
<Stefan.Flick@xxxxxxxxxxxx> wrote:
> So the default button behavior of the view/surrounding container rules over the table enter/doubleclick?
> Even if there is a registered doubleclick on the table? Well... strange
> But if it is so, we should of course follow the SWT convention.
>
> Stefan-on-the-rush
>
> -----Ursprüngliche Nachricht-----
> Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Elias Volanakis
> Gesendet: Montag, 18. Jänner 2010 17:50
> An: Riena Developers list
> Betreff: Re: [riena-dev] Comments on setDefaultButton(...)
>
> Hi Stefan,
>
> the SWT convention when ENTER is pressed in the table is as follows:
> - if there is a default button, ENTER pushes the default button
> - otherwise ENTER is a double click on the table
>
> I think our default button support should follow this as well.
>
> Regards,
> Elias.
>
>
> On Mon, Jan 18, 2010 at 8:26 AM, Flick, Stefan
> <Stefan.Flick@xxxxxxxxxxxx> wrote:
>> One Point we have also to respect is the default behavior on tables/trees. What happens if you press the "Enter" key when the focus is on a table/tree? This is by default the same as a doubleclick with the mouse. I know that there are separate bugs for doubleclick on tables. In the case the focus is on a table and there is a doubleclick listener registered, the table should also consum a possible Enter keyboard event so that there is no default button behavior in this case.
>>
>> Just my 2ct.
>>
>> Regards, stefan
>>
>> -----Ursprüngliche Nachricht-----
>> Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Schepp, Frank
>> Gesendet: Montag, 18. Jänner 2010 16:31
>> An: Riena Developers list
>> Betreff: AW: [riena-dev] Comments on setDefaultButton(...)
>>
>> Hi Elias,
>>
>> Sorry for the late answer:
>>
>> 1. Yes, IWindowRidget.setDefaultButton(Object widget) should be replaced by IWindowRidget.setDefaultButton(IActionRidget ridget).
>> 2. Yes, it should work, if the default button is set in configureRidgets().
>> 3. Yes, the default button for the controller has to be set each time the submodule is activated.
>> 4. But I think when MasterDetails #x loses focus the default button (if existing) of the controller has to be restored also!?
>>
>> Greetings, Frank
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Elias Volanakis
>> Gesendet: Freitag, 15. Januar 2010 08:04
>> An: Riena Developers list
>> Betreff: [riena-dev] Comments on setDefaultButton(...)
>>
>> Hi Frank and riena-dev,
>>
>> I wanted to share some impressions about the
>> controller.setDefaultButton(...) / ridget.setDefaultButton(...) API --
>> and hear your feedback and ideas.
>>
>> The API has not been used previously, as it was broken. I'm
>> experimenting with it in the context of making the Apply button in the
>> MasterDetails the default button. The "default" button is pressed
>> automatically, if you hit ENTER.
>>
>> Here is what I've found:
>>
>> 1. We have SubModuleController.setDefaultButton(IActionRidget) and
>> IWindowRidget.setDefaultButton(Object widget)
>>>> I think it would be better to have IActionRidget in both cases
>>
>> 2. This only works when called from controller.afterBind() -- see
>> MasterDetailsSubModuleController2 for an example:
>>
>>        public void afterBind() {
>>                super.afterBind();
>>                IMasterDetailsRidget master2 = getRidget(IMasterDetailsRidget.class,
>> "master2"); //$NON-NLS-1$
>>                IActionRidget actionApply = master2.getRidget(IActionRidget.class,
>> MasterDetailsComposite.BIND_ID_APPLY);
>>                setDefaultButton(actionApply);
>>        }
>>
>>>> I think having to implement afterBind() just for this is clunky. Furthermore it does not work (see #3). Looking forward I think I would like it more, if it could work in configureRidgets() -- the SubModuleController should then do the necessary stuff in afterBind()
>>
>> 3. As you may know there can only be one default button per Shell
>> (=window). Currently we don't handle this correctly. If two
>> Controllers have a default button the last one will "win". Basically
>> we need to set the default button for the controller _each time_ the
>> module is activated.
>>
>> 4. Moving forward I would like to have several default buttons per
>> controller (think two MasterDetails ridgets). However I think that the
>> logic for this should not be tied to an individual ridget. It would
>> rather be something like a helper class that is set up in the
>> controller (example: DefaultButtonManager). For example if
>> MasterDetails #1 has the focus it would invoke
>> controller.setDefaultButton(apply1) -- if MasterDetails #2 gets the
>> focus it would invoke controller.setDefaultButton(apply2)   (assuming
>> we can implement this). The DefaultButtonManager could be configured
>> appropriately. Does this make sense?
>>
>> Let me know what you think,
>> Elias.
>>
>> --
>> Elias Volanakis | Technical Lead | http://eclipsesource.com
>> elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis
>> _______________________________________________
>> riena-dev mailing list
>> riena-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/riena-dev
>> _______________________________________________
>> riena-dev mailing list
>> riena-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/riena-dev
>> _______________________________________________
>> riena-dev mailing list
>> riena-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/riena-dev
>>
>
>
>
> --
> Elias Volanakis | Technical Lead | http://eclipsesource.com
> elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
>



-- 
Elias Volanakis | Technical Lead | http://eclipsesource.com
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis

Attachment: Snippet38.java
Description: Binary data


Back to the top