Mercurial > projects > dwt-addons
comparison dwtx/jface/text/GapTextStore.d @ 133:7d818bd32d63
Fix ctors to this with gvim regexp
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:29:22 +0200 |
parents | c4fb132a086c |
children | 51e6e63f930e |
comparison
equal
deleted
inserted
replaced
132:77bd3bb3d7b8 | 133:7d818bd32d63 |
---|---|
221 * does not fit | 221 * does not fit |
222 * @param highWatermark if the gap is ever larger than this, it will automatically be shrunken | 222 * @param highWatermark if the gap is ever larger than this, it will automatically be shrunken |
223 * (>= 0) | 223 * (>= 0) |
224 * @deprecated use {@link GapTextStore#GapTextStore(int, int, float)} instead | 224 * @deprecated use {@link GapTextStore#GapTextStore(int, int, float)} instead |
225 */ | 225 */ |
226 public GapTextStore(int lowWatermark, int highWatermark) { | 226 public this(int lowWatermark, int highWatermark) { |
227 /* | 227 /* |
228 * Legacy constructor. The API contract states that highWatermark is the upper bound for the | 228 * Legacy constructor. The API contract states that highWatermark is the upper bound for the |
229 * gap size. Albeit this contract was not previously adhered to, it is now: The allocated | 229 * gap size. Albeit this contract was not previously adhered to, it is now: The allocated |
230 * gap size is fixed at half the highWatermark. Since the threshold is always twice the | 230 * gap size is fixed at half the highWatermark. Since the threshold is always twice the |
231 * allocated gap size, the gap will never grow larger than highWatermark. Previously, the | 231 * allocated gap size, the gap will never grow larger than highWatermark. Previously, the |
244 * Equivalent to | 244 * Equivalent to |
245 * {@linkplain GapTextStore#GapTextStore(int, int, float) new GapTextStore(256, 4096, 0.1f)}. | 245 * {@linkplain GapTextStore#GapTextStore(int, int, float) new GapTextStore(256, 4096, 0.1f)}. |
246 * | 246 * |
247 * @since 3.3 | 247 * @since 3.3 |
248 */ | 248 */ |
249 public GapTextStore() { | 249 public this() { |
250 this(256, 4096, 0.1f); | 250 this(256, 4096, 0.1f); |
251 } | 251 } |
252 | 252 |
253 /** | 253 /** |
254 * Creates an empty text store that uses re-allocation thresholds relative to the content | 254 * Creates an empty text store that uses re-allocation thresholds relative to the content |
273 * @param maxSize the maximum gap size to allocate (>= minSize; use | 273 * @param maxSize the maximum gap size to allocate (>= minSize; use |
274 * {@link Integer#MAX_VALUE} for no maximum) | 274 * {@link Integer#MAX_VALUE} for no maximum) |
275 * @param maxGapFactor is the maximum fraction of the array that is occupied by the gap (<code>0 <= maxGapFactor <= 1</code>) | 275 * @param maxGapFactor is the maximum fraction of the array that is occupied by the gap (<code>0 <= maxGapFactor <= 1</code>) |
276 * @since 3.3 | 276 * @since 3.3 |
277 */ | 277 */ |
278 public GapTextStore(int minSize, int maxSize, float maxGapFactor) { | 278 public this(int minSize, int maxSize, float maxGapFactor) { |
279 Assert.isLegal(0f <= maxGapFactor && maxGapFactor <= 1f); | 279 Assert.isLegal(0f <= maxGapFactor && maxGapFactor <= 1f); |
280 Assert.isLegal(0 <= minSize && minSize <= maxSize); | 280 Assert.isLegal(0 <= minSize && minSize <= maxSize); |
281 fMinGapSize= minSize; | 281 fMinGapSize= minSize; |
282 fMaxGapSize= maxSize; | 282 fMaxGapSize= maxSize; |
283 fSizeMultiplier= 1 / (1 - maxGapFactor / 2); | 283 fSizeMultiplier= 1 / (1 - maxGapFactor / 2); |