CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Roman Kennke <[EMAIL PROTECTED]> 06/05/18 14:16:11
Modified files: javax/swing/text: GapContent.java . : ChangeLog Log message: 2006-05-18 Roman Kennke <[EMAIL PROTECTED]> PR 26368 * javax/swing/text/GapContent.java (GapContentPosition(int)): Use adapted binarySearch method to allow for having a greater array than number of entries. (numMarks): New field, holds the end of the marks list. (GapContent): Initialize positionMarks with size of 10 instead of 0. (shiftGapStartDown): Adjusted for new setPositionsInRange signature. (shiftGapEndUp): Adjusted for new setPositionsInRange signature. (setPositionsInRange): Changed signature to narrow the purpose and special cases inside. Reimplemented to crunch together equal marks. (adjustPositionsInRange): Added assertion to make sure we do not accidentally change the order of the mark. Added some debug output for a special case of which I don't know if it even exists. (resetMarksAtZero): Made impl simpler. (dumpMarks): New debug helper method. (insertMark): Grow array in bigger chunks to avoid excessive copying. (binarySearch): New method. An adaption of Arrays.binarySearch() that allows for an maxIndex parameter. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/GapContent.java.diff?tr1=1.47&tr2=1.48&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.7469&tr2=1.7470&r1=text&r2=text