[FOray-commit] SF.net SVN: foray: [7921] trunk/foray/foray-fotree/src/java/org/foray/ fotree
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-05 23:37:13
|
Revision: 7921
http://svn.sourceforge.net/foray/?rev=7921&view=rev
Author: victormote
Date: 2006-09-05 16:37:00 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -47,12 +47,12 @@
*/
public class FOText extends FONode implements FOLineText, org.axsl.foR.FOText {
+ public static final char DISCARD_CHAR = 0xFFFF;
+
private static final int IS_WORD_CHAR_FALSE = 0;
private static final int IS_WORD_CHAR_TRUE = 1;
private static final int IS_WORD_CHAR_MAYBE = 2;
- public static final char DISCARD_CHAR = 0xFFFF;
-
/* Following is a list of constants that can be used to describe the
* filtering status of this object's text.
* The order of filtering is as follows:
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -87,8 +87,8 @@
private GraphicServer graphicServer;
private TextServer textServer;
private FontConsumer fontConsumer;
- URL[] graphicSearchPath;
- boolean cachingGraphics;
+ private URL[] graphicSearchPath;
+ private boolean cachingGraphics;
public FOTreeBuilder(final FOrayFOTreeServer server, final Log logger) {
this.server = server;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -55,9 +55,9 @@
protected ArrayList children = new ArrayList();
private PropertyList propertyList;
- protected String systemId;
- protected int line;
- protected int column;
+ private String systemId;
+ private int line;
+ private int column;
protected FObj(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -59,7 +59,7 @@
* Map whose key is a String of the namespace URI, and whose value is
* a Namespace instance that knows how to parse items in that namespace.
*/
- protected HashMap namespaceMap = new HashMap();
+ private HashMap namespaceMap = new HashMap();
private NamespaceFO namespaceFO;
private NamespaceExtensions namespaceExtensions;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -52,15 +52,15 @@
* repeatedly, e.g. in a page header or footer. */
protected Graphic graphic;
+ /** Pixel density to be used as a fallback value for intrinsic size
+ * computations. */
+ protected int pixelsPerInch = 96;
+
/** Set to true if we have already attempted to set #graphic with a
* resolved value. If makeGraphicAttempted is true and #graphic is null,
* then the Graphic could not be resolved. */
private boolean makeGraphicAttempted = false;
- /** Pixel density to be used as a fallback value for intrinsic size
- * computations. */
- protected int pixelsPerInch = 96;
-
public ExternalGraphic(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
super(parent, propertyList, systemId, line, column);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,14 +42,14 @@
*/
public class BackgroundImage extends Property {
- /** Cache the graphic in case it is requested more than once. */
- private Graphic graphic = null;
-
public static final short[] validKeywords = {
Constants.FOVAL_NONE,
Constants.FOVAL_INHERIT,
};
+ /** Cache the graphic in case it is requested more than once. */
+ private Graphic graphic = null;
+
public BackgroundImage(final PropertyList propertyList,
final short enumeration, final String propertyFullName,
final String attributeValue)
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -45,6 +45,10 @@
*/
public class BorderWidth extends Property {
+ public static final int BORDER_WIDTH_THIN = 500; // .5 points
+ public static final int BORDER_WIDTH_MEDIUM = 1000; // 1 point
+ public static final int BORDER_WIDTH_THICK = 2000; // 2 points
+
protected static final short[] validKeywords = {
Constants.FOVAL_THIN,
Constants.FOVAL_MEDIUM,
@@ -52,10 +56,6 @@
Constants.FOVAL_INHERIT,
};
- public static final int BORDER_WIDTH_THIN = 500; // .5 points
- public static final int BORDER_WIDTH_MEDIUM = 1000; // 1 point
- public static final int BORDER_WIDTH_THICK = 2000; // 2 points
-
public BorderWidth(final PropertyList propertyList, final short enumeration,
final String propertyFullName, final String attributeValue)
throws PropertyException {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -37,6 +37,8 @@
*/
public class ObjectMakerExtensions {
+ public static final byte CONTINUED_LABEL = 1;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -46,8 +48,6 @@
"continued-label",
};
- public static final byte CONTINUED_LABEL = 1;
-
/**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -59,6 +59,18 @@
private Stack stkFunction; // Stack of functions being evaluated
/**
+ * Private constructor. Called by the static parse() method.
+ * @param propertyList The PropertyList instance providing the context in
+ * which the parser should evaluate <code>expression</code>.
+ * @param expression The XML attribute which will be parsed.
+ */
+ private PropertyParser(final PropertyList propertyList,
+ final String expression) {
+ super(expression);
+ this.propertyList = propertyList;
+ }
+
+ /**
* Public entrypoint to the Property expression parser.
* @param expr The specified value (attribute on the xml element).
* @param propertyList The PropertyList instance providing the context in
@@ -72,20 +84,7 @@
return parser.parseProperty();
}
-
/**
- * Private constructor. Called by the static parse() method.
- * @param propertyList The PropertyList instance providing the context in
- * which the parser should evaluate <code>expression</code>.
- * @param expression The XML attribute which will be parsed.
- */
- private PropertyParser(final PropertyList propertyList,
- final String expression) {
- super(expression);
- this.propertyList = propertyList;
- }
-
- /**
* Parse the property expression described in the instance variables.
* Note: If the property expression String is empty, a StringProperty
* object holding an empty String is returned.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -52,9 +52,33 @@
static final int TOK_FLOAT = TOK_COLORSPEC + 1;
static final int TOK_INTEGER = TOK_FLOAT + 1;
+ private static final int CS = 1;
+
+ /* "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; */
+ private static final int nameStartChars = 1;
+ private static final int C = 2;
+ private static final int D = 4;
+ private static final int digits = 4; //"0123456789";
+ private static final int H = 8;
+ private static final int hexchars = 8; //digits + "abcdefABCDEF";
+ private static final int C_CS = C + CS;
+
+
+ private static final int charMap[] = {
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x00
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x10
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,C,C,0, //0x20
+ C+D+H,C+D+H,C+D+H,C+D+H, C+D+H,C+D+H,C+D+H,C+D+H,
+ C+D+H,C+D+H,0,0, 0,0,0,0, //0x30
+ 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x40
+ CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,CS, //0x50
+ 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x60
+ CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,0 //0x70
+ };
+
+ protected int currentUnitLength = 0;
int currentToken = TOK_EOF;
String currentTokenValue = null;
- protected int currentUnitLength = 0;
private int currentTokenStartIndex = 0;
private /* final */ String expr;
@@ -296,30 +320,6 @@
return false;
}
- private static final int CS = 1;
-
- /* "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; */
- private static final int nameStartChars = 1;
- private static final int C = 2;
- private static final int D = 4;
- private static final int digits = 4; //"0123456789";
- private static final int H = 8;
- private static final int hexchars = 8; //digits + "abcdefABCDEF";
- private static final int C_CS = C + CS;
-
-
- private static final int charMap[] = {
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x00
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x10
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,C,C,0, //0x20
- C+D+H,C+D+H,C+D+H,C+D+H, C+D+H,C+D+H,C+D+H,C+D+H,
- C+D+H,C+D+H,0,0, 0,0,0,0, //0x30
- 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x40
- CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,CS, //0x50
- 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x60
- CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,0 //0x70
- };
-
/**
* Return a boolean value indicating whether the argument is a
* decimal digit (0-9).
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -38,6 +38,57 @@
*/
public class ObjectMakerSVG {
+ public static final byte A = 1;
+ public static final byte ALTGLYPH = 2;
+ public static final byte ANIMATE = 3;
+ public static final byte ANIMATECOLOR = 4;
+ public static final byte ANIMATEMOTION = 5;
+ public static final byte ANIMATETRANSFORM = 6;
+ public static final byte CIRCLE = 7;
+ public static final byte CLIPPATH = 8;
+ public static final byte CURSOR = 9;
+ public static final byte DEFS = 10;
+ public static final byte DESC = 11;
+ public static final byte ELLIPSE = 12;
+ public static final byte FEFLOOD = 13;
+ public static final byte FEGAUSSIANBLUR = 14;
+ public static final byte FEMERGE = 15;
+ public static final byte FEMERGENODE = 16;
+ public static final byte FEOFFSET = 17;
+ public static final byte FILTER = 18;
+ public static final byte FONT = 19;
+ public static final byte FONT_FACE = 20;
+ public static final byte FONT_FACE_SRC = 21;
+ public static final byte FONT_FACE_URI = 22;
+ public static final byte G = 23;
+ public static final byte GLYPH = 24;
+ public static final byte HKERN = 25;
+ public static final byte IMAGE = 26;
+ public static final byte LINE = 27;
+ public static final byte LINEARGRADIENT = 28;
+ public static final byte MARKER = 29;
+ public static final byte MASK = 30;
+ public static final byte MISSING_GLYPH = 31;
+ public static final byte PATH = 32;
+ public static final byte PATTERN = 33;
+ public static final byte POLYGON = 34;
+ public static final byte POLYLINE = 35;
+ public static final byte RADIALGRADIENT = 36;
+ public static final byte RECT = 37;
+ public static final byte SET = 38;
+ public static final byte STOP = 39;
+ public static final byte STYLE = 40;
+ public static final byte SVG = 41;
+ public static final byte SWITCH = 42;
+ public static final byte SYMBOL = 43;
+ public static final byte TEXT = 44;
+ public static final byte TEXTPATH = 45;
+ public static final byte TITLE = 46;
+ public static final byte TREF = 47;
+ public static final byte TSPAN = 48;
+ public static final byte USE = 49;
+ public static final byte VKERN = 50;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -96,58 +147,6 @@
"vkern",
};
- public static final byte A = 1;
- public static final byte ALTGLYPH = 2;
- public static final byte ANIMATE = 3;
- public static final byte ANIMATECOLOR = 4;
- public static final byte ANIMATEMOTION = 5;
- public static final byte ANIMATETRANSFORM = 6;
- public static final byte CIRCLE = 7;
- public static final byte CLIPPATH = 8;
- public static final byte CURSOR = 9;
- public static final byte DEFS = 10;
- public static final byte DESC = 11;
- public static final byte ELLIPSE = 12;
- public static final byte FEFLOOD = 13;
- public static final byte FEGAUSSIANBLUR = 14;
- public static final byte FEMERGE = 15;
- public static final byte FEMERGENODE = 16;
- public static final byte FEOFFSET = 17;
- public static final byte FILTER = 18;
- public static final byte FONT = 19;
- public static final byte FONT_FACE = 20;
- public static final byte FONT_FACE_SRC = 21;
- public static final byte FONT_FACE_URI = 22;
- public static final byte G = 23;
- public static final byte GLYPH = 24;
- public static final byte HKERN = 25;
- public static final byte IMAGE = 26;
- public static final byte LINE = 27;
- public static final byte LINEARGRADIENT = 28;
- public static final byte MARKER = 29;
- public static final byte MASK = 30;
- public static final byte MISSING_GLYPH = 31;
- public static final byte PATH = 32;
- public static final byte PATTERN = 33;
- public static final byte POLYGON = 34;
- public static final byte POLYLINE = 35;
- public static final byte RADIALGRADIENT = 36;
- public static final byte RECT = 37;
- public static final byte SET = 38;
- public static final byte STOP = 39;
- public static final byte STYLE = 40;
- public static final byte SVG = 41;
- public static final byte SWITCH = 42;
- public static final byte SYMBOL = 43;
- public static final byte TEXT = 44;
- public static final byte TEXTPATH = 45;
- public static final byte TITLE = 46;
- public static final byte TREF = 47;
- public static final byte TSPAN = 48;
- public static final byte USE = 49;
- public static final byte VKERN = 50;
-
-
/**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,6 +42,9 @@
*/
public class DtColor extends Datatype implements ExprColor {
+ public static final Color COLOR_RGB_TRANSPARENT = new Color(255, 255, 255,
+ 0);
+
/**
* Alphabetical list of named colors supported by XSL-FO.
* The list is kept in alphabetical order to facilitate binary searches.
@@ -233,9 +236,6 @@
new Color(154, 205, 50) // yellowgreen
*/
- public static final Color COLOR_RGB_TRANSPARENT = new Color(255, 255, 255,
- 0);
-
/**
* List of DtColor instances created. The purpose of this list is to
* prevent identical colors from being created more than once.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,6 +42,8 @@
public class DtWritingMode extends Datatype implements
org.axsl.foR.WritingMode {
+ private static HashMap writingModes = new HashMap();
+
private byte ipdOdd;
private byte ipdEven;
private byte bpd;
@@ -49,8 +51,6 @@
private byte shiftEven;
private boolean paired;
- private static HashMap writingModes = new HashMap();
-
/**
* Constructor.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -36,6 +36,9 @@
*/
public class PropertyMakerXML {
+ public static final short OFFSET_FROM_PROPERTY_NAME_LIST = 500;
+ public static final short LANG = 501;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -45,9 +48,6 @@
"lang",
};
- public static final short OFFSET_FROM_PROPERTY_NAME_LIST = 500;
- public static final short LANG = 501;
-
/**
* Converts a property name to its integral equivalent.
* @param propertyName The property name to be enumerated.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|