~adrian-wilkins/ubuntu/quantal/freemind/fix-file-association

« back to all changes in this revision

Viewing changes to freemind/freemind/main/XMLElement.java

  • Committer: Bazaar Package Importer
  • Author(s): Eric Lavarde
  • Date: 2005-01-08 19:37:05 UTC
  • Revision ID: james.westby@ubuntu.com-20050108193705-271m5dryt7fv0gwa
Tags: 0.7.1-6
* Added "gtk" as LookAndFeel possibility, as well as the possibility to
  enter directly the Look&Feel class name (Closes: #288512).
* Renamed 'enum' to 'enumerator' in XMLElement.java; this is _not_ a promise
  to support Java 1.5, Java 1.5 support will come only officially with
  version >= 0.8.0 (Closes: #288506).
* Removed JAVA_HOME from debian/rules (Closes: #288505).
* Removed bashisms from freemind.sh, making it POSIX conform (Closes:
  #289067).

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 * The following example shows how to list the attributes of an element:
66
66
 * <UL><CODE>
67
67
 * XMLElement element = ...;<BR>
68
 
 * Enumeration enum = element.getAttributeNames();<BR>
69
 
 * while (enum.hasMoreElements()) {<BR>
70
 
 * &nbsp;&nbsp;&nbsp;&nbsp;String key = (String) enum.nextElement();<BR>
 
68
 * Enumeration enumerator = element.getAttributeNames();<BR>
 
69
 * while (enumerator.hasMoreElements()) {<BR>
 
70
 * &nbsp;&nbsp;&nbsp;&nbsp;String key = (String) enumerator.nextElement();<BR>
71
71
 * &nbsp;&nbsp;&nbsp;&nbsp;String value = element.getStringAttribute(key);<BR>
72
72
 * &nbsp;&nbsp;&nbsp;&nbsp;System.out.println(key + " = " + value);<BR>
73
73
 * }
480
480
        this.children = new Vector();
481
481
        this.entities = entities;
482
482
        this.lineNr = 0;
483
 
        Enumeration enum = this.entities.keys();
484
 
        while (enum.hasMoreElements()) {
485
 
            Object key = enum.nextElement();
 
483
        Enumeration enumerator = this.entities.keys();
 
484
        while (enumerator.hasMoreElements()) {
 
485
            Object key = enumerator.nextElement();
486
486
            Object value = this.entities.get(key);
487
487
            if (value instanceof String) {
488
488
                value = ((String) value).toCharArray();
2194
2194
        writer.write('<');
2195
2195
        writer.write(this.name);
2196
2196
        if (! this.attributes.isEmpty()) {
2197
 
            Enumeration enum = this.attributes.keys();
2198
 
            while (enum.hasMoreElements()) {
 
2197
            Enumeration enumerator = this.attributes.keys();
 
2198
            while (enumerator.hasMoreElements()) {
2199
2199
                writer.write(' ');
2200
 
                String key = (String) enum.nextElement();
 
2200
                String key = (String) enumerator.nextElement();
2201
2201
                String value = (String) this.attributes.get(key);
2202
2202
                writer.write(key);
2203
2203
                writer.write('='); writer.write('"');
2224
2224
        } else {
2225
2225
            writer.write('>');
2226
2226
            writer.write('\n');
2227
 
            Enumeration enum = this.enumerateChildren();
2228
 
            while (enum.hasMoreElements()) {
2229
 
                XMLElement child = (XMLElement) enum.nextElement();
 
2227
            Enumeration enumerator = this.enumerateChildren();
 
2228
            while (enumerator.hasMoreElements()) {
 
2229
                XMLElement child = (XMLElement) enumerator.nextElement();
2230
2230
                child.write(writer);
2231
2231
            }
2232
2232
            if (withClosingTag) {