Progress on the collation task
Posted by mholmes on 14 Jun 2007 in Activity log
Made a few steps forward:
- Fixed some GUI issues when the app starts for the first time, with no settings in the prefs. You have to be careful to get the initial values right, otherwise some components can be sized badly.
- Added icons to the buttons (mainly for Pro-D, but in the process I extended my CarefulResourceLoader class to handle Icon as well as IconImage).
- Figured out how to load an XML string from a text box into a DOM. This wasn't obvious from the standard examples, which assume you're loading a file from disk. For the record, here it is:
Document doc; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); String xml = "<?xml version=\"1.0\"?>\r\n" + jtpOutput.getText(); doc = builder.parse(new InputSource(new StringReader(xml)));
Next is using DOM methods to iterate over the readings and let the user choose whether they're substantive or not; then add the relevant attributes; then write the doc back as text to the text box.