Re: Is Swixml a rich (or smart) client?

masukomi <[email protected]>
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
> Can you use a single instance of the swixml
> engine to make many calls to it, each time passing a
> different xml file in it and getting I presume a
> container with the swixml xml rendered into it?

technically yes you can. However if any of the xml files make use of 
the id attribute anywhere then it's just a matter of time before you'll 
run into id conflicts.
you can use the forget(someId) method to make it forget about id's it 
has rendered before. You'd probably have to iterate through all the 
keys in the id map and forget each one. There's no forgetAll() method. 
Forgetting doesn't break any associations that have been set up..it 
just makes the SwingEngine forget about them (so find(someId) won't 
work after you've called forget(someId)).

Easier to just instantiate a new SwingEngine every time. No worries 
about conflicts.

The id map is instance specific not render specific.

> I am
> not sure how it works, but I would envision my
> extension point requiring every swixml plugin to
> provide a JPanel, and on this jpanel the swixml engine
> takes the plugins xml and generates the UI for it.
> Later on, some menu item or button or something is
> clicked on which pops up this dialog and its already
> done, ready to use (or might be generated at that
> time...).
>
> That possible?

yes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.