Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Questions about widgets in JAXB plugin

Al
I'm assuming that you are allowing a general boolean _expression_ with and/or/not and parentheses for both of these. I think you also need to consider what 'selected' means, where I think that means selection of widgets with persistent state like checkboxes and radio buttons as well as text fields which are non-empty (If I enter data in a field, then that field is 'selected')

I'd suggest getting requests from others besides me before implementing this since this appears to be sizable work that I'm not sure I'd use.
Dave



From:        "Albert L. Rossi" <arossi@xxxxxxxxxxxxx>
To:        Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Cc:        ptp-dev-bounces@xxxxxxxxxxx
Date:        05/25/2011 12:46 PM
Subject:        Re: [ptp-dev] Questions about widgets in JAXB plugin
Sent by:        ptp-dev-bounces@xxxxxxxxxxx




Dave,

a few random thoughts before I go out.  Would it be sufficient to give a widget something like this:

<enabled-if>(widgetA#enabled && widgetB#enabled) | !widgetC#selected</enabled-if>
<visible-if>widgetA#visible && widgetB#visible</visible-if>

The changes I'd have to make:

1.  give all widgets an id that is visible in the configuration
2.  map the widgets to their ids
3.  write a parser for the contents
4.  maintain for each widget a validator for each of its boolean properties (visible, enabled, selected ...) and run it on each update.

Am I missing something, offhand?

This, as you can see, is not a trivial change, but I'm sure I can make it work.

Al
----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> Al
> #3 is not a problem for me. The only place I use something like this
> currently is to enable/disable a set of widgets based on the user's
> selection of advanced or basic mode where I'm leaning towards two separate
> resource manager implementations anyway. I can see value to allowing an
> action on one widget to enable or disable others is useful, but handling
> the dependencies in a general way is probably complicated.
>
> Being able to assign alternate values to true/false in a general way (#1),
> where yes/no is just the example I need is more useful. I think I can also
> solve that with a pair of radio buttons with yes/no labels but like the
> checkbox better.
> Dave
>
>
>
> From:   "Albert L. Rossi" <arossi@xxxxxxxxxxxxx>
> To:     Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
> Date:   05/25/2011 11:59 AM
> Subject:        Re: [ptp-dev] Questions about widgets in JAXB plugin
> Sent by:        ptp-dev-bounces@xxxxxxxxxxx
>
>
>
> Dave,
>
> For 2), I think I need to implement a button group and add it to the
> widget choices.
> 3) To make this completely general would require a bit of work, I think,
> but let me chew on it.  Just don't have the time right now ...
>
> Al
> ----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> > Dave,
> >
> > For 1), there currently exists another solution:  a combo box with "yes"
> and "no" as the only choices.
> >
> > Al
> > ----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> > > Dave,
> > >
> > > The answer to all three questions is currently "no", unfortunately.  I
> can work on this when I'm back on Friday.
> > >
> > > Al
> > > ----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> > > > Al
> > > > A few questions about widgets in your JAXB implementation
> > > > 1) I defined a widget as a checkBox, which assumes that the
> attribute
> > > > where the value is stored is a boolean. I'm using this to represent
> a PE
> > > > environment variable which accepts yas and no as valid values. Is
> there
> > > > any way to translate an attribute value of true/false to yes/no?
> > > > 2) Is there an example of how I would code a group of radio buttons?
> I
> > > > coded the following which resulted in displaying the radio buttons
> but no
> > > > labels were associated with them. I'm also not sure where to code
> the
> > > > saveValueTo, since if I coded it in the radio button definition then
> both
> > > > radio buttons would click on or off together.
> > > > <composite group="true" >
> > > >                                                 <layout>
> > > >                                                         <grid-layout
>
> > > > numColumns="2" makeColumnsEqualWidth="false"></grid-layout>
> > > >                                                 </layout>
> > > >                                                 <widget
> type="radioButton"
> > > > style="SWT.LEFT" saveValueTo="MP_LABELIO_ATTR">
> > > > <layout-data>
> > > > <grid-data
> > > > horizontalAlign="SWT.BEGINNING"></grid-data>
> > > > </layout-data>
> > > > <fixed-text>"yes"
> > > > </fixed-text>
> > > >                                                 </widget>
> > > >                                                 <widget
> type="radioButton"
> > > > style="SWT.LEFT" saveValueTo="MP_LABELIO_ATTR">
> > > > <layout-data>
> > > > <grid-data
> > > > horizontalAlign="SWT.BEGINNING"></grid-data>
> > > > </layout-data>
> > > > <fixed-text>"no"</
> > > > fixed-text>
> > > >                                                 </widget>
> > > >                                         </composite>
> > > >
> > > > 3) Is there any way to enable/disable a widget dependent on an event
> in
> > > > another widget? For instance, if I have an advanced mode checkbox, I
> might
> > > > want to enable/disable other widgets depending on the checkbox
> state. If
> > > > this desn't exist, I'm not requesting it be added, just wondering if
> I'm
> > > > missing something.
> > > >
> > > > Thanks
> > > >
> > > > Dave
> > > _______________________________________________
> > > ptp-dev mailing list
> > > ptp-dev@xxxxxxxxxxx
> > >
https://dev.eclipse.org/mailman/listinfo/ptp-dev
> > >
> >
> > _______________________________________________
> > ptp-dev mailing list
> > ptp-dev@xxxxxxxxxxx
> >
https://dev.eclipse.org/mailman/listinfo/ptp-dev
> >
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/ptp-dev
>

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top