1 19 20 package org.netbeans.lib.editor.util.swing; 21 22 import java.util.Comparator ; 23 import java.util.List ; 24 import javax.swing.text.BadLocationException ; 25 import javax.swing.text.Document ; 26 import javax.swing.text.Position ; 27 28 37 38 public class MutablePositionRegion extends PositionRegion { 39 40 46 public MutablePositionRegion(Position startPosition, Position endPosition) { 47 super(startPosition, endPosition); 48 } 49 50 54 public MutablePositionRegion(Document doc, int startOffset, int endOffset) throws BadLocationException { 55 this(doc.createPosition(startOffset), doc.createPosition(endOffset)); 56 } 57 58 67 public final void reset(Position startPosition, Position endPosition) { 68 resetImpl(startPosition, endPosition); 69 } 70 71 79 public final void setStartPosition(Position startPosition) { 80 setStartPositionImpl(startPosition); 81 } 82 83 91 public final void setEndPosition(Position endPosition) { 92 setEndPositionImpl(endPosition); 93 } 94 95 } 96 | Popular Tags |