[FOray-commit] SF.net SVN: foray: [7980] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-08 00:11:06
|
Revision: 7980
http://svn.sourceforge.net/foray/?rev=7980&view=rev
Author: victormote
Date: 2006-09-07 17:10:41 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/Main.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -39,7 +39,17 @@
/**
* Command-line entry point to the FOray application.
*/
-public class FOray {
+public final class FOray {
+
+ /**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private FOray() { }
+
+ /**
+ * Main command-line entry point to FOray.
+ */
public static void main(final String[] args) {
CommandLineOptions options = null;
final Log logger = Logging.makeDefaultLogger();
Modified: trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -43,10 +43,16 @@
* sun.misc.Service does, but that should not be relied on. Hopefully it will
* be part of standard jdk sometime.
*/
-public class ClassService {
+public final class ClassService {
static HashMap providerMap = new HashMap();
+ /**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private ClassService() { }
+
public static synchronized Enumeration providers(final Class cls) {
ClassLoader cl = cls.getClassLoader();
// null if loaded by bootstrap class loader
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -59,7 +59,7 @@
* {@link ProtocolRegistrationStrategy} which may be a useful starting place for
* custom implementations.</p>
*/
-public class ProtocolRegistrationBroker {
+public final class ProtocolRegistrationBroker {
public static final byte UNIVERSAL_REGISTRATION_STRATEGY = 1;
public static final byte PROPERTY_REGISTRATION_STRATEGY = 2;
@@ -69,6 +69,12 @@
private static ProtocolRegistrationStrategy strategy = null;
/**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private ProtocolRegistrationBroker() { }
+
+ /**
* Factory method that knows how to create any of the standard URL Protocol
* Registration strategies.
* @param strategy One of {@link #UNIVERSAL_REGISTRATION_STRATEGY},
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -100,9 +100,15 @@
* Factory class for creating objects in the "fo:" (Formatting Objects)
* namespace.
*/
-public class ObjectMakerFO {
+public final class ObjectMakerFO {
/**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private ObjectMakerFO() { }
+
+ /**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
* @return The enumerated value of the object name.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -149,9 +149,15 @@
* Factory class for creating properties in the "fo:" (Formatting Objects)
* namespaces.
*/
-public class PropertyMakerFO {
+public final class PropertyMakerFO {
/**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private PropertyMakerFO() { }
+
+ /**
* Converts a property name to its integral equivalent.
* @param propertyName The property name to be enumerated.
* @return The enumerated value of the property name.
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-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -39,7 +39,7 @@
/**
* Factory class for creating formatting objects in the "foray" namespace.
*/
-public class ObjectMakerExtensions {
+public final class ObjectMakerExtensions {
public static final byte CONTINUED_LABEL = 1;
@@ -53,6 +53,12 @@
};
/**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private ObjectMakerExtensions() { }
+
+ /**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
* @return The enumerated value of the object name.
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-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -40,7 +40,7 @@
/**
* Factory class for creating formatting objects in the "svg" namespace.
*/
-public class ObjectMakerSVG {
+public final class ObjectMakerSVG {
public static final byte A = 1;
public static final byte ALTGLYPH = 2;
@@ -152,6 +152,12 @@
};
/**
+ * Private constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private ObjectMakerSVG() { }
+
+ /**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
* @return The enumerated value of the object name.
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-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -38,7 +38,7 @@
/**
* Class for parsing attributes in the xml: namespace.
*/
-public class PropertyMakerXML {
+public final class PropertyMakerXML {
public static final short OFFSET_FROM_PROPERTY_NAME_LIST = 500;
public static final short LANG = 501;
@@ -53,6 +53,12 @@
};
/**
+ * Private constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private PropertyMakerXML() { }
+
+ /**
* Converts a property name to its integral equivalent.
* @param propertyName The property name to be enumerated.
* @return The enumerated value of the property name.
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -33,7 +33,7 @@
/**
* Utility class representating the Pioneer Layout status of an FO.
*/
-public abstract class Status {
+public final class Status {
public static final int UNKNOWN = -1;
public static final int OK = 1;
@@ -45,6 +45,12 @@
public static final int FORCE_COLUMN_BREAK = 7;
public static final int KEEP_WITH_NEXT = 8;
+ /**
+ * Private Constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private Status() { }
+
public static boolean isIncomplete(final int code) {
return ((code != OK) && (code != KEEP_WITH_NEXT));
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/Main.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/Main.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/Main.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -32,8 +32,14 @@
/**
* @author Jeremias Maerki
*/
-public class Main {
+public final class Main {
+ /**
+ * Private constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private Main() { }
+
public static void main(final String[] args) {
try {
if (args == null
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-08 00:10:41 UTC (rev 7980)
@@ -44,11 +44,17 @@
/**
* Some utilities for creating svg DOM documents and elements.
*/
-public class SVGUtilities {
+public final class SVGUtilities {
+
static final String SVG_NS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+ /**
+ * Private constructor. This is a utility class and should never be
+ * instantiated.
+ */
+ private SVGUtilities() { }
- public static final Document createSVGDocument(final float width,
+ public static Document createSVGDocument(final float width,
final float height) {
final DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
@@ -64,7 +70,7 @@
/**
* Get the string width for a particular string given the font.
*/
- public static final float getStringWidth(final String str,
+ public static float getStringWidth(final String str,
final Font font) {
final Rectangle2D rect =
font.getStringBounds(str, 0, str.length(),
@@ -76,7 +82,7 @@
/**
* Get the string height for a particular string given the font.
*/
- public static final float getStringHeight(final String str,
+ public static float getStringHeight(final String str,
final Font font) {
final Rectangle2D rect =
font.getStringBounds(str, 0, str.length(),
@@ -88,7 +94,7 @@
/**
* Get the string bounds for a particular string given the font.
*/
- public static final Rectangle2D getStringBounds(final String str,
+ public static Rectangle2D getStringBounds(final String str,
final Font font) {
return font.getStringBounds(str, 0, str.length(),
new FontRenderContext(new AffineTransform(), true, true));
@@ -97,7 +103,7 @@
/**
* Create an SVG Line
*/
- public static final Element createLine(final Document doc, final float x,
+ public static Element createLine(final Document doc, final float x,
final float y, final float x2, final float y2) {
final Element ellipse = doc.createElementNS(SVGUtilities.SVG_NS,
"line");
@@ -111,7 +117,7 @@
/**
* Create an SVG Ellipse
*/
- public static final Element createEllipse(final Document doc,
+ public static Element createEllipse(final Document doc,
final float cx, final float cy, final float rx, final float ry) {
final Element ellipse = doc.createElementNS(SVGUtilities.SVG_NS,
"ellipse");
@@ -125,7 +131,7 @@
/**
* Create an SVG Path.
*/
- public static final Element createPath(final Document doc,
+ public static Element createPath(final Document doc,
final String str) {
final Element path = doc.createElementNS(SVGUtilities.SVG_NS, "path");
path.setAttributeNS(null, "d", str);
@@ -135,7 +141,7 @@
/**
* Create an SVG Text object.
*/
- public static final Element createText(final Document doc, final float x,
+ public static Element createText(final Document doc, final float x,
final float y, final String str) {
final Element textGraph = doc.createElementNS(SVGUtilities.SVG_NS,
"text");
@@ -149,7 +155,7 @@
/**
* Create an SVG Rectangle.
*/
- public static final Element createRect(final Document doc, final float x,
+ public static Element createRect(final Document doc, final float x,
final float y, final float width, final float height) {
final Element border = doc.createElementNS(SVGUtilities.SVG_NS, "rect");
border.setAttributeNS(null, "x", "" + x);
@@ -162,7 +168,7 @@
/**
* Create an SVG G.
*/
- public static final Element createG(final Document doc) {
+ public static Element createG(final Document doc) {
final Element border = doc.createElementNS(SVGUtilities.SVG_NS, "g");
return border;
}
@@ -170,7 +176,7 @@
/**
* Create an SVG Clip.
*/
- public static final Element createClip(final Document doc,
+ public static Element createClip(final Document doc,
final Element els, final String id) {
final Element border = doc.createElementNS(SVGUtilities.SVG_NS,
"clipPath");
@@ -179,7 +185,7 @@
return border;
}
- public static final Element createImage(final Document doc,
+ public static Element createImage(final Document doc,
final String ref, final float width, final float height) {
final Element border = doc.createElementNS(SVGUtilities.SVG_NS,
"image");
@@ -193,7 +199,7 @@
/**
* Create some SVG text that is wrapped into a specified width..
*/
- public static final Element wrapText(final Document doc, final String str,
+ public static Element wrapText(final Document doc, final String str,
final Font font, final float width) {
final Element g = createG(doc);
Element text;
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-07 23:53:02 UTC (rev 7979)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-08 00:10:41 UTC (rev 7980)
@@ -117,24 +117,23 @@
<module name="EmptyStatement"/>
<module name="FallThrough"/>
<module name="FinalClass"/>
- <module name="FinalParameters">
- <!-- Not sure we want this one. We already have a test to make sure that
- it is final if it can be, but this forces it to be final. -->
- <property name="severity" value="ignore"/>
- </module>
+
+ <!-- Leave this one off. We already have a test to make sure that it is
+ final if it can be, but this forces it to be final. -->
+ <!--<module name="FinalParameters"/>-->
+
<!-- Skip for now. The Ant build chokes on this. -->
<!--<module name="j2ee.FinalStatic"/>-->
+
<module name="RegexpHeader">
<property name="headerFile" value="${foray.home}/scripts/checkstyle-header-java.txt"/>
</module>
- <module name="HiddenField">
- <!-- This one should stay off. We use "RequireThis" to distinguish local
- variables and parameters from instance variables. -->
- <property name="severity" value="ignore"/>
- </module>
- <module name="HideUtilityClassConstructor">
- <property name="severity" value="ignore"/>
- </module>
+
+ <!-- Leave this one off. We use "RequireThis" to distinguish local variables
+ and parameters from instance variables. -->
+ <!--<module name="HiddenField"/>-->
+
+ <module name="HideUtilityClassConstructor"/>
<module name="IllegalCatch">
<property name="severity" value="ignore"/>
</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|