69 |
if(finalized) |
if(finalized) |
70 |
throw new ImmutableException("Already saved; can't append"); |
throw new ImmutableException("Already saved; can't append"); |
71 |
current.append(ch); |
current.append(ch); |
72 |
return new ScrollBlockManager.SimpleTextSpan(this, current.length()-1, current.length()); |
return new StdTextSpan(this, current.length()-1, current.length()); |
73 |
} |
} |
74 |
|
|
75 |
public TextSpan append(String s) throws ImmutableException { |
public TextSpan append(String s) throws ImmutableException { |
77 |
throw new ImmutableException("Already saved; can't append"); |
throw new ImmutableException("Already saved; can't append"); |
78 |
int l = s.length(); |
int l = s.length(); |
79 |
current.append(s); |
current.append(s); |
80 |
return new ScrollBlockManager.SimpleTextSpan(this, current.length()-l, current.length()); |
return new StdTextSpan(this, current.length()-l, current.length()); |
81 |
} |
} |
82 |
|
|
83 |
public Span getCurrent() { |
public Span getCurrent() { |
84 |
return new ScrollBlockManager.SimpleTextSpan(this, 0, current.length()); |
return new StdTextSpan(this, 0, current.length()); |
85 |
} |
} |
86 |
|
|
87 |
public Span getSpan(int offs1, int offs2) { |
public Span getSpan(int offs1, int offs2) { |
88 |
return new ScrollBlockManager.SimpleTextSpan( |
return new StdTextSpan(this, offs1, offs2); |
|
this, offs1, offs2); |
|
89 |
} |
} |
90 |
|
|
91 |
|
|