![]()
|
||
Java Swing GUI tool based on XML, XMLPanelEdit by OOP-ReserchOOP-Reserch developed the Java Swing GUI tool, OOP XMLPanelEdit. By our easy-to-use Java Swing GUI tool, you can develop your Java client program easily. Because this Java Swing GUI builder represents the Java Swing GUI in XML, your Java client can be internationalization ready. With XMLPanelEdit, your Java Swing GUI can alter its representation on the fly. Java Swing GUI in multiple languages can be easily created. Just by editing XML, internationalization can easily be done. OOP XMLPanelEdit Version 1.0 is no longer available. Please use OOP XMLPanelEdit Version 1.2 |
||
Swing, Swing, Swing!Swing is the set of GUI related Classes supplied with JDK1.2. Especially, JTable,JTree,JList and the subclasses of JTextComponents are easy to update their contents due to the 'Model-View-Controller' architecture, which means the centralized data can be shared by client programs over the net.(Note: All other Swing GUI components are also based on the Model-View-Controller architecture.) And Swing GUI components are 'Event-driven', which enables us to define how each component respond to the actions from the users at our hand. With these characters, we can take the full advantage of OOP and build up the enterprise oriented GUI easily.
And what do we need?
While the Swing provides us 'Freedom of programming' depending on its sophisticated concept, it is still somewhat tedious work to define how our GUIs can be represented on the screen, especially as for the position and the size of the each component. For example, even in case that we want to re-position a button on our GUI slightly more left, we have to modify our source code and recompile it again. And in case of somewhat complicated GUI Class, the most portion of our source code may be the GUI-related one, which leads to the difficulty for reading and manage it.
<!ENTITY % panel.mdl "layout?,size?,border?,toolbar?,panel.child*"> <!ELEMENT panel (%panel.mdl;)> <!ATTLIST panel %opaque.att; %panel.name.att; %alignmentX.att; %alignmentY.att; %label.text.att; %label.image.att; %layout.border.constraint.att; %access.name.att; %access.descript.att; %color.fg.att; %color.bg.att;>And the fragment of the XML document looks like this. <panel opaque="false"> <layout> <layout.border/> </layout> <size> <preferred> <dimension dimensionX="500" dimensionY="300"/> </preferred> <max> <dimension dimensionX="500" dimensionY="300"/> </max> <min> <dimension dimensionX="500" dimensionY="300"/> </min> </size> <border border="RAISED"> <insets insets.bottom="10" insets.left="10" insets.right="10" insets.top="10"/> </border> <toolbar opaque="false" toolbar.direction="horizontal" toolbar.float="false" toolbar.layout.border.constraint="NORTH"> <insets insets.bottom="5" insets.left="5" insets.right="5" insets.top="5"/> <toolbar.child> <component class.name="javax.swing.JLabel" editable="false" label.text="Select!" opaque="false" value.name="label" wordwrap="false"/> </toolbar.child> .....Now that it is easy to understand that any Swing based GUIs can be represented in XML if you are familiar with XML. (In case that it is not true for you, please understand that any Swing based GUIs can be represented in pre-formatted text file.) Moving the GUI-related part of our source code into the XML document makes it possible that we can concentrate on designing how our Class should work, without bothering about how it will be represented on the screen, and we can modify our GUI without touching any part of our source code. And this also ensures the integrity of our source code. Now all we need is the cool editor for writing such XML documents and the 'parser' which reads our XML documents and generate expected GUI. And voilà, OOP XMLPanelEdit Version 1.0! To make our life easier, I developed 'OOP XMLPanelEdit Version 1.0'(XMLPanelEdit for short), which consists of the editor for such XML documents and the corresponding parser which generates the GUI objects from these XML documents. I also prepared well-designed abstract Classes, which enable us to use 'XMLPanelEdit' without knowing about XML at all.
|
|
|
|
ALL CONTENTS COPYRIGHT 2001, OOP-Reserch. All rights reserved. |
||