[FOray-commit] SF.net SVN: foray: [7569] trunk/foray/foray-text/src/java/org/foray/text
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-06-13 21:35:47
|
Revision: 7569 Author: victormote Date: 2006-06-13 14:35:37 -0700 (Tue, 13 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7569&view=rev Log Message: ----------- Implement axsl changes: Add EagerLineBreaker interface and clean up the type hierarchy a bit. Modified Paths: -------------- trunk/foray/foray-text/src/java/org/foray/text/TextServer.java trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java trunk/foray/foray-text/src/java/org/foray/text/line/LineBreakServer.java trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLBS.java Modified: trunk/foray/foray-text/src/java/org/foray/text/TextServer.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/TextServer.java 2006-06-13 21:35:29 UTC (rev 7568) +++ trunk/foray/foray-text/src/java/org/foray/text/TextServer.java 2006-06-13 21:35:37 UTC (rev 7569) @@ -24,14 +24,15 @@ package org.foray.text; -import org.axsl.hyphenR.HyphenationServer; import org.foray.text.line.solitary.SolitaryLBS; import org.axsl.fontR.FontConsumer; +import org.axsl.hyphenR.HyphenationServer; +import org.axsl.text.line.EagerLineBreaker; import org.axsl.text.line.LineBreakControl; import org.axsl.text.line.LineBreakHandler; import org.axsl.text.line.LineBreakServer; -import org.axsl.text.line.LineBreaker; +import org.axsl.text.line.PatientLineBreaker; import org.apache.commons.logging.Log; @@ -90,15 +91,22 @@ } /** - * Returns a LineBreaker instance that can be used by the client to - * compute line-breaks. - * @return A LineBreaker instance provided by this TextServer's - * LineBreakServer. + * {@inheritDoc} */ - public LineBreaker provideLineBreaker(LineBreakControl control, + public EagerLineBreaker provideEagerLineBreaker(LineBreakControl control, LineBreakHandler handler, FontConsumer fontConsumer) { - return getLineBreakServer().provideLineBreaker(control, handler, + return getLineBreakServer().provideEagerLineBreaker(control, handler, fontConsumer); } + /** + * {@inheritDoc} + */ + public PatientLineBreaker providePatientLineBreaker( + LineBreakControl control, LineBreakHandler handler, + FontConsumer fontConsumer) { + /* We don't have access to any yet. */ + return null; + } + } Modified: trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2006-06-13 21:35:29 UTC (rev 7568) +++ trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2006-06-13 21:35:37 UTC (rev 7569) @@ -41,7 +41,8 @@ * the usefulness of this class comes from its ability to adapt an eager * line-breaking system to be used by patient clients. */ -public abstract class EagerLineBreaker extends LineBreaker { +public abstract class EagerLineBreaker extends LineBreaker + implements org.axsl.text.line.EagerLineBreaker { /** * Constructor. Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreakServer.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreakServer.java 2006-06-13 21:35:29 UTC (rev 7568) +++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreakServer.java 2006-06-13 21:35:37 UTC (rev 7569) @@ -26,11 +26,6 @@ import org.foray.text.TextServer; -import org.axsl.fontR.FontConsumer; -import org.axsl.text.line.LineBreakControl; -import org.axsl.text.line.LineBreakHandler; -import org.axsl.text.line.LineBreaker; - import org.apache.commons.logging.Log; /** @@ -53,9 +48,6 @@ this.textServer.setLineBreakServer(this); } - public abstract LineBreaker provideLineBreaker(LineBreakControl control, - LineBreakHandler handler, FontConsumer fontConsumer); - public Log getLogger() { return this.textServer.getLogger(); } Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLBS.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLBS.java 2006-06-13 21:35:29 UTC (rev 7568) +++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLBS.java 2006-06-13 21:35:37 UTC (rev 7569) @@ -28,9 +28,10 @@ import org.foray.text.line.LineBreakServer; import org.axsl.fontR.FontConsumer; +import org.axsl.text.line.EagerLineBreaker; import org.axsl.text.line.LineBreakControl; import org.axsl.text.line.LineBreakHandler; -import org.axsl.text.line.LineBreaker; +import org.axsl.text.line.PatientLineBreaker; /** * @@ -41,9 +42,15 @@ super(textServer); } - public LineBreaker provideLineBreaker(LineBreakControl control, + public EagerLineBreaker provideEagerLineBreaker(LineBreakControl control, LineBreakHandler handler, FontConsumer fontConsumer) { return new SolitaryLineBreaker(this, control, handler, fontConsumer); } + public PatientLineBreaker providePatientLineBreaker( + LineBreakControl control, LineBreakHandler handler, + FontConsumer fontConsumer) { + return null; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |