[FOray-commit] SF.net SVN: foray: [8321] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-10-07 15:24:57
|
Revision: 8321
http://svn.sourceforge.net/foray/?rev=8321&view=rev
Author: victormote
Date: 2006-10-07 08:24:49 -0700 (Sat, 07 Oct 2006)
Log Message:
-----------
Make all instance variables private and enforce the checkstyle rule to that effect.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -65,8 +65,8 @@
private static final String TRANSLATION_PATH =
"/org/foray/render/awt/viewer/resources/";
- PreviewDialog frame;
- AWTRenderer renderer;
+ private PreviewDialog frame;
+ private AWTRenderer renderer;
private FOrayDocument document;
private Translator resource;
@@ -88,7 +88,7 @@
e.printStackTrace();
}
- String language = commandLineOptions.getLanguage();
+ String language = getCommandLineOptions().getLanguage();
if (language == null) {
try {
language = System.getProperty("user.language");
@@ -102,14 +102,14 @@
+ "messages." + language));
resource.setMissingEmphasized(false);
- final SessionConfig configuration = this.options.getSessionConfig();
+ final SessionConfig configuration = getOptions().getSessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(
configuration);
- this.document = new FOrayDocument(session, inputSource, null);
+ this.document = new FOrayDocument(session, getInputSource(), null);
final OutputConfig renderOptions =
- commandLineOptions.getRendererOptions();
+ getCommandLineOptions().getRendererOptions();
this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
frame = createPreviewDialog(renderer, resource);
renderer.setProgressListener(frame);
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -62,16 +62,16 @@
private static final int STANDARD_OPTIONS_QTY_ARGUMENTS = 3;
/** The user configuration file. */
- URL userConfig = null;
+ private URL userConfig = null;
/** The input XSL-FO. Should be null for XSLT input. */
- URL foInput = null;
+ private URL foInput = null;
/** The input XSLT. Should be null for XSL-FO input. */
- URL xsltInput = null;
+ private URL xsltInput = null;
/** The input XML file. Should be null for XSL-FO input. */
- URL xmlInput = null;
+ private URL xmlInput = null;
/** The output file. */
private File outfile = null;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -50,7 +50,7 @@
*/
public class CommandLineStarter extends Starter {
- CommandLineOptions commandLineOptions;
+ private CommandLineOptions commandLineOptions;
public CommandLineStarter(final Log logger,
final SessionConfig sessionConfig, final OutputConfig outputConfig,
@@ -58,7 +58,7 @@
throws FOrayException {
super(logger, sessionConfig, outputConfig);
this.commandLineOptions = commandLineOptions;
- options.setCommandLineOptions(commandLineOptions);
+ getOptions().setCommandLineOptions(commandLineOptions);
super.setInputSource(commandLineOptions.getInputSource());
}
@@ -74,7 +74,7 @@
*/
/* Instantiate the FOraySession. */
- final SessionConfig sessionConfig = this.options.getSessionConfig();
+ final SessionConfig sessionConfig = getOptions().getSessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(
sessionConfig);
@@ -89,7 +89,7 @@
FOrayDocument document = null;
if (this.commandLineOptions.getInputMode()
== CommandLineOptions.INPUT_FO) {
- document = new FOrayDocument(session, inputSource, null);
+ document = new FOrayDocument(session, getInputSource(), null);
} else {
document = new FOrayDocument(session,
commandLineOptions.getXMLFile(),
@@ -196,4 +196,11 @@
}
}
+ /**
+ * @return Returns the commandLineOptions.
+ */
+ public CommandLineOptions getCommandLineOptions() {
+ return this.commandLineOptions;
+ }
+
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -46,9 +46,10 @@
* additional setting of commandline options
*/
public class Options {
- SessionConfig sessionConfig;
- OutputConfig renderConfig;
+ private SessionConfig sessionConfig;
+ private OutputConfig renderConfig;
+
/** The logger that should be used. */
private Log logger;
Modified: trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -59,7 +59,7 @@
}
public void run() throws FOrayException {
- final SessionConfig configuration = this.options.getSessionConfig();
+ final SessionConfig configuration = getOptions().getSessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(
configuration);
Modified: trunk/foray/foray-app/src/java/org/foray/app/Starter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2006-10-07 15:24:49 UTC (rev 8321)
@@ -43,8 +43,8 @@
*/
public abstract class Starter {
- Options options;
- InputSource inputSource;
+ private Options options;
+ private InputSource inputSource;
private Log logger;
private OutputConfig outputConfig;
@@ -72,4 +72,18 @@
return this.outputConfig;
}
+ /**
+ * @return Returns the options.
+ */
+ public Options getOptions() {
+ return this.options;
+ }
+
+ /**
+ * @return Returns the inputSource.
+ */
+ public InputSource getInputSource() {
+ return this.inputSource;
+ }
+
}
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2006-10-07 15:18:10 UTC (rev 8320)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2006-10-07 15:24:49 UTC (rev 8321)
@@ -46,8 +46,6 @@
files="org.foray.text.*"/>
<suppress checks="VisibilityModifier"
- files="org.foray.app.*"/>
- <suppress checks="VisibilityModifier"
files="org.foray.area.*"/>
<suppress checks="VisibilityModifier"
files="org.foray.core.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|