Revision: 7895
http://svn.sourceforge.net/foray/?rev=7895&view=rev
Author: victormote
Date: 2006-09-04 17:51:27 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Cleanup magic numbers and other style issues.
Modified Paths:
--------------
trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-05 00:12:08 UTC (rev 7894)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-05 00:51:27 UTC (rev 7895)
@@ -45,6 +45,8 @@
*/
public abstract class LineBreaker implements org.axsl.text.line.LineBreaker {
+ private static final int LINE_COUNT_INCREMENT = 20;
+
/** The "parent" TextServer. */
protected TextServer server;
@@ -86,7 +88,7 @@
* application is responsible to provide these values, but they are stored
* here for reference.
*/
- LineOutput[] outputLines = new LineOutput[20];
+ LineOutput[] outputLines = new LineOutput[LINE_COUNT_INCREMENT];
/**
* Index into {@link #outputLines} indicating which one was last requested
@@ -387,7 +389,7 @@
return;
}
// Make a new array.
- final int newSize = this.outputLines.length + 20;
+ final int newSize = this.outputLines.length + LINE_COUNT_INCREMENT;
final LineOutput[] newArray = new LineOutput[newSize];
// Copy the old to the new.
System.arraycopy(this.outputLines, 0, newArray, 0,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|