Changeset 1677 in josm for trunk/src/org/openstreetmap/josm/gui/historycombobox/EventConsumingPlainDocument.java
- Timestamp:
- 17.06.2009 10:04:22 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/historycombobox/EventConsumingPlainDocument.java
r1575 r1677 1 1 /* Copyright (c) 2008, Henrik Niehaus 2 2 * All rights reserved. 3 * 3 * 4 4 * Redistribution and use in source and binary forms, with or without 5 5 * modification, are permitted provided that the following conditions are met: 6 * 6 * 7 7 * 1. Redistributions of source code must retain the above copyright notice, 8 8 * this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * this list of conditions and the following disclaimer in the documentation 9 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * this list of conditions and the following disclaimer in the documentation 11 11 * and/or other materials provided with the distribution. 12 * 3. Neither the name of the project nor the names of its 13 * contributors may be used to endorse or promote products derived from this 12 * 3. Neither the name of the project nor the names of its 13 * contributors may be used to endorse or promote products derived from this 14 14 * software without specific prior written permission. 15 * 15 * 16 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE … … 33 33 34 34 public class EventConsumingPlainDocument extends PlainDocument { 35 private boolean consumeEvents;35 private boolean consumeEvents; 36 36 37 public boolean isConsumeEvents() {38 return consumeEvents;39 }37 public boolean isConsumeEvents() { 38 return consumeEvents; 39 } 40 40 41 public void setConsumeEvents(boolean consumeEvents) {42 this.consumeEvents = consumeEvents;43 }41 public void setConsumeEvents(boolean consumeEvents) { 42 this.consumeEvents = consumeEvents; 43 } 44 44 45 @Override46 protected void fireChangedUpdate(DocumentEvent e) {47 if(!consumeEvents) {48 super.fireChangedUpdate(e);49 }50 }45 @Override 46 protected void fireChangedUpdate(DocumentEvent e) { 47 if(!consumeEvents) { 48 super.fireChangedUpdate(e); 49 } 50 } 51 51 52 @Override53 protected void fireInsertUpdate(DocumentEvent e) {54 if(!consumeEvents) {55 super.fireInsertUpdate(e);56 }57 }52 @Override 53 protected void fireInsertUpdate(DocumentEvent e) { 54 if(!consumeEvents) { 55 super.fireInsertUpdate(e); 56 } 57 } 58 58 59 @Override60 protected void fireRemoveUpdate(DocumentEvent e) {61 if(!consumeEvents) {62 super.fireRemoveUpdate(e);63 }64 }59 @Override 60 protected void fireRemoveUpdate(DocumentEvent e) { 61 if(!consumeEvents) { 62 super.fireRemoveUpdate(e); 63 } 64 } 65 65 66 @Override67 protected void fireUndoableEditUpdate(UndoableEditEvent e) {68 if(!consumeEvents) {69 super.fireUndoableEditUpdate(e);70 }71 }72 73 66 @Override 67 protected void fireUndoableEditUpdate(UndoableEditEvent e) { 68 if(!consumeEvents) { 69 super.fireUndoableEditUpdate(e); 70 } 71 } 72 73 74 74 }
Note: See TracChangeset
for help on using the changeset viewer.
