 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tobi Krausl Guest
|
Posted: Fri Nov 21, 2003 9:02 am Post subject: JList and XML!? Need advice! |
|
|
Hi!
I wrote an application which uses a class based upon JAXP/DOM to
manage some kind of status-information which is updated frequently.
I've named this class XMLTool. It contains methods to
insert/update/delete nodes in a DOM-Tree:
class XMLTool {
//Construct and handle DOM-Tree
public static boolean insertItem(...)
public static boolean updateItem(...)
public static boolean deleteItem(...)
....
}
Now I want that class to be the data-model for a JList used in my
gui-component. This means that the content displayed by a JList is
automatically updated when data in the DOM-Tree changes.
1. How can I handle that?
Do I just have to subclass AbstractListModel or is there anything else
to do?
2. How to organize the class-structure?
Should the XMLTool-class itself act as a ListModel like
class XMLTool extends AbstractListModel {
.....
implement XML-processing-logic as well as ListModel-logic?
.....
}
or should there be some kind of wrapper-class? If there should be a
wrapper, how should the class-structure look like?
Thank you,
Tobi
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|