/[classpath]/classpath/javax/swing/text/GapContent.java
ViewVC logotype

Diff of /classpath/javax/swing/text/GapContent.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.2.10 by gnu_andrew, Wed Nov 2 00:44:03 2005 UTC revision 1.5.2.11 by gnu_andrew, Sun Nov 27 21:00:42 2005 UTC
# Line 100  public class GapContent Line 100  public class GapContent
100      public int compareTo(Object o)      public int compareTo(Object o)
101      {      {
102        if (o instanceof Integer)        if (o instanceof Integer)
103        {          {
104          int otherMark = ((Integer) o).intValue();            int otherMark = ((Integer) o).intValue();
105          return mark - otherMark;            return mark - otherMark;
106        }          }
107        else        else
108        {          {
109          GapContentPosition other = (GapContentPosition) o;            GapContentPosition other = (GapContentPosition) o;
110          return mark - other.mark;            return mark - other.mark;
111        }          }
112      }      }
113    
114      /**      /**
# Line 644  public class GapContent Line 644  public class GapContent
644                                            new GapContentPosition(offset));                                            new GapContentPosition(offset));
645      if (index1 < 0)      if (index1 < 0)
646        index1 = -(index1 + 1);        index1 = -(index1 + 1);
647    
648        // Search the first index with the specified offset. The binarySearch does
649        // not necessarily find the first one.
650        while (index1 > 0
651            && ((GapContentPosition) positions.get(index1 - 1)).mark == offset)
652          index1--;
653    
654      for (ListIterator i = positions.listIterator(index1); i.hasNext();)      for (ListIterator i = positions.listIterator(index1); i.hasNext();)
655        {        {
656          GapContentPosition p = (GapContentPosition) i.next();          GapContentPosition p = (GapContentPosition) i.next();
# Line 672  public class GapContent Line 679  public class GapContent
679                                            new GapContentPosition(offset));                                            new GapContentPosition(offset));
680      if (index1 < 0)      if (index1 < 0)
681        index1 = -(index1 + 1);        index1 = -(index1 + 1);
682    
683        // Search the first index with the specified offset. The binarySearch does
684        // not necessarily find the first one.
685        while (index1 > 0
686            && ((GapContentPosition) positions.get(index1 - 1)).mark == offset)
687          index1--;
688    
689      for (ListIterator i = positions.listIterator(index1); i.hasNext();)      for (ListIterator i = positions.listIterator(index1); i.hasNext();)
690        {        {
691          GapContentPosition p = (GapContentPosition) i.next();          GapContentPosition p = (GapContentPosition) i.next();
# Line 700  public class GapContent Line 714  public class GapContent
714                                            new GapContentPosition(offset));                                            new GapContentPosition(offset));
715      if (index1 < 0)      if (index1 < 0)
716        index1 = -(index1 + 1);        index1 = -(index1 + 1);
717    
718        // Search the first index with the specified offset. The binarySearch does
719        // not necessarily find the first one.
720        while (index1 > 0
721            && ((GapContentPosition) positions.get(index1 - 1)).mark == offset)
722          index1--;
723      for (ListIterator i = positions.listIterator(index1); i.hasNext();)      for (ListIterator i = positions.listIterator(index1); i.hasNext();)
724        {        {
725          GapContentPosition p = (GapContentPosition) i.next();          GapContentPosition p = (GapContentPosition) i.next();

Legend:
Removed from v.1.5.2.10  
changed lines
  Added in v.1.5.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26