@@ -423,33 +423,39 @@ public interface Document {
423
423
424
424
/**
425
425
* Removes a portion of the content of the document.
426
- * This will cause a DocumentEvent of type
427
- * DocumentEvent.EventType.REMOVE to be sent to the
428
- * registered DocumentListeners , unless an exception
426
+ * This will cause a {@code DocumentEvent} of type
427
+ * {@code DocumentEvent.EventType.REMOVE} to be sent to the
428
+ * registered {@code DocumentListener}s , unless an exception
429
429
* is thrown. The notification will be sent to the
430
- * listeners by calling the removeUpdate method on the
431
- * DocumentListeners .
430
+ * listeners by calling the {@code removeUpdate} method on the
431
+ * {@code DocumentListener} .
432
432
* <p>
433
433
* To ensure reasonable behavior in the face
434
434
* of concurrency, the event is dispatched after the
435
435
* mutation has occurred. This means that by the time a
436
436
* notification of removal is dispatched, the document
437
437
* has already been updated and any marks created by
438
- * < code> createPosition</code> have already changed.
438
+ * {@ code createPosition} have already changed.
439
439
* For a removal, the end of the removal range is collapsed
440
440
* down to the start of the range, and any marks in the removal
441
441
* range are collapsed down to the start of the range.
442
- * <p style="text-align:center"><img src="doc-files/Document-remove.gif"
442
+ * <p>
443
+ * For example, if the document contains the text
444
+ * <i>‘The quick brown fox’</i>,
445
+ * calling {@code remove(4, 6)} will remove the word
446
+ * <i>‘quick’</i> and the following space from the text,
447
+ * and all the marks in the range 4–10 will be collapsed to 4.
448
+ * <p style="text-align:center"><img src="doc-files/Document-remove.svg"
443
449
* alt="Diagram shows removal of 'quick' from 'The quick brown fox.'">
444
450
* <p>
445
- * If the Document structure changed as result of the removal,
446
- * the details of what Elements were inserted and removed in
451
+ * If the document structure changed as result of the removal,
452
+ * the details of what {@code Element}s were inserted and removed in
447
453
* response to the change will also be contained in the generated
448
- * DocumentEvent. It is up to the implementation of a Document
454
+ * {@code DocumentEvent} . It is up to the implementation of a {@code Document}
449
455
* to decide how the structure should change in response to a
450
456
* remove.
451
457
* <p>
452
- * If the Document supports undo/redo, an UndoableEditEvent will
458
+ * If the {@code Document} supports undo/redo, an {@code UndoableEditEvent} will
453
459
* also be generated.
454
460
*
455
461
* @param offs the offset from the beginning >= 0
0 commit comments