/[classpath]/classpath/javax/swing/text/AbstractDocument.java
ViewVC logotype

Diff of /classpath/javax/swing/text/AbstractDocument.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by rabbit78, Thu Nov 17 20:31:51 2005 UTC revision 1.40 by rabbit78, Wed Nov 23 14:12:39 2005 UTC
# Line 544  public abstract class AbstractDocument i Line 544  public abstract class AbstractDocument i
544      insertUpdate(event, attributes);      insertUpdate(event, attributes);
545      writeUnlock();      writeUnlock();
546    
547      fireInsertUpdate(event);      if (event.modified)
548          fireInsertUpdate(event);
549      if (undo != null)      if (undo != null)
550        fireUndoableEditUpdate(new UndoableEditEvent(this, undo));        fireUndoableEditUpdate(new UndoableEditEvent(this, undo));
551    }    }
# Line 1809  public abstract class AbstractDocument i Line 1810  public abstract class AbstractDocument i
1810      Hashtable changes;      Hashtable changes;
1811    
1812      /**      /**
1813         * Indicates if this event has been modified or not. This is used to
1814         * determine if this event is thrown.
1815         */
1816        boolean modified;
1817    
1818        /**
1819       * Creates a new <code>DefaultDocumentEvent</code>.       * Creates a new <code>DefaultDocumentEvent</code>.
1820       *       *
1821       * @param offset the starting offset of the change       * @param offset the starting offset of the change
# Line 1822  public abstract class AbstractDocument i Line 1829  public abstract class AbstractDocument i
1829        this.length = length;        this.length = length;
1830        this.type = type;        this.type = type;
1831        changes = new Hashtable();        changes = new Hashtable();
1832          modified = false;
1833      }      }
1834    
1835      /**      /**
# Line 1836  public abstract class AbstractDocument i Line 1844  public abstract class AbstractDocument i
1844        // XXX - Fully qualify ElementChange to work around gcj bug #2499.        // XXX - Fully qualify ElementChange to work around gcj bug #2499.
1845        if (edit instanceof DocumentEvent.ElementChange)        if (edit instanceof DocumentEvent.ElementChange)
1846          {          {
1847              modified = true;
1848            DocumentEvent.ElementChange elEdit =            DocumentEvent.ElementChange elEdit =
1849              (DocumentEvent.ElementChange) edit;              (DocumentEvent.ElementChange) edit;
1850            changes.put(elEdit.getElement(), elEdit);            changes.put(elEdit.getElement(), elEdit);

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26