Re: Generating GUI at run time

Kevin Duffey <[email protected]> Tue, 7 Sep 2004 08:41:54 -0700 (PDT)
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Frank, thanks for the reply.

I left out an important part I guess, and that is the
ability to use multiple xml files to build the UI. At
runtime, if you load a dynamic plugin after the
application is running and it has swixml xml, how do
you generate the menu/UI stuff dynamically? Or does
swixml only support a single file to build the entire
UI, and that is it? Can you supply pieces of the UI
with separate xml files? If so, can the pieces be
added dynamically at runtime?

If not, I would request that as a big feature
improvement. Allowing pieces of the UI to be loaded
dynamically..

If it doesn't support this, why would it not? Seems
you just use the engine to assemble parts of the UI,
update the UI when done.

Thanks.

--- [email protected] wrote:

> List for Users of Carlsbad Cubes' Technologies and
> Products schrieb am 06.09.04 22:21:45:
> > 
> > Question for you guys. At runtime, how do you
> handle
> > the ordering of menu items and menus? Meaning, if
> I
> > want a File->New added to the top of the menu, but
> my
> > code runs after the File menu is created by some
> other
> > code, how do I dynamically ensure my File New is
> at
> > the top, and how does different bits of code
> "fight"
> > for the top/bottom positions. Ideally you want
> File ->
> > Exit in its own separated area at the very bottom.
> But
> > if some other code runs after mine does and adds a
> > menu item to the File menu, it's most likely going
> to
> > show up at the end.
> 
> There is no code changing the order of menu items.
> The
> items appear exact in the order mentioned in your
> xml.
> Also, there is a <separator/> tag to "draw a line"
> between distinct menu items in the same menu. E.g.
> if you want to separate the "Exit" menu from other
> items.
> 
> 
> > 
> > Also, is there any support for dynamic menus, by
> this
> > I mean, it shows only the most used/priority
> items,
> > with a little down button at the end to expand the
> > menu and show all items? Like how MS Word/Outlook
> and
> > some other apps work? If so, how are these defined
> > dynamically so that some items show up in the
> > shortened menu popup, and some show up only when
> the
> > full menu is shown.
> 
> No, this you have to code yourself. You may of
> course
> let swixml help you by getting the menu items and
> calling
> setVisible(false) -- I did not try this, though.
> 
> > 
> > Lastly, how do you handle context menu
> items/buttons?
> > By this I mean, if I have an editor program with a
> > pane on the left with a tree view showing the
> files,
> > and on the right an editor. Now, assuming I have a
> > node selected on the left AND in the editor I have
> > text selected. The Edit -> Cut/Copy/Delete items
> as
> > well as toolbar buttons are going to work on only
> ONE
> > of the selected items. So if you have both
> selected,
> > which one gets deleted? In other words, how do you
> get
> > the delete button in the toolbar to delete the
> tree
> > node selected OR the editor selected at runtime?
> Is
> > there any way to do this?
> 
> This is a pure java issue and has little to do with
> swixml.
> Some subjects regarding this are: test which
> component
> owns the focus. Also, you may (as I would do it)
> create
> a Cut/Copy/DeleteAction and register this component
> as
> TreeSelectionListener of the tree and CaretListener
> of
> your text (not sure about this). Then you could
> remember
> the "last selected thing" allthough a test for the
> focus is
> IMHO necessary too...
> 
> Frank
> 
> > 
> > Thanks.
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> > http://promotions.yahoo.com/new_mail 
> > 
> > _______________________________________________
> > Forum mailing list
> > [email protected]
> >
>
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
> 
> 
> 
> 
> _______________________________________________
> Forum mailing list
> [email protected]
>
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail