[FOray-commit] SF.net SVN: foray: [7285] trunk/foray/foray-app/src/java/org/foray/app
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-05-26 22:18:15
|
Revision: 7285 Author: victormote Date: 2006-05-26 15:18:04 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7285&view=rev Log Message: ----------- Move some of the FOray-specific bootstrapping logic out of FOraySession and into FOraySpecific. Modified Paths: -------------- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java trunk/foray/foray-app/src/java/org/foray/app/FOraySession.java trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java =================================================================== --- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-05-26 22:15:02 UTC (rev 7284) +++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-05-26 22:18:04 UTC (rev 7285) @@ -97,7 +97,7 @@ sessionConfig, graphicServer, textServer); AreaTreeFactory areaTreeFactory = FOraySpecific.makeAreaTreeFactory( logger, textServer); - LayoutFactory layoutFactory = null; + LayoutFactory layoutFactory = FOraySpecific.makeLayoutFactory(logger); FOraySession session = new FOraySession(logger, sessionConfig, fontServer, textServer, graphicServer, foTreeServer, areaTreeFactory, layoutFactory); Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySession.java =================================================================== --- trunk/foray/foray-app/src/java/org/foray/app/FOraySession.java 2006-05-26 22:15:02 UTC (rev 7284) +++ trunk/foray/foray-app/src/java/org/foray/app/FOraySession.java 2006-05-26 22:18:04 UTC (rev 7285) @@ -27,7 +27,6 @@ import org.foray.core.Application; import org.foray.core.FOrayException; import org.foray.core.SessionConfig; -import org.foray.pioneer.PioneerFactory; import org.axsl.areaW.AreaTreeFactory; import org.axsl.foR.FOTreeFactory; @@ -163,8 +162,12 @@ } this.areaTreeFactory = areaTreeFactory; + /* Validate LayoutFactory. */ + if (layoutFactory == null) { + throw new FOrayException("LayoutFactory required for " + + "FOraySession."); + } this.layoutFactory = layoutFactory; - setupLayoutFactory(); } public Log getLogger() { @@ -215,16 +218,6 @@ return this.textServer; } - /** - * Sets up a LayoutFactory if there is not one already. - */ - private void setupLayoutFactory() { - if (this.layoutFactory != null) { - return; - } - this.layoutFactory = new PioneerFactory(this.getLogger()); - } - public GraphicServer getGraphicServer() { return this.graphicServer; } Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java =================================================================== --- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-05-26 22:15:02 UTC (rev 7284) +++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-05-26 22:18:04 UTC (rev 7285) @@ -32,6 +32,7 @@ import org.foray.font.FOrayFontServer; import org.foray.fotree.FOrayFOTreeServer; import org.foray.graphic.FOrayGraphicServer; +import org.foray.pioneer.PioneerFactory; import org.axsl.areaW.AreaTreeFactory; import org.axsl.foR.FOTreeFactory; @@ -126,8 +127,9 @@ return new FOrayAreaTreeFactory(logger, textServer); } - public static LayoutFactory makeLayoutFactory() throws FOrayException { - return null; + public static LayoutFactory makeLayoutFactory(Log logger) + throws FOrayException { + return new PioneerFactory(logger); } public static EntityResolver makeEntityResolver( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |