Re: gui builder issues?

Emiliano Heyns <[email protected]> Fri, 23 Jan 2004 11:50:22 +0100
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
On Fri, Jan 23, 2004 at 10:17:20AM +0000, Charles Goodwin wrote:

> > Maybe we should explicitly mark widgets? An attribute on the toplevel
> > that has no purpose but to identify it as an entity meant to be
> > presented as a widget in a gui builder?
> 
> -1
> 
> It's up to somebody developing apps to make an effort to understand
> widgets.  They'll have a 'list' (a toolbar?) to choose from and they
> should understand the process that goes into setting up a GUI.

This 'list' would also show any aggregate pane that happens to be in
their app. The benshaw sales demo would show, for example, the following
'widgets' in addition to the 'standard' widgets (sorry for the long
list):

com.benshaw.apps.sales.quoteheaderitem,
com.benshaw.apps.sales.searchresults,
com.benshaw.apps.sales.option, com.benshaw.apps.sales.findquote,
com.benshaw.apps.sales.optionline,
com.benshaw.apps.sales.quotegen,
com.benshaw.apps.sales.optionlist,
com.benshaw.apps.sales.quoteheader,
com.benshaw.apps.sales.abook, com.benshaw.apps.sales.comments,
com.benshaw.apps.sales.optioneditor,
com.benshaw.apps.sales.quotedetails,
com.benshaw.apps.sales.buttonbar, com.benshaw.apps.sales.mainx,
com.benshaw.tableitem, com.benshaw.login,
com.benshaw.textbox, com.benshaw.statusline,
org.xwt.themes.monopoly.menu, org.xwt.themes.monopoly.frame,
org.xwt.themes.monopoly.edit, org.xwt.themes.monopoly.splitpane,
org.xwt.themes.monopoly.popupmenu,
org.xwt.themes.monopoly.slider_base,
org.xwt.themes.monopoly.tree, org.xwt.themes.monopoly.grouper,
org.xwt.themes.monopoly.list, org.xwt.themes.monopoly.vbox,
org.xwt.themes.monopoly.toolbar, org.xwt.themes.monopoly.tester,
org.xwt.themes.monopoly.tab, org.xwt.themes.monopoly.panel,
org.xwt.themes.monopoly.menuitem,
org.xwt.themes.monopoly.clickable,
org.xwt.themes.monopoly.dialog, org.xwt.themes.monopoly.column,
org.xwt.themes.monopoly.button,
org.xwt.themes.monopoly.focusborder,
org.xwt.themes.monopoly.colorpicker,
org.xwt.themes.monopoly.scrollpane,
org.xwt.themes.monopoly.checkbox,
org.xwt.themes.monopoly.radiobutton,
org.xwt.themes.monopoly.pulldown,
org.xwt.themes.monopoly.grouper_,
org.xwt.themes.monopoly.spinbox, org.xwt.themes.monopoly.bar,
org.xwt.themes.monopoly.group,
org.xwt.themes.monopoly.scrollbar,
org.xwt.themes.monopoly.tabpane,
org.xwt.themes.monopoly.separator,
org.xwt.themes.monopoly.pulldownsort,
org.xwt.themes.monopoly.tooltip, org.xwt.themes.monopoly.bevel,
org.xwt.themes.monopoly.window, org.xwt.themes.monopoly.dock,
org.xwt.themes.monopoly.table, org.xwt.themes.monopoly.icontree,
org.xwt.themes.monopoly.help, org.xwt.themes.monopoly.cell,
xwt.util.lib.rsa, xwt.util.lib.md5, xwt.util.animator,
xwt.util.calendar, xwt.util.date_picker,
xwt.util.colorpicker, xwt.util.calendar_day, main

obviously (especially the last) they're not all meant to be used as
widgets, and I'd not want to see them in the list of widgets I could
pick from.

> ie to create a menu:
> 1) add a toolbar
> 2) add a menu entry
> 3) add a menu item, submenu, or separator

But you'd have to pick out these from a list of 164 'widgets' of which
only 97 are useful as such.

> It'd be wiser to simply describe widgets properly in documentation to
> that 'mark' them in some hackish way.

I would presonally not think of it as hackish to say
   <xwt widget="true">
   </xwt>

> Besides, it's quite clear (once the concept has been introduced) that
> anything in xwt.widget is a widget.

That's still marking them, you're just using a (hard-coded) path as the
marker. This also makes it harder to incorporate custom widgets.

> Perhaps we have a use for some XML elements in the <doc> node to point
> out exactly what properties a widget has.

Something like that, yep.

-- 
Emiliano