src/share/classes/javax/swing/text/GapContent.java

Print this page

        

*** 824,834 **** /** * Used to hold a reference to a Mark that is being reset as the * result of removing from the content. */ ! final class UndoPosRef { UndoPosRef(MarkData rec) { this.rec = rec; this.undoLocation = rec.getOffset(); } --- 824,834 ---- /** * Used to hold a reference to a Mark that is being reset as the * result of removing from the content. */ ! protected final class UndoPosRef { UndoPosRef(MarkData rec) { this.rec = rec; this.undoLocation = rec.getOffset(); }
*** 837,859 **** * receiver was instantiated. * * @param endOffset end location of inserted string. * @param g1 resulting end of gap. */ ! protected void resetLocation(int endOffset, int g1) { if (undoLocation != endOffset) { this.rec.index = undoLocation; } else { this.rec.index = g1; } } /** Previous Offset of rec. */ ! protected int undoLocation; /** Mark to reset offset. */ ! protected MarkData rec; } // End of GapContent.UndoPosRef /** * UnoableEdit created for inserts. --- 837,859 ---- * receiver was instantiated. * * @param endOffset end location of inserted string. * @param g1 resulting end of gap. */ ! void resetLocation(int endOffset, int g1) { if (undoLocation != endOffset) { this.rec.index = undoLocation; } else { this.rec.index = g1; } } /** Previous Offset of rec. */ ! private int undoLocation; /** Mark to reset offset. */ ! private MarkData rec; } // End of GapContent.UndoPosRef /** * UnoableEdit created for inserts.