AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JList and XML!? Need advice!

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Tobi Krausl
Guest





PostPosted: Fri Nov 21, 2003 9:02 am    Post subject: JList and XML!? Need advice! Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.