Thread: [FOray-commit] SF.net SVN: foray: [8483] trunk/foray (Page 4)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-01-21 19:55:50
|
Revision: 8483
http://svn.sourceforge.net/foray/?rev=8483&view=rev
Author: victormote
Date: 2007-01-21 11:55:49 -0800 (Sun, 21 Jan 2007)
Log Message:
-----------
Remove the scripts directory from the various Eclipse source paths.
Modified Paths:
--------------
trunk/foray/foray-app/.classpath
trunk/foray/foray-areatree/.classpath
trunk/foray/foray-common/.classpath
trunk/foray/foray-font/.classpath
trunk/foray/foray-fotree/.classpath
trunk/foray/foray-graphic/.classpath
trunk/foray/foray-hyphen-r/.classpath
trunk/foray/foray-mif/.classpath
trunk/foray/foray-output/.classpath
trunk/foray/foray-pdf/.classpath
trunk/foray/foray-pioneer/.classpath
trunk/foray/foray-ps/.classpath
trunk/foray/foray-render/.classpath
trunk/foray/foray-text/.classpath
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-app/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -2,7 +2,6 @@
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/FOrayFont"/>
Modified: trunk/foray/foray-areatree/.classpath
===================================================================
--- trunk/foray/foray-areatree/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-areatree/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslFont-R"/>
Modified: trunk/foray/foray-common/.classpath
===================================================================
--- trunk/foray/foray-common/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-common/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/batik.jar"/>
Modified: trunk/foray/foray-font/.classpath
===================================================================
--- trunk/foray/foray-font/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-font/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayPS"/>
<classpathentry kind="src" path="/axslFont-R"/>
Modified: trunk/foray/foray-fotree/.classpath
===================================================================
--- trunk/foray/foray-fotree/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-fotree/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -4,7 +4,6 @@
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="src" path="/axslFont-R"/>
<classpathentry kind="src" path="/axslGraphic-R"/>
<classpathentry kind="src" path="/axslFO-R"/>
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-graphic/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslGraphic-R"/>
Modified: trunk/foray/foray-hyphen-r/.classpath
===================================================================
--- trunk/foray/foray-hyphen-r/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-hyphen-r/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
Modified: trunk/foray/foray-mif/.classpath
===================================================================
--- trunk/foray/foray-mif/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-mif/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
Modified: trunk/foray/foray-output/.classpath
===================================================================
--- trunk/foray/foray-output/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-output/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslGraphic-R"/>
<classpathentry kind="src" path="/FOrayCommon"/>
Modified: trunk/foray/foray-pdf/.classpath
===================================================================
--- trunk/foray/foray-pdf/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-pdf/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslFont-R"/>
<classpathentry kind="src" path="/axslGraphic-R"/>
Modified: trunk/foray/foray-pioneer/.classpath
===================================================================
--- trunk/foray/foray-pioneer/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-pioneer/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslFont-R"/>
<classpathentry kind="src" path="/axslGraphic-R"/>
Modified: trunk/foray/foray-ps/.classpath
===================================================================
--- trunk/foray/foray-ps/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-ps/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
Modified: trunk/foray/foray-render/.classpath
===================================================================
--- trunk/foray/foray-render/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-render/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslFont-R"/>
Modified: trunk/foray/foray-text/.classpath
===================================================================
--- trunk/foray/foray-text/.classpath 2007-01-21 19:28:04 UTC (rev 8482)
+++ trunk/foray/foray-text/.classpath 2007-01-21 19:55:49 UTC (rev 8483)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/axslFont-R"/>
<classpathentry kind="src" path="/axslText"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-23 02:29:01
|
Revision: 8502
http://svn.sourceforge.net/foray/?rev=8502&view=rev
Author: victormote
Date: 2007-01-22 18:28:59 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
1. Use the base URL to parse and use hyphenation pattern files.
2. Clean up exception handling a bit for hyphenation serialized objects and pattern files.
Modified Paths:
--------------
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenationServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java
trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenationServer.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenationServer.java 2007-01-23 01:42:03 UTC (rev 8501)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/FOrayHyphenationServer.java 2007-01-23 02:28:59 UTC (rev 8502)
@@ -35,17 +35,17 @@
import org.foray.common.FOrayConstants;
import org.foray.common.StringUtilPre5;
+import org.foray.common.url.URLFactory;
import org.axsl.hyphenR.HyphenationException;
import org.apache.commons.logging.Log;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.lang.reflect.Method;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
@@ -82,7 +82,7 @@
private ArrayList hyphenTreesNotFound = new ArrayList();
/** The hyphenation directory. */
- private String hyphenationDir;
+ private URL hyphenationDir;
/**
* Constructor.
@@ -90,12 +90,11 @@
*/
public FOrayHyphenationServer(final Log logger, final URL hyphenationDir) {
this.logger = logger;
- // TODO: This is klunky. Use the URL.
- this.hyphenationDir = hyphenationDir.getFile();
+ this.hyphenationDir = hyphenationDir;
}
private HyphenationTree getHyphenationTree(final String languageKey,
- final String country) {
+ final String country) throws HyphenationException {
/* TODO: This logic needs some work. We should look first for the
* countryKey in the cache, then resources, then filesystem. If it is
* not found, only then look for the languageKey. */
@@ -230,73 +229,84 @@
* Load a tree from serialized file or xml file using configuration
* settings.
*/
- private HyphenationTree loadHyphenationTree(final String key) {
+ private HyphenationTree loadHyphenationTree(final String key)
+ throws HyphenationException {
if (this.hyphenationDir == null) {
return null;
}
HyphenationTree hTree = null;
- // I use here the following convention. The file name specified in
- // the configuration is taken as the base name. First we try
- // name + the serialization extension, assuming a serialized
- // yphenationTree. If that fails
- // we try name + ".xml", assumming a raw hyphenation pattern file.
- // first try serialized object
- File hyphenFile = new File(this.hyphenationDir,
- key + FOrayConstants.BINARY_SERIALIZATION_EXTENSION);
- if (hyphenFile.exists()) {
+ /* Use the key as the base name for the file. */
+
+ /* First look for the serialized object. */
+ String fileName = key + FOrayConstants.BINARY_SERIALIZATION_EXTENSION;
+ URL hyphenFile = null;
+ try {
+ hyphenFile = URLFactory.createURL(this.hyphenationDir, fileName);
+ } catch (final MalformedURLException e) {
+ /* This probably means that the hyphenation URL is not valid.
+ * Rethrow the exception to alert the user. */
+ throw new HyphenationException(e);
+ }
+
+ InputStream inputStream = null;
+ try {
+ inputStream = hyphenFile.openStream();
+ } catch (final IOException e) {
+ /* This just means that the pattern doesn't exist. Ignore the
+ * exception as the null value in "inputStream" will control the
+ * downstream logic. */
+ }
+
+ if (inputStream != null) {
ObjectInputStream ois = null;
try {
- ois = new ObjectInputStream(new FileInputStream(hyphenFile));
+ ois = new ObjectInputStream(inputStream);
hTree = (HyphenationTree) ois.readObject();
- } catch (final Exception e) {
- e.printStackTrace();
+ return hTree;
+ } catch (final IOException e) {
+ throw new HyphenationException(e);
+ } catch (final ClassNotFoundException e) {
+ throw new HyphenationException(e);
} finally {
if (ois != null) {
try {
ois.close();
- } catch (final IOException e) { }
+ } catch (final IOException e) {
+ this.logger.error("Exception closing ObjectInputStream "
+ + "for " + hyphenFile.toString(), e);
+ }
}
}
- return hTree;
}
- // try the raw XML file
- hyphenFile = new File(this.hyphenationDir, key + ".xml");
- if (hyphenFile.exists()) {
- hTree = new HyphenationTree();
- if (this.logger.isDebugEnabled()) {
- getLogger().debug("reading " + this.hyphenationDir + key
- + ".xml");
- }
- try {
- hTree.loadPatterns(hyphenFile.getPath(), getLogger());
- if (this.logger.isDebugEnabled()) {
- getLogger().debug("Stats: ");
- hTree.printStats(getLogger());
- }
- return hTree;
- } catch (final HyphenationException ex) {
- if (this.logger.isDebugEnabled()) {
- getLogger().debug("Can't load user patterns "
- + "from xml file " + this.hyphenationDir
- + key + ".xml");
- }
- return null;
- }
+
+ /* Look for the raw XML file. */
+ fileName = key + ".xml";
+ try {
+ hyphenFile = URLFactory.createURL(this.hyphenationDir, fileName);
+ } catch (final MalformedURLException e) {
+ /* This probably means that the hyphenation URL is not valid.
+ * Rethrow the exception to alert the user. */
+ throw new HyphenationException(e);
}
+
+ hTree = new HyphenationTree();
if (this.logger.isDebugEnabled()) {
- getLogger().debug("Tried to load " + hyphenFile.toString() + "\n"
- + "Cannot find compiled nor xml file for "
- + "hyphenation pattern" + key);
+ getLogger().debug("reading " + this.hyphenationDir + key + ".xml");
}
- return null;
+ hTree.loadPatterns(hyphenFile, getLogger());
+ if (this.logger.isDebugEnabled()) {
+ getLogger().debug("Stats: ");
+ hTree.printStats(getLogger());
+ }
+ return hTree;
}
public org.axsl.hyphenR.Hyphenation hyphenate(final CharSequence word,
final int offset, final int len, final String language,
final String country, final int remainCount, final int pushCount,
- final boolean includeInhibitors) {
+ final boolean includeInhibitors) throws HyphenationException {
return this.hyphenate(word.toString().toCharArray(), offset, len,
language, country, remainCount, pushCount, includeInhibitors);
}
@@ -304,7 +314,8 @@
public org.axsl.hyphenR.Hyphenation hyphenate(final char[] word,
final int offset, final int len, final String language,
final String country, final int remainCount,
- final int pushCount, final boolean includeInhibitors) {
+ final int pushCount, final boolean includeInhibitors)
+ throws HyphenationException {
final HyphenationTree hTree = getHyphenationTree(language, country);
if (hTree == null) {
return null;
@@ -316,7 +327,7 @@
public org.axsl.hyphenR.Hyphenation hyphenate(final int[] word,
final int offset, final int len, final String language,
final String country, final int remainCount, final int pushCount,
- final boolean includeInhibitors) {
+ final boolean includeInhibitors) throws HyphenationException {
/* Convert to a String using the 32-bit ICU4J method. */
/* TODO: After Java 5 is the minimum, use the standard String
* constructor instead. */
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-01-23 01:42:03 UTC (rev 8501)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2007-01-23 02:28:59 UTC (rev 8502)
@@ -35,6 +35,7 @@
import org.foray.common.Logging;
import org.foray.common.WKConstants;
+import org.foray.common.url.URLFactory;
import org.axsl.hyphenR.HyphenationException;
@@ -49,6 +50,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
@@ -137,12 +139,12 @@
/**
* Read hyphenation patterns from an XML file.
*/
- public void loadPatterns(final String filename, final Log logger)
+ public void loadPatterns(final URL url, final Log logger)
throws HyphenationException {
final PatternParser pp = new PatternParser(this, logger);
ivalues = new TernaryTree();
- pp.parse(filename);
+ pp.parse(url);
// patterns/values should be now in the tree
// let's optimize a bit
@@ -534,7 +536,8 @@
ht = new HyphenationTree();
logger.info("XML file name: ");
token = in.readLine().trim();
- ht.loadPatterns(token, logger);
+ final URL url = URLFactory.createURL(token);
+ ht.loadPatterns(url, logger);
} else if (token.equals("L")) {
ObjectInputStream ois = null;
logger.info("Object file name: ");
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java 2007-01-23 01:42:03 UTC (rev 8501)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java 2007-01-23 02:28:59 UTC (rev 8502)
@@ -49,7 +49,9 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
/**
@@ -91,9 +93,20 @@
this.consumer = consumer;
}
- public void parse(final String filename) throws HyphenationException {
- final InputSource uri = fileInputSource(filename);
+ public void parse(final URL url) throws HyphenationException {
+ InputStream inputStream = null;
+ try {
+ inputStream = url.openStream();
+ } catch (final IOException e) {
+ /* This is a normal condition, and just means that the URL to the
+ * pattern file does not exist. */
+ this.logger.error("Cannot open hyphenation pattern: "
+ + url.toString());
+ return;
+ }
+ final InputSource uri = new InputSource(inputStream);
+
try {
parser.parse(uri);
} catch (final SAXException e) {
@@ -441,7 +454,8 @@
if (args.length > 0) {
final PatternParser pp = new PatternParser(logger);
pp.setConsumer(pp);
- pp.parse(args[0]);
+ final URL url = URLFactory.createURL(args[0]);
+ pp.parse(url);
}
}
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java 2007-01-23 01:42:03 UTC (rev 8501)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/SerializeHyphPattern.java 2007-01-23 02:28:59 UTC (rev 8502)
@@ -42,6 +42,8 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
/**
* Ant task to parse and serialize hyphenation patterns so that they can be
@@ -118,7 +120,8 @@
getLogger().info("Processing " + infile);
final HyphenationTree hTree = new HyphenationTree();
try {
- hTree.loadPatterns(infile.toString(), getLogger());
+ final URL url = infile.toURI().toURL();
+ hTree.loadPatterns(url, getLogger());
if (errorDump) {
getLogger().info("Stats: ");
hTree.printStats(getLogger());
@@ -129,6 +132,8 @@
if (errorDump) {
getLogger().error(ex.toString());
}
+ } catch (final MalformedURLException e) {
+ getLogger().error(e.getMessage());
}
// serialize class
try {
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-01-23 01:42:03 UTC (rev 8501)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-01-23 02:28:59 UTC (rev 8502)
@@ -34,6 +34,7 @@
import org.axsl.fontR.FontConsumer;
import org.axsl.hyphenR.Hyphenation;
+import org.axsl.hyphenR.HyphenationException;
import org.axsl.hyphenR.HyphenationServer;
import org.axsl.text.TextException;
import org.axsl.text.line.LineBreakControl;
@@ -390,10 +391,16 @@
actualWordStart,
wordSize);
// See if there are discretionary hyphenation points.
- final Hyphenation hyph = server.hyphenate(wordToHyphenate, 0,
- wordToHyphenate.length(), language, country,
- this.currentLineText.inlineHyphenationRemainCount(),
- this.currentLineText.inlineHyphenationPushCount(), false);
+ Hyphenation hyph = null;
+ try {
+ hyph = server.hyphenate(wordToHyphenate, 0,
+ wordToHyphenate.length(), language, country,
+ this.currentLineText.inlineHyphenationRemainCount(),
+ this.currentLineText.inlineHyphenationPushCount(), false);
+ } catch (final HyphenationException e) {
+ /* Log the exception and continue. */
+ this.getLogger().error("Hyphenation error", e);
+ }
// If none, the word cannot be hyphenated.
if (hyph == null) {
return this.wordStart;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-24 03:02:40
|
Revision: 8509
http://svn.sourceforge.net/foray/?rev=8509&view=rev
Author: victormote
Date: 2007-01-23 19:02:39 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
Fix some build problems.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-fotree/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2007-01-24 02:50:15 UTC (rev 8508)
+++ trunk/foray/foray-app/scripts/build.xml 2007-01-24 03:02:39 UTC (rev 8509)
@@ -28,6 +28,9 @@
<include name="xercesImpl*.jar"/>
<include name="commons-logging.jar"/>
</fileset>
+ <fileset dir="${build.lib.dir}">
+ <include name="junit/*.jar"/>
+ </fileset>
<fileset dir="${foray.home}/foray-common/build/ant">
<include name="*.jar"/>
</fileset>
@@ -37,6 +40,9 @@
<fileset dir="${foray.home}/foray-font/build/ant">
<include name="*.jar"/>
</fileset>
+ <fileset dir="${foray.home}/foray-ps/build/ant">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="${foray.home}/foray-graphic/build/ant">
<include name="*.jar"/>
</fileset>
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2007-01-24 02:50:15 UTC (rev 8508)
+++ trunk/foray/foray-fotree/scripts/build.xml 2007-01-24 03:02:39 UTC (rev 8509)
@@ -21,6 +21,9 @@
<fileset dir="${axsl.build}">
<include name="**/axsl*.jar"/>
</fileset>
+ <fileset dir="${build.lib.dir}">
+ <include name="junit/*.jar"/>
+ </fileset>
<fileset dir="${lib.dir}">
<include name="batik*.jar"/>
<include name="xml-apis.jar"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-25 02:47:31
|
Revision: 8515
http://svn.sourceforge.net/foray/?rev=8515&view=rev
Author: victormote
Date: 2007-01-24 18:47:30 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Move a test in the TernaryTree main() method to a JUnit test case, and add infrastructure to run it.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
trunk/foray/foray-hyphen-r/.classpath
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java
Added Paths:
-----------
trunk/foray/foray-hyphen-r/src/javatest/
trunk/foray/foray-hyphen-r/src/javatest/org/
trunk/foray/foray-hyphen-r/src/javatest/org/foray/
trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/
trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestFOrayHyphenR.java
trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestTernaryTree.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-01-25 02:10:09 UTC (rev 8514)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-01-25 02:47:30 UTC (rev 8515)
@@ -29,6 +29,7 @@
package org.foray.app;
import org.foray.fotree.TestFOrayFOTree;
+import org.foray.hyphenR.TestFOrayHyphenR;
import org.foray.ps.TestFOrayPS;
import junit.framework.Test;
@@ -47,6 +48,7 @@
final TestSuite testSuite = new TestSuite();
testSuite.addTest(TestFOrayFOTree.suite());
testSuite.addTest(TestFOrayPS.suite());
+ testSuite.addTest(TestFOrayHyphenR.suite());
return testSuite;
}
Modified: trunk/foray/foray-hyphen-r/.classpath
===================================================================
--- trunk/foray/foray-hyphen-r/.classpath 2007-01-25 02:10:09 UTC (rev 8514)
+++ trunk/foray/foray-hyphen-r/.classpath 2007-01-25 02:47:30 UTC (rev 8515)
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen-R"/>
+ <classpathentry kind="lib" path="/FOrayLibsBuild/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java 2007-01-25 02:10:09 UTC (rev 8514)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java 2007-01-25 02:47:30 UTC (rev 8515)
@@ -33,8 +33,6 @@
package org.foray.hyphenR;
-import org.foray.common.Logging;
-
import org.apache.commons.logging.Log;
import java.io.Serializable;
@@ -436,6 +434,14 @@
}
/**
+ * Returns the number of nodes in the tree.
+ * @return The number of nodes in the tree.
+ */
+ public int getNodeCount() {
+ return this.freenode;
+ }
+
+ /**
* {@inheritDoc}
*/
public Object clone() {
@@ -746,20 +752,6 @@
}
- public static void main(final String[] args) throws Exception {
- final Log logger = Logging.makeDefaultLogger();
- final TernaryTree tt = new TernaryTree();
- tt.insert("Carlos", 'C');
- tt.insert("Car", 'r');
- tt.insert("palos", 'l');
- tt.insert("pa", 'p');
- tt.trimToSize();
- logger.info(String.valueOf((char) tt.find("Car")));
- logger.info(String.valueOf((char) tt.find("Carlos")));
- logger.info(String.valueOf((char) tt.find("alto")));
- tt.printStats(logger);
- }
-
/**
* Returns the root.
* @return Returns the root.
Added: trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestFOrayHyphenR.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestFOrayHyphenR.java (rev 0)
+++ trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestFOrayHyphenR.java 2007-01-25 02:47:30 UTC (rev 8515)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.hyphenR;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Handles testing for the FOrayHyphen-R module.
+ */
+public class TestFOrayHyphenR extends TestCase {
+
+ /**
+ * Builds a test suite for all classes in this module.
+ * @return The built test suite.
+ */
+ public static Test suite() {
+ final TestSuite testSuite = new TestSuite();
+ testSuite.addTestSuite(TestTernaryTree.class);
+ return testSuite;
+ }
+
+}
Property changes on: trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestFOrayHyphenR.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestTernaryTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestTernaryTree.java (rev 0)
+++ trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestTernaryTree.java 2007-01-25 02:47:30 UTC (rev 8515)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.hyphenR;
+
+import junit.framework.TestCase;
+
+/**
+ * JUnit test class for the class {@link TernaryTree}.
+ */
+public class TestTernaryTree extends TestCase {
+
+/**
+ * Functional test which adds some key-value pairs to a TernaryTree, then
+ * queries the tree, testing the output.
+ */
+public void testOutput() {
+ /* This test was adapted from the tested class's main() method, which was
+ * the previous mode for testing. The expected values recorded below are
+ * those that were produced by running said method immediately before
+ * creating the class, and are not independently known to be correct.*/
+ final TernaryTree map = new TernaryTree();
+ map.insert("Carlos", 'C');
+ map.insert("Car", 'r');
+ map.insert("palos", 'l');
+ map.insert("pa", 'p');
+ map.trimToSize();
+
+ assertEquals('r', (char) map.find("Car"));
+ assertEquals('C', (char) map.find("Carlos"));
+ assertEquals('\uFFFF', (char) map.find("alto"));
+ assertEquals(4, map.size());
+ assertEquals(10, map.getNodeCount());
+ assertEquals(5, map.getKv().length());
+}
+
+}
Property changes on: trunk/foray/foray-hyphen-r/src/javatest/org/foray/hyphenR/TestTernaryTree.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-27 16:22:09
|
Revision: 8531
http://svn.sourceforge.net/foray/?rev=8531&view=rev
Author: victormote
Date: 2007-01-27 08:21:52 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
Exclude the java test files from the normal build.
Modified Paths:
--------------
trunk/foray/foray-areatree/scripts/build.xml
trunk/foray/foray-common/scripts/build.xml
trunk/foray/foray-core/scripts/build.xml
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-fotree/scripts/build.xml
trunk/foray/foray-graphic/scripts/build.xml
trunk/foray/foray-layout/scripts/build.xml
trunk/foray/foray-mif/scripts/build.xml
trunk/foray/foray-output/scripts/build.xml
trunk/foray/foray-pdf/scripts/build.xml
trunk/foray/foray-pioneer/scripts/build.xml
trunk/foray/foray-pretty/scripts/build.xml
trunk/foray/foray-ps/scripts/build.xml
trunk/foray/foray-render/scripts/build.xml
trunk/foray/foray-text/scripts/build.xml
Modified: trunk/foray/foray-areatree/scripts/build.xml
===================================================================
--- trunk/foray/foray-areatree/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-areatree/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="areatree"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-common/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="common"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-core/scripts/build.xml
===================================================================
--- trunk/foray/foray-core/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-core/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="core"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-font/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="font"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-fotree/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="fotree"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-graphic/scripts/build.xml
===================================================================
--- trunk/foray/foray-graphic/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-graphic/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="init-avail, common-init">
<property name="module" value="graphic"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-layout/scripts/build.xml
===================================================================
--- trunk/foray/foray-layout/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-layout/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="layout"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-mif/scripts/build.xml
===================================================================
--- trunk/foray/foray-mif/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-mif/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="mif"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-output/scripts/build.xml
===================================================================
--- trunk/foray/foray-output/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-output/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="output"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-pdf/scripts/build.xml
===================================================================
--- trunk/foray/foray-pdf/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-pdf/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -14,7 +14,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="pdf"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-pioneer/scripts/build.xml
===================================================================
--- trunk/foray/foray-pioneer/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-pioneer/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="pioneer"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-pretty/scripts/build.xml
===================================================================
--- trunk/foray/foray-pretty/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-pretty/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="pretty"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-ps/scripts/build.xml
===================================================================
--- trunk/foray/foray-ps/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-ps/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="ps"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
Modified: trunk/foray/foray-render/scripts/build.xml
===================================================================
--- trunk/foray/foray-render/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-render/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,15 +11,15 @@
<target name="init" depends="env, common-init">
<property name="module" value="render"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
<property name="viewer.resources.src.dir"
- value="${src.dir}/java/org/foray/render/awt/viewer/resources"/>
+ value="${src.dir}/org/foray/render/awt/viewer/resources"/>
<property name="viewer.images.src.dir"
- value="${src.dir}/java/org/foray/render/awt/viewer/images"/>
+ value="${src.dir}/org/foray/render/awt/viewer/images"/>
<property name="viewer.resources.dest.dir"
value="${build.dir}/org/foray/render/awt/viewer/resources"/>
<property name="viewer.images.dest.dir"
Modified: trunk/foray/foray-text/scripts/build.xml
===================================================================
--- trunk/foray/foray-text/scripts/build.xml 2007-01-27 02:45:43 UTC (rev 8530)
+++ trunk/foray/foray-text/scripts/build.xml 2007-01-27 16:21:52 UTC (rev 8531)
@@ -11,7 +11,7 @@
<target name="init" depends="env, common-init">
<property name="module" value="text"/>
<property name="module.dir" value="${foray.home}/foray-${module}"/>
- <property name="src.dir" value="${module.dir}/src"/>
+ <property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.file"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-27 22:12:13
|
Revision: 8537
http://svn.sourceforge.net/foray/?rev=8537&view=rev
Author: victormote
Date: 2007-01-27 14:12:13 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
Rename Eclipse names of some projects to make them sort better.
Modified Paths:
--------------
trunk/foray/doc/.project
trunk/foray/foray-app/.classpath
trunk/foray/foray-fotree/.classpath
trunk/foray/foray-hyphen-r/.classpath
trunk/foray/foray-ps/.classpath
trunk/foray/lib/.project
trunk/foray/lib-build/.project
trunk/foray/resource/.project
trunk/foray/scripts/.project
Modified: trunk/foray/doc/.project
===================================================================
--- trunk/foray/doc/.project 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/doc/.project 2007-01-27 22:12:13 UTC (rev 8537)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>FOrayAdminDoc</name>
+ <name>FOray Doc</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/foray-app/.classpath 2007-01-27 22:12:13 UTC (rev 8537)
@@ -37,7 +37,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen-R"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayHyphen-R"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/foray-hyphen-r-0.3-rsrc.jar"/>
- <classpathentry kind="lib" path="/FOrayLibsBuild/junit/junit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-fotree/.classpath
===================================================================
--- trunk/foray/foray-fotree/.classpath 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/foray-fotree/.classpath 2007-01-27 22:12:13 UTC (rev 8537)
@@ -11,6 +11,6 @@
<classpathentry kind="src" path="/axslText"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/batik.jar"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
- <classpathentry kind="lib" path="/FOrayLibsBuild/junit/junit.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-hyphen-r/.classpath
===================================================================
--- trunk/foray/foray-hyphen-r/.classpath 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/foray-hyphen-r/.classpath 2007-01-27 22:12:13 UTC (rev 8537)
@@ -7,6 +7,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen-R"/>
- <classpathentry kind="lib" path="/FOrayLibsBuild/junit/junit.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-ps/.classpath
===================================================================
--- trunk/foray/foray-ps/.classpath 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/foray-ps/.classpath 2007-01-27 22:12:13 UTC (rev 8537)
@@ -7,6 +7,6 @@
<classpathentry kind="src" path="/axslPS-R"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/commons-logging.jar"/>
- <classpathentry kind="lib" path="/FOrayLibsBuild/junit/junit.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/lib/.project
===================================================================
--- trunk/foray/lib/.project 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/lib/.project 2007-01-27 22:12:13 UTC (rev 8537)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>FOrayLibs</name>
+ <name>FOray Lib</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/foray/lib-build/.project
===================================================================
--- trunk/foray/lib-build/.project 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/lib-build/.project 2007-01-27 22:12:13 UTC (rev 8537)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>FOrayLibsBuild</name>
+ <name>FOray Lib-Build</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/foray/resource/.project
===================================================================
--- trunk/foray/resource/.project 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/resource/.project 2007-01-27 22:12:13 UTC (rev 8537)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>FOrayAdminResources</name>
+ <name>FOray Resources</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/foray/scripts/.project
===================================================================
--- trunk/foray/scripts/.project 2007-01-27 22:04:14 UTC (rev 8536)
+++ trunk/foray/scripts/.project 2007-01-27 22:12:13 UTC (rev 8537)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>FOrayAdminScripts</name>
+ <name>FOray Scripts</name>
<comment></comment>
<projects>
</projects>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-28 20:14:08
|
Revision: 8538
http://svn.sourceforge.net/foray/?rev=8538&view=rev
Author: victormote
Date: 2007-01-28 12:14:08 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to new aXSL enumeration of XSL-FO Objects.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
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 2007-01-27 22:12:13 UTC (rev 8537)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2007-01-28 20:14:08 UTC (rev 8538)
@@ -90,7 +90,7 @@
import org.foray.fotree.fo.obj.Title;
import org.foray.fotree.fo.obj.Wrapper;
-import org.axsl.common.Constants;
+import org.axsl.common.FoObject;
import org.xml.sax.Locator;
@@ -114,7 +114,7 @@
* @return The enumerated value of the object name.
*/
public static byte enumerateObjectName(final String objectName) {
- return (byte) Arrays.binarySearch(Constants.OBJECT_NAME_LIST,
+ return (byte) Arrays.binarySearch(FoObject.OBJECT_NAME_LIST,
objectName);
}
@@ -130,218 +130,218 @@
column = locator.getColumnNumber();
}
switch (enumeration) {
- case Constants.FO_BASIC_LINK: {
+ case FoObject.BASIC_LINK: {
return new BasicLink(parent, propertyList, systemId, line, column);
}
- case Constants.FO_BIDI_OVERRIDE: {
+ case FoObject.BIDI_OVERRIDE: {
return new BidiOverride(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_BLOCK: {
+ case FoObject.BLOCK: {
return new Block(parent, propertyList, systemId, line, column);
}
- case Constants.FO_BLOCK_CONTAINER: {
+ case FoObject.BLOCK_CONTAINER: {
return new BlockContainer(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_BOOKMARK: {
+ case FoObject.BOOKMARK: {
return new Bookmark(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_BOOKMARK_TITLE: {
+ case FoObject.BOOKMARK_TITLE: {
return new BookmarkTitle(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_BOOKMARK_TREE: {
+ case FoObject.BOOKMARK_TREE: {
return new BookmarkTree(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_CHARACTER: {
+ case FoObject.CHARACTER: {
return new Character(parent, propertyList, systemId, line, column);
}
- case Constants.FO_COLOR_PROFILE: {
+ case FoObject.COLOR_PROFILE: {
return new ColorProfile(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_CONDITIONAL_PAGE_MASTER_REFERENCE: {
+ case FoObject.CONDITIONAL_PAGE_MASTER_REFERENCE: {
return new ConditionalPageMasterReference(parent, propertyList,
systemId, line, column);
}
- case Constants.FO_DECLARATIONS: {
+ case FoObject.DECLARATIONS: {
return new Declarations(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_EXTERNAL_GRAPHIC: {
+ case FoObject.EXTERNAL_GRAPHIC: {
return new ExternalGraphic(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_FLOAT: {
+ case FoObject.FLOAT: {
return new Float(parent, propertyList, systemId, line, column);
}
- case Constants.FO_FLOW: {
+ case FoObject.FLOW: {
return new Flow(parent, propertyList, systemId, line, column);
}
- case Constants.FO_FOOTNOTE: {
+ case FoObject.FOOTNOTE: {
return new Footnote(parent, propertyList, systemId, line, column);
}
- case Constants.FO_FOOTNOTE_BODY: {
+ case FoObject.FOOTNOTE_BODY: {
return new FootnoteBody(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_INITIAL_PROPERTY_SET: {
+ case FoObject.INITIAL_PROPERTY_SET: {
return new InitialPropertySet(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_INLINE: {
+ case FoObject.INLINE: {
return new Inline(parent, propertyList, systemId, line, column);
}
- case Constants.FO_INLINE_CONTAINER: {
+ case FoObject.INLINE_CONTAINER: {
return new InlineContainer(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_INSTREAM_FOREIGN_OBJECT: {
+ case FoObject.INSTREAM_FOREIGN_OBJECT: {
return new InstreamForeignObject(parent, propertyList, systemId,
line, column);
}
- case Constants.FO_LAYOUT_MASTER_SET: {
+ case FoObject.LAYOUT_MASTER_SET: {
return new LayoutMasterSet(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_LEADER: {
+ case FoObject.LEADER: {
return new Leader(parent, propertyList, systemId, line, column);
}
- case Constants.FO_LIST_BLOCK: {
+ case FoObject.LIST_BLOCK: {
return new ListBlock(parent, propertyList, systemId, line, column);
}
- case Constants.FO_LIST_ITEM: {
+ case FoObject.LIST_ITEM: {
return new ListItem(parent, propertyList, systemId, line, column);
}
- case Constants.FO_LIST_ITEM_BODY: {
+ case FoObject.LIST_ITEM_BODY: {
return new ListItemBody(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_LIST_ITEM_LABEL: {
+ case FoObject.LIST_ITEM_LABEL: {
return new ListItemLabel(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_MARKER: {
+ case FoObject.MARKER: {
return new Marker(parent, propertyList, systemId, line, column);
}
- case Constants.FO_MULTI_CASE: {
+ case FoObject.MULTI_CASE: {
return new MultiCase(parent, propertyList, systemId, line, column);
}
- case Constants.FO_MULTI_PROPERTIES: {
+ case FoObject.MULTI_PROPERTIES: {
return new MultiProperties(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_MULTI_PROPERTY_SET: {
+ case FoObject.MULTI_PROPERTY_SET: {
return new MultiPropertySet(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_MULTI_SWITCH: {
+ case FoObject.MULTI_SWITCH: {
return new MultiSwitch(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_MULTI_TOGGLE: {
+ case FoObject.MULTI_TOGGLE: {
return new MultiToggle(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_PAGE_NUMBER: {
+ case FoObject.PAGE_NUMBER: {
return new PageNumber(parent, propertyList, systemId, line, column);
}
- case Constants.FO_PAGE_NUMBER_CITATION: {
+ case FoObject.PAGE_NUMBER_CITATION: {
return new PageNumberCitation(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_PAGE_SEQUENCE: {
+ case FoObject.PAGE_SEQUENCE: {
return new PageSequence(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_PAGE_SEQUENCE_MASTER: {
+ case FoObject.PAGE_SEQUENCE_MASTER: {
return new PageSequenceMaster(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_REGION_AFTER: {
+ case FoObject.REGION_AFTER: {
return new RegionAfter(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_REGION_BEFORE: {
+ case FoObject.REGION_BEFORE: {
return new RegionBefore(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_REGION_BODY: {
+ case FoObject.REGION_BODY: {
return new RegionBody(parent, propertyList, systemId, line, column);
}
- case Constants.FO_REGION_END: {
+ case FoObject.REGION_END: {
return new RegionEnd(parent, propertyList, systemId, line, column);
}
- case Constants.FO_REGION_START: {
+ case FoObject.REGION_START: {
return new RegionStart(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES: {
+ case FoObject.REPEATABLE_PAGE_MASTER_ALTERNATIVES: {
return new RepeatablePMAlternatives(parent, propertyList,
systemId, line, column);
}
- case Constants.FO_REPEATABLE_PAGE_MASTER_REFERENCE: {
+ case FoObject.REPEATABLE_PAGE_MASTER_REFERENCE: {
return new RepeatablePMReference(parent, propertyList,
systemId, line, column);
}
- case Constants.FO_RETRIEVE_MARKER: {
+ case FoObject.RETRIEVE_MARKER: {
return new RetrieveMarker(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_ROOT: {
+ case FoObject.ROOT: {
return new Root(parent, propertyList, systemId, line, column);
}
- case Constants.FO_SIMPLE_PAGE_MASTER: {
+ case FoObject.SIMPLE_PAGE_MASTER: {
return new SimplePageMaster(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_SINGLE_PAGE_MASTER_REFERENCE: {
+ case FoObject.SINGLE_PAGE_MASTER_REFERENCE: {
return new SinglePageMasterReference(parent, propertyList, systemId,
line, column);
}
- case Constants.FO_STATIC_CONTENT: {
+ case FoObject.STATIC_CONTENT: {
return new StaticContent(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE: {
+ case FoObject.TABLE: {
return new Table(parent, propertyList, systemId, line, column);
}
- case Constants.FO_TABLE_AND_CAPTION: {
+ case FoObject.TABLE_AND_CAPTION: {
return new TableAndCaption(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE_BODY: {
+ case FoObject.TABLE_BODY: {
return new TableBody(parent, propertyList, systemId, line, column);
}
- case Constants.FO_TABLE_CAPTION: {
+ case FoObject.TABLE_CAPTION: {
return new TableCaption(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE_CELL: {
+ case FoObject.TABLE_CELL: {
return new TableCell(parent, propertyList, systemId, line, column);
}
- case Constants.FO_TABLE_COLUMN: {
+ case FoObject.TABLE_COLUMN: {
return new TableColumn(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE_FOOTER: {
+ case FoObject.TABLE_FOOTER: {
return new TableFooter(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE_HEADER: {
+ case FoObject.TABLE_HEADER: {
return new TableHeader(parent, propertyList, systemId, line,
column);
}
- case Constants.FO_TABLE_ROW: {
+ case FoObject.TABLE_ROW: {
return new TableRow(parent, propertyList, systemId, line, column);
}
- case Constants.FO_TITLE: {
+ case FoObject.TITLE: {
return new Title(parent, propertyList, systemId, line, column);
}
- case Constants.FO_WRAPPER: {
+ case FoObject.WRAPPER: {
return new Wrapper(parent, propertyList, systemId, line, column);
}
default: {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-01-27 22:12:13 UTC (rev 8537)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-01-28 20:14:08 UTC (rev 8538)
@@ -39,6 +39,7 @@
import org.axsl.areaW.RegionArea;
import org.axsl.areaW.RegionRABody;
import org.axsl.common.Constants;
+import org.axsl.common.FoObject;
import org.axsl.foR.FONode;
import org.axsl.foR.FONodeProxy;
import org.axsl.foR.FOText;
@@ -511,18 +512,18 @@
public static final byte[] listUnsupportedObjectsFO() {
return new byte[] {
- Constants.FO_BIDI_OVERRIDE,
- Constants.FO_FLOAT,
- Constants.FO_INITIAL_PROPERTY_SET,
- Constants.FO_INLINE_CONTAINER,
- Constants.FO_MULTI_PROPERTIES,
- Constants.FO_MULTI_CASE,
- Constants.FO_MULTI_PROPERTY_SET,
- Constants.FO_MULTI_SWITCH,
- Constants.FO_MULTI_TOGGLE,
- Constants.FO_TABLE_AND_CAPTION,
- Constants.FO_TABLE_CAPTION,
- Constants.FO_TITLE,
+ FoObject.BIDI_OVERRIDE,
+ FoObject.FLOAT,
+ FoObject.INITIAL_PROPERTY_SET,
+ FoObject.INLINE_CONTAINER,
+ FoObject.MULTI_PROPERTIES,
+ FoObject.MULTI_CASE,
+ FoObject.MULTI_PROPERTY_SET,
+ FoObject.MULTI_SWITCH,
+ FoObject.MULTI_TOGGLE,
+ FoObject.TABLE_AND_CAPTION,
+ FoObject.TABLE_CAPTION,
+ FoObject.TITLE,
};
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-28 21:18:09
|
Revision: 8539
http://svn.sourceforge.net/foray/?rev=8539&view=rev
Author: victormote
Date: 2007-01-28 13:18:07 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to new aXSL enumeration of XSL-FO Properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Background.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Boolean.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Border.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSpacing.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderStyle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Cue.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Font.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Keep.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Name.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PageDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VerticalAlign.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/prop/Lang.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/fo/prop/TestLineHeight.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 20:14:08 UTC (rev 8538)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 21:18:07 UTC (rev 8539)
@@ -37,6 +37,7 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.common.Constants;
+import org.axsl.common.FoProperty;
/**
* Class representing an XSL-FO property. A Property consists of two parts:
@@ -138,7 +139,7 @@
final StringBuffer buffer = new StringBuffer();
final FObj fobj = propertyList.getFObj();
buffer.append("Unexpected value for ");
- buffer.append(Constants.expandPropertyNameEnumeration(propertyType));
+ buffer.append(FoProperty.expandPropertyNameEnumeration(propertyType));
buffer.append(": \"" + value + "\"\n");
if (reason != null) {
buffer.append(" Reason: " + reason + "\n");
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-28 20:14:08 UTC (rev 8538)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-28 21:18:07 UTC (rev 8539)
@@ -144,6 +144,7 @@
import org.foray.fotree.xml.prop.Lang;
import org.axsl.common.Constants;
+import org.axsl.common.FoProperty;
import org.axsl.foR.FOContext;
import org.axsl.foR.ShadowEffect;
import org.axsl.foR.Shape;
@@ -271,8 +272,8 @@
}
public DtTextDeco getTextDecoration(final FOContext context) {
- final TextDecoration property = (TextDecoration) getProperty(Constants
- .FOPROP_TEXT_DECORATION);
+ final TextDecoration property = (TextDecoration) getProperty(
+ FoProperty.TEXT_DECORATION);
if (property == null) {
return TextDecoration.getValueNoInstance(context, fobj);
}
@@ -348,7 +349,7 @@
widthContainingBlock);
}
// Now try the shorthand property
- property = (Margin) getProperty(Constants.FOPROP_MARGIN);
+ property = (Margin) getProperty(FoProperty.MARGIN);
if (property != null) {
return property.getValue(context, absoluteDirection, fobj,
widthContainingBlock);
@@ -374,7 +375,7 @@
if (marginProperty != null) {
return true;
}
- marginProperty = (Margin) getProperty(Constants.FOPROP_MARGIN);
+ marginProperty = (Margin) getProperty(FoProperty.MARGIN);
if (marginProperty != null) {
return true;
}
@@ -406,7 +407,7 @@
}
public java.awt.Color getColor(final FOContext context) {
- final Color property = (Color) getProperty(Constants.FOPROP_COLOR);
+ final Color property = (Color) getProperty(FoProperty.COLOR);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -415,12 +416,12 @@
public short getWrapOption(final FOContext context) {
Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_WRAP_OPTION);
+ FoProperty.WRAP_OPTION);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- property = (Enumerated) getProperty(Constants.FOPROP_WHITE_SPACE);
+ property = (Enumerated) getProperty(FoProperty.WHITE_SPACE);
if (property != null) {
switch (property.getValue(context, fobj)) {
case Constants.FOVAL_NORMAL: {
@@ -435,18 +436,18 @@
}
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_WRAP_OPTION, fobj);
+ FoProperty.WRAP_OPTION, fobj);
}
public boolean getWhiteSpaceCollapse(final FOContext context) {
- final Boolean property = (Boolean) getProperty(Constants
- .FOPROP_WHITE_SPACE_COLLAPSE);
+ final Boolean property = (Boolean) getProperty(
+ FoProperty.WHITE_SPACE_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
// Try the shorthand
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_WHITE_SPACE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.WHITE_SPACE);
if (enumProperty != null) {
switch (enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_NORMAL: {
@@ -461,12 +462,12 @@
}
}
return Boolean.getValueNoInstance(context,
- fobj, Constants.FOPROP_WHITE_SPACE_COLLAPSE);
+ fobj, FoProperty.WHITE_SPACE_COLLAPSE);
}
public DtWritingMode getWritingMode(final FOContext context) {
- final WritingMode property = (WritingMode) getProperty(Constants
- .FOPROP_WRITING_MODE);
+ final WritingMode property = (WritingMode) getProperty(
+ FoProperty.WRITING_MODE);
if (property == null) {
return WritingMode.getValueNoInstance(context, fobj);
}
@@ -474,7 +475,7 @@
}
public String getId() {
- final Id property = (Id) getProperty(Constants.FOPROP_ID);
+ final Id property = (Id) getProperty(FoProperty.ID);
if (property != null) {
return property.getValue();
}
@@ -483,7 +484,7 @@
public String getInternalDestination() {
final InternalDestination property = (InternalDestination)
- getProperty(Constants.FOPROP_INTERNAL_DESTINATION);
+ getProperty(FoProperty.INTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
}
@@ -491,9 +492,8 @@
}
public String getExternalDestination() {
- final ExternalDestination property =
- (ExternalDestination) getProperty(Constants
- .FOPROP_EXTERNAL_DESTINATION);
+ final ExternalDestination property = (ExternalDestination) getProperty(
+ FoProperty.EXTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
}
@@ -521,16 +521,16 @@
public short getSpan(final FOContext context) {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_SPAN);
+ FoProperty.SPAN);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_SPAN, fobj);
+ FoProperty.SPAN, fobj);
}
public String getFlowName() {
- final Name property = (Name) getProperty(Constants.FOPROP_FLOW_NAME);
+ final Name property = (Name) getProperty(FoProperty.FLOW_NAME);
if (property != null) {
return property.getValue();
}
@@ -539,7 +539,7 @@
public String getMarkerClassName() {
final Name property = (Name) getProperty(
- Constants.FOPROP_MARKER_CLASS_NAME);
+ FoProperty.MARKER_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -547,8 +547,8 @@
}
public String getRetrieveClassName() {
- final Name property = (Name) getProperty(Constants
- .FOPROP_RETRIEVE_CLASS_NAME);
+ final Name property = (Name) getProperty(
+ FoProperty.RETRIEVE_CLASS_NAME);
if (property != null) {
return property.getValue();
}
@@ -556,28 +556,28 @@
}
public short getRetrievePosition() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RETRIEVE_POSITION);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RETRIEVE_POSITION);
if (property != null) {
return property.getValue();
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_RETRIEVE_POSITION);
+ FoProperty.RETRIEVE_POSITION);
}
public short getRetrieveBoundary() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RETRIEVE_BOUNDARY);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RETRIEVE_BOUNDARY);
if (property != null) {
return property.getValue();
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_RETRIEVE_BOUNDARY);
+ FoProperty.RETRIEVE_BOUNDARY);
}
public int getColumnNumber(final FOContext context) {
- final ColumnNumber property = (ColumnNumber) getProperty(Constants
- .FOPROP_COLUMN_NUMBER);
+ final ColumnNumber property = (ColumnNumber) getProperty(
+ FoProperty.COLUMN_NUMBER);
if (property == null) {
return ColumnNumber.getValueNoInstance(context, fobj);
}
@@ -586,7 +586,7 @@
public int getNumberColumnsSpanned() {
final NumberColumnsSpanned property = (NumberColumnsSpanned)
- getProperty(Constants.FOPROP_NUMBER_COLUMNS_SPANNED);
+ getProperty(FoProperty.NUMBER_COLUMNS_SPANNED);
if (property == null) {
return NumberColumnsSpanned.getValueNoInstance();
}
@@ -595,7 +595,7 @@
public int getNumberRowsSpanned() {
final NumberRowsSpanned property = (NumberRowsSpanned)
- getProperty(Constants.FOPROP_NUMBER_ROWS_SPANNED);
+ getProperty(FoProperty.NUMBER_ROWS_SPANNED);
if (property == null) {
return NumberRowsSpanned.getValueNoInstance();
}
@@ -603,18 +603,18 @@
}
public short getBorderCollapse(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_BORDER_COLLAPSE);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.BORDER_COLLAPSE);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_BORDER_COLLAPSE, fobj);
+ FoProperty.BORDER_COLLAPSE, fobj);
}
public short getDisplayAlign(final FOContext context) {
- final DisplayAlign property = (DisplayAlign) getProperty(Constants
- .FOPROP_DISPLAY_ALIGN);
+ final DisplayAlign property = (DisplayAlign) getProperty(
+ FoProperty.DISPLAY_ALIGN);
if (property == null) {
return DisplayAlign.traitValueNoInstance();
}
@@ -622,21 +622,20 @@
}
public short getRelativeAlign(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_RELATIVE_ALIGN);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.RELATIVE_ALIGN);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_RELATIVE_ALIGN, fobj);
+ FoProperty.RELATIVE_ALIGN, fobj);
}
public int getBorderSeparationIPD(final FOContext context) {
BorderSeparation property = (BorderSeparation)
- getProperty(Constants.FOPROP_BORDER_SEPARATION);
+ getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- property = (BorderSpacing) getProperty(Constants
- .FOPROP_BORDER_SPACING);
+ property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
return property.getValue(context, Constants.AXIS_IP, fobj);
@@ -647,10 +646,9 @@
public int getBorderSeparationBPD(final FOContext context) {
BorderSeparation property = (BorderSeparation)
- getProperty(Constants.FOPROP_BORDER_SEPARATION);
+ getProperty(FoProperty.BORDER_SEPARATION);
if (property == null) {
- property = (BorderSpacing) getProperty(Constants
- .FOPROP_BORDER_SPACING);
+ property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
return property.getValue(context, Constants.AXIS_BP, fobj);
@@ -661,7 +659,7 @@
public int getNumberColumnsRepeated() {
final NumberColumnsRepeated property = (NumberColumnsRepeated)
- getProperty(Constants.FOPROP_NUMBER_COLUMNS_REPEATED);
+ getProperty(FoProperty.NUMBER_COLUMNS_REPEATED);
if (property == null) {
return NumberColumnsRepeated.getValueNoInstance();
}
@@ -674,8 +672,8 @@
* @return The <em>nominal</em> width.
*/
public int getColumnWidth(final FOContext context, final int tableWidth) {
- final ColumnWidth property = (ColumnWidth) getProperty(Constants
- .FOPROP_COLUMN_WIDTH);
+ final ColumnWidth property = (ColumnWidth) getProperty(
+ FoProperty.COLUMN_WIDTH);
if (property == null) {
return ColumnWidth.getValueNoInstance();
}
@@ -683,8 +681,8 @@
}
public double getColumnWidthTableUnits() {
- final ColumnWidth property = (ColumnWidth) getProperty(Constants
- .FOPROP_COLUMN_WIDTH);
+ final ColumnWidth property = (ColumnWidth) getProperty(
+ FoProperty.COLUMN_WIDTH);
if (property == null) {
return ColumnWidth.getValueNoInstance();
}
@@ -692,12 +690,12 @@
}
public short getBreakAfter(final FOContext context) {
- Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_BREAK_AFTER);
+ Enumerated property = (Enumerated) getProperty(
+ FoProperty.BREAK_AFTER);
if (property != null) {
return property.getValue(context, fobj);
}
- property = (Enumerated) getProperty(Constants.FOPROP_PAGE_BREAK_AFTER);
+ property = (Enumerated) getProperty(FoProperty.PAGE_BREAK_AFTER);
if (property != null) {
switch(property.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -718,20 +716,20 @@
}
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_BREAK_AFTER, fobj);
+ FoProperty.BREAK_AFTER, fobj);
}
public int getKeepTogether(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_TOGETHER);
+ FoProperty.KEEP_TOGETHER);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_TOGETHER,
+ FoProperty.KEEP_TOGETHER,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_INSIDE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_INSIDE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -760,14 +758,14 @@
public int getKeepWithNext(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_WITH_NEXT);
+ FoProperty.KEEP_WITH_NEXT);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_WITH_NEXT,
+ FoProperty.KEEP_WITH_NEXT,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_AFTER);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_AFTER);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -805,14 +803,14 @@
public int getKeepWithPrevious(final FOContext context,
final byte subProperty) {
final Keep property = (Keep) getProperty(
- Constants.FOPROP_KEEP_WITH_PREVIOUS);
+ FoProperty.KEEP_WITH_PREVIOUS);
if (property == null) {
return Keep.getValueNoInstance(context,
- Constants.FOPROP_KEEP_WITH_PREVIOUS,
+ FoProperty.KEEP_WITH_PREVIOUS,
subProperty, fobj);
}
- final Enumerated enumProperty = (Enumerated) getProperty(Constants
- .FOPROP_PAGE_BREAK_BEFORE);
+ final Enumerated enumProperty = (Enumerated) getProperty(
+ FoProperty.PAGE_BREAK_BEFORE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case Constants.FOVAL_AUTO: {
@@ -849,7 +847,7 @@
public String getMasterReference() {
final Name property = (Name) getProperty(
- Constants.FOPROP_MASTER_REFERENCE);
+ FoProperty.MASTER_REFERENCE);
if (property != null) {
return property.getValue();
}
@@ -858,36 +856,35 @@
public short getPagePosition() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_PAGE_POSITION);
+ FoProperty.PAGE_POSITION);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_PAGE_POSITION);
+ return Enumerated.getValueNoInstance(FoProperty.PAGE_POSITION);
}
public short getOddOrEven() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_ODD_OR_EVEN);
+ FoProperty.ODD_OR_EVEN);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_ODD_OR_EVEN);
+ return Enumerated.getValueNoInstance(FoProperty.ODD_OR_EVEN);
}
public short getBlankOrNotBlank() {
final Enumerated property = (Enumerated) getProperty(
- Constants.FOPROP_BLANK_OR_NOT_BLANK);
+ FoProperty.BLANK_OR_NOT_BLANK);
if (property != null) {
return property.getValue(null, fobj);
}
return Enumerated.getValueNoInstance(
- Constants.FOPROP_BLANK_OR_NOT_BLANK);
+ FoProperty.BLANK_OR_NOT_BLANK);
}
public int getInitialPageNumber(final int lastPageNumberUsed) {
- final InitialPageNumber property =
- (InitialPageNumber) getProperty(Constants
- .FOPROP_INITIAL_PAGE_NUMBER);
+ final InitialPageNumber property = (InitialPageNumber) getProperty(
+ FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
/* Null context is OK here as this trait is not dependent on
* context. */
@@ -899,8 +896,7 @@
public short getRawInitialPageNumber() {
final InitialPageNumber property =
- (InitialPageNumber) getProperty(Constants
- .FOPROP_INITIAL_PAGE_NUMBER);
+ (InitialPageNumber) getProperty(FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
return property.getRawValue(fobj);
}
@@ -908,7 +904,7 @@
}
public String getFormat() {
- final Format property = (Format) getProperty(Constants.FOPROP_FORMAT);
+ final Format property = (Format) getProperty(FoProperty.FORMAT);
if (property != null) {
return property.getValue();
}
@@ -916,18 +912,18 @@
}
public char getGroupingSeparator() {
- final Character property = (Character) getProperty(Constants
- .FOPROP_GROUPING_SEPARATOR);
+ final Character property = (Character) getProperty(
+ FoProperty.GROUPING_SEPARATOR);
if (property != null) {
return property.getValue();
}
return Character.getValueNoInstance(
- Constants.FOPROP_GROUPING_SEPARATOR);
+ FoProperty.GROUPING_SEPARATOR);
}
public int getGroupingSize() {
- final GroupingSize property = (GroupingSize) getProperty(Constants
- .FOPROP_GROUPING_SIZE);
+ final GroupingSize property = (GroupingSize) getProperty(
+ FoProperty.GROUPING_SIZE);
if (property != null) {
return property.getValue();
}
@@ -935,17 +931,17 @@
}
public short getLetterValue() {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_LETTER_VALUE);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.LETTER_VALUE);
if (property != null) {
return property.getValue();
}
- return Enumerated.getValueNoInstance(Constants.FOPROP_LETTER_VALUE);
+ return Enumerated.getValueNoInstance(FoProperty.LETTER_VALUE);
}
public short getForcePageCount(final FOContext context) {
final ForcePageCount property = (ForcePageCount)
- getProperty(Constants.FOPROP_FORCE_PAGE_COUNT);
+ getProperty(FoProperty.FORCE_PAGE_COUNT);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -953,7 +949,7 @@
}
public String getMasterName() {
- final Name property = (Name) getProperty(Constants.FOPROP_MASTER_NAME);
+ final Name property = (Name) getProperty(FoProperty.MASTER_NAME);
if (property != null) {
return property.getValue();
}
@@ -961,8 +957,8 @@
}
public String getRegionName() {
- final RegionName property = (RegionName) getProperty(Constants
- .FOPROP_REGION_NAME);
+ final RegionName property = (RegionName) getProperty(
+ FoProperty.REGION_NAME);
if (property != null) {
return property.getValue();
}
@@ -974,7 +970,7 @@
public boolean getPrecedence() {
final Boolean property = (Boolean) getProperty(
- Constants.FOPROP_PRECEDENCE);
+ FoProperty.PRECEDENCE);
/* Null context is OK, because the object this applies to cannot be
* insider a marker. */
final FOContext context = null;
@@ -982,11 +978,11 @@
return property.getValue(context, fobj);
}
return Boolean.getValueNoInstance(context, fobj,
- Constants.FOPROP_PRECEDENCE);
+ FoProperty.PRECEDENCE);
}
public int getExtent() {
- final Extent property = (Extent) getProperty(Constants.FOPROP_EXTENT);
+ final Extent property = (Extent) getProperty(FoProperty.EXTENT);
if (property != null) {
return property.getValue(fobj);
}
@@ -994,8 +990,8 @@
}
public int getColumnGap(final FOContext context) {
- final ColumnGap property = (ColumnGap) getProperty(Constants
- .FOPROP_COLUMN_GAP);
+ final ColumnGap property = (ColumnGap) getProperty(
+ FoProperty.COLUMN_GAP);
if (property != null) {
return property.getValue(context, fobj);
}
@@ -1003,18 +999,18 @@
}
public short getOverflow(final FOContext context) {
- final Enumerated property = (Enumerated) getProperty(Constants
- .FOPROP_OVERFLOW);
+ final Enumerated property = (Enumerated) getProperty(
+ FoProperty.OVERFLOW);
if (property != null) {
return property.getValue(context, fobj);
}
return Enumerated.getValueNoInstance(context,
- Constants.FOPROP_OVERFLOW, fobj);
+ FoProperty.OVERFLOW, fobj);
}
public int getColumnCount(final FOContext context) {
- final ColumnCount property = (ColumnCount) getProperty(Constants
- .FOPROP_COLUMN_COUNT);
+ final ColumnCount property = (ColumnCount) getProperty(
+ FoProperty.COLUMN_COUNT);
if (property != null) {
int columnCount = property.getValue(context, fobj);
if ((columnCount > 1)
@@ -1032,7 +1028,7 @@
public int getMaximumRepeats() {
final MaximumRepeats property = (MaximumRepeats)
- getProperty(Constants.FOPROP_MAXIMUM_REPEATS);
+ getProperty(FoProperty.MAXIMUM_REPEATS);
if (property != null) {
return property.getValue(fobj);
}
@@ -1049,7 +1045,7 @@
// Try the shorthand.
/* Null context is OK, because the object can't be inside a marker. */
final FOContext context = null;
- final Size sizeProperty = (Size) getProperty(Constants.FOPROP_SIZE);
+ final Size sizeProperty = (Size) getProperty(FoProperty.SIZE);
if (sizeProperty != null) {
return sizeProperty.getValue(context, fobj, axis);
}
@@ -1065,8 +1061,8 @@
}
public short getTextAlign(final FOContext context) {
- final TextAlign property = (TextAlign) getProperty(Constants
- .FOPROP_TEXT_ALIGN);
+ final TextAlign property = (TextAlign) getProperty(
+ FoProperty.TEXT_ALIGN);
if (property == null) {
return TextAlign.getValueNoInstance(context, fobj);
}
@@ -1074,8 +1070,8 @@
}
public String getTextAlignString() {
- final TextAlign property = (TextAlign) getProperty(Constants
- .FOPROP_TEXT_ALIGN);
+ final TextAlign property = (TextAlign) getProperty(
+ FoProperty.TEXT_ALIGN);
if (property == null) {
return null;
}
@@ -1083,8 +1079,8 @@
}
public short getTextAlignLast(final FOContext context) {
- final TextAlignLast property = (TextAlignLast) getProperty(Constants
- .FOPROP_TEXT_ALIGN_LAST);
+ final TextAlignLast property = (TextAlignLast) getProperty(
+ FoProperty.TEXT_ALIGN_LAST);
if (property == null) {
return TextAlignLast.getValueNoInstance(con...
[truncated message content] |
|
From: <vic...@us...> - 2007-01-28 21:58:44
|
Revision: 8540
http://svn.sourceforge.net/foray/?rev=8540&view=rev
Author: victormote
Date: 2007-01-28 13:58:42 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to new aXSL enumeration of XSL-FO Property Values.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentAdjust.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AlignmentBaseline.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AudioDial.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Azimuth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Background.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundColor.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/BackgroundPosition.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BaselineShift.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Boolean.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Border.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderStyle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Clip.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Color.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnGap.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentType.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Country.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Cue.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DisplayAlign.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/DominantBaseline.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Elevation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Enumerated.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Font.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSize.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontSizeAdjust.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontStretch.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontStyle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontVariant.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontWeight.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ForcePageCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphLadderCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphPushCharCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/HyphRemainCharCount.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/InitialPageNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Keep.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Language.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LastLineEndIndent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderLength.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderPatternWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LetterSpacing.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/MaximumRepeats.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Name.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Orphans.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PageDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pause.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Pitch.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ProvDistanceBetween.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ProvLabelSeparation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RefId.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Role.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Script.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SourceDocument.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SpeechRate.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Src.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SwitchTo.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TableLayout.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetPresentationContext.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetProcessingContext.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TargetStylesheet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextAlign.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextAlignLast.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextAltitude.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDecoration.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextDepth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextIndent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TextShadow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/TreatAsWordSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VerticalAlign.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Volume.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Widows.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/WordSpacing.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ZIndex.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtRectangle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtSpace.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnProportionalColWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/prop/Lang.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTableBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/Status.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java
trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -36,6 +36,7 @@
import org.axsl.areaW.NormalBlockArea;
import org.axsl.areaW.TableArea;
import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FONode;
import org.axsl.foR.WritingMode;
import org.axsl.foR.fo.BasicLink;
@@ -1132,8 +1133,8 @@
public boolean backgroundRepeatX() {
switch (traitBackgroundRepeat()) {
- case Constants.FOVAL_REPEAT_Y:
- case Constants.FOVAL_NO_REPEAT: {
+ case FoValue.REPEAT_Y:
+ case FoValue.NO_REPEAT: {
return false;
}
}
@@ -1142,8 +1143,8 @@
public boolean backgroundRepeatY() {
switch (traitBackgroundRepeat()) {
- case Constants.FOVAL_REPEAT_X:
- case Constants.FOVAL_NO_REPEAT: {
+ case FoValue.REPEAT_X:
+ case FoValue.NO_REPEAT: {
return false;
}
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -31,6 +31,7 @@
import org.axsl.areaR.BlockContainerArea;
import org.axsl.areaR.RenderVisitor;
import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.RetrieveMarker;
import org.axsl.graphicR.Graphic;
@@ -47,7 +48,7 @@
}
public boolean isAbsolutelyPositioned() {
- if (this.traitAbsolutePosition() == Constants.FOVAL_AUTO) {
+ if (this.traitAbsolutePosition() == FoValue.AUTO) {
return false;
}
return true;
@@ -57,7 +58,7 @@
* {@inheritDoc}
*/
public int crOriginBPDOffset() {
- if (this.traitAbsolutePosition() == Constants.FOVAL_ABSOLUTE) {
+ if (this.traitAbsolutePosition() == FoValue.ABSOLUTE) {
final int top = this.traitTop();
if (top != Constants.ABSOLUTE_POSITION_AUTO) {
/* If "top" is specified, that is the offset needed. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -28,6 +28,8 @@
package org.foray.area;
+import org.axsl.areaR.RenderVisitor;
+import org.axsl.common.FoValue;
import org.axsl.foR.FOText;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.ExternalGraphic;
@@ -37,9 +39,6 @@
import org.axsl.foR.fo.PageNumberCitation;
import org.axsl.foR.fo.RetrieveMarker;
-import org.axsl.areaR.RenderVisitor;
-import org.axsl.common.Constants;
-
/**
* An Area containing a leader item.
* <p>There are at least two approaches that can be taken in the design of this
@@ -104,9 +103,9 @@
* @see FObj#traitLeaderPattern
*/
public short traitLeaderPattern() {
- if (traitGeneratedBy().traitLeaderPattern(this) == Constants.FOVAL_RULE
+ if (traitGeneratedBy().traitLeaderPattern(this) == FoValue.RULE
&& traitGeneratedBy().traitRuleThickness(this) <= 0) {
- return Constants.FOVAL_SPACE;
+ return FoValue.SPACE;
}
return traitGeneratedBy().traitLeaderPattern(this);
}
@@ -175,7 +174,7 @@
* and the start-edge of the next.
*/
public int actualWordSpacing() {
- if (traitLeaderPattern() == Constants.FOVAL_DOTS) {
+ if (traitLeaderPattern() == FoValue.DOTS) {
return dotLeaderPatternWidth()
- getCharWidth('.')
- getCharWidth(' ');
@@ -192,10 +191,10 @@
*/
public int dotLeaderTextOffset() {
switch (traitLeaderAlignment()) {
- case Constants.FOVAL_REFERENCE_AREA: {
+ case FoValue.REFERENCE_AREA: {
break;
}
- case Constants.FOVAL_PAGE: {
+ case FoValue.PAGE: {
break;
}
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -31,6 +31,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
import org.axsl.foR.FOText;
import org.axsl.foR.FOTextContent;
@@ -76,15 +77,15 @@
*/
protected int alignmentAdjustment() {
switch (traitTextAlign()) {
- case Constants.FOVAL_START:
+ case FoValue.START:
return 0;
- case Constants.FOVAL_END:
+ case FoValue.END:
return this.progressionDimensionAvailable();
- case Constants.FOVAL_CENTER:
+ case FoValue.CENTER:
return this.progressionDimensionAvailable() / 2;
- case Constants.FOVAL_JUSTIFY:
+ case FoValue.JUSTIFY:
return 0;
- case Constants.FOVAL_NOT_A_KEYWORD: {
+ case FoValue.NOT_A_KEYWORD: {
/*
* This is a valid setting, and means that we should find the
* string to align the text on by using
@@ -114,7 +115,7 @@
}
}
// No need to optimize unless we are justifying the line.
- if (traitTextAlign() != Constants.FOVAL_JUSTIFY) {
+ if (traitTextAlign() != FoValue.JUSTIFY) {
return;
}
/*
@@ -517,11 +518,11 @@
public int startAlignmentAdjustment() {
final short textAlign = traitGeneratedBy().traitTextAlign(this);
switch (textAlign) {
- case Constants.FOVAL_END:
- case Constants.FOVAL_RIGHT: {
+ case FoValue.END:
+ case FoValue.RIGHT: {
return totalAlignmentAdjustment();
}
- case Constants.FOVAL_CENTER: {
+ case FoValue.CENTER: {
return totalAlignmentAdjustment() / 2;
}
default: {
@@ -698,34 +699,34 @@
if (this.textAlignLastApplies()) {
final short textAlignLast = traitGeneratedBy().traitTextAlignLast(
this);
- if (textAlignLast == Constants.FOVAL_RELATIVE) {
- if (textAlign == Constants.FOVAL_JUSTIFY) {
- return Constants.FOVAL_START;
+ if (textAlignLast == FoValue.RELATIVE) {
+ if (textAlign == FoValue.JUSTIFY) {
+ return FoValue.START;
}
} else {
textAlign = textAlignLast;
}
}
switch (textAlign) {
- case Constants.FOVAL_LEFT: {
- return Constants.FOVAL_START;
+ case FoValue.LEFT: {
+ return FoValue.START;
}
- case Constants.FOVAL_RIGHT: {
- return Constants.FOVAL_END;
+ case FoValue.RIGHT: {
+ return FoValue.END;
}
- case Constants.FOVAL_INSIDE: {
+ case FoValue.INSIDE: {
if (this.getPage().getBindingEdge()
== Constants.DIRECTION_END) {
- return Constants.FOVAL_END;
+ return FoValue.END;
}
- return Constants.FOVAL_START;
+ return FoValue.START;
}
- case Constants.FOVAL_OUTSIDE: {
+ case FoValue.OUTSIDE: {
if (this.getPage().getBindingEdge()
== Constants.DIRECTION_END) {
- return Constants.FOVAL_START;
+ return FoValue.START;
}
- return Constants.FOVAL_END;
+ return FoValue.END;
}
default: {
return textAlign;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/MainRA.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -31,7 +31,7 @@
import org.axsl.areaR.MainReferenceArea;
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
-import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.Block;
import org.axsl.foR.fo.BlockContainer;
@@ -71,7 +71,7 @@
public NormalFlowRA getNextArea(final FObj fo) throws AreaWException {
isNewSpanArea = false;
- int span = Constants.FOVAL_NONE;
+ int span = FoValue.NONE;
if (fo instanceof Block) {
span = ((Block) fo).traitSpan(this);
} else if (fo instanceof BlockContainer) {
@@ -79,7 +79,7 @@
}
if (this.getChildren().isEmpty()) {
- if (span == Constants.FOVAL_ALL) {
+ if (span == FoValue.ALL) {
return addSpanArea(1);
}
return addSpanArea(traitColumnCount());
@@ -88,19 +88,19 @@
final List spanAreas = this.getChildren();
final SpanRA spanArea = (SpanRA) spanAreas.get(spanAreas.size() - 1);
- if ((span == Constants.FOVAL_ALL)
+ if ((span == FoValue.ALL)
&& (spanArea.traitColumnCount() == 1)) {
// return the single column area in the same span area
return spanArea.getCurrentColumnArea();
- } else if ((span == Constants.FOVAL_NONE)
+ } else if ((span == FoValue.NONE)
&& (spanArea.traitColumnCount()
== this.traitColumnCount())) {
// return the current column area in the same span area
return spanArea.getCurrentColumnArea();
- } else if (span == Constants.FOVAL_ALL) {
+ } else if (span == FoValue.ALL) {
// create new span area with one column; return column area
return addSpanArea(1);
- } else if (span == Constants.FOVAL_NONE) {
+ } else if (span == FoValue.NONE) {
/* create new span area with multiple columns; return first column
* area */
return addSpanArea(this.traitColumnCount());
@@ -145,22 +145,22 @@
return false;
}
- int span = Constants.FOVAL_NONE;
+ int span = FoValue.NONE;
if (fo instanceof Block) {
span = ((Block) fo).traitSpan(this);
} else if (fo instanceof BlockContainer) {
span = ((BlockContainer) fo).traitSpan(this);
}
- if ((span == Constants.FOVAL_ALL)
+ if ((span == FoValue.ALL)
&& (spanArea.traitColumnCount() == 1)) {
return false;
- } else if ((span == Constants.FOVAL_NONE)
+ } else if ((span == FoValue.NONE)
&& (spanArea.traitColumnCount() == traitColumnCount())) {
return false;
- } else if (span == Constants.FOVAL_ALL) {
+ } else if (span == FoValue.ALL) {
return true;
- } else if (span == Constants.FOVAL_NONE) {
+ } else if (span == FoValue.NONE) {
return false;
} else {
return false;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -31,7 +31,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
import org.axsl.areaW.PageArea;
-import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FOTreeException;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.PageMasterResolver;
@@ -250,7 +250,7 @@
final PageSequence previousPageSequence
= previousPageCollection.getPageSequence();
if (previousPageSequence.traitForcePageCount(this)
- == Constants.FOVAL_AUTO) {
+ == FoValue.AUTO) {
/*
* In this case we'll try to put the added page in the previous
* page-sequence, to comply with the standard.
@@ -275,7 +275,7 @@
public void padPagesAtEnd() throws AreaWException {
final PageSequence pageSeq = getPageSequence();
switch (pageSeq.traitForcePageCount(this)) {
- case Constants.FOVAL_AUTO: {
+ case FoValue.AUTO: {
/*
* The standard would seem to imply that force-page-count="auto"
* needs to consider the initial-page-number value for the
@@ -285,25 +285,25 @@
*/
return;
}
- case Constants.FOVAL_EVEN: {
+ case FoValue.EVEN: {
if (getPageCount() % 2 != 0) {
makeBlankPage();
}
return;
}
- case Constants.FOVAL_ODD: {
+ case FoValue.ODD: {
if (getPageCount() % 2 == 0) {
makeBlankPage();
}
return;
}
- case Constants.FOVAL_END_ON_EVEN: {
+ case FoValue.END_ON_EVEN: {
if (getCurrentPageNumber() % 2 != 0) {
makeBlankPage();
}
return;
}
- case Constants.FOVAL_END_ON_ODD: {
+ case FoValue.END_ON_ODD: {
if (getCurrentPageNumber() % 2 == 0) {
makeBlankPage();
}
@@ -369,7 +369,7 @@
final MainRA mainRA = bodyArea.getMainRA();
final RegionBody body = (RegionBody) mainRA.traitGeneratedBy();
int columnsNeeded = -1;
- if (nextFObj.traitSpan(this) == Constants.FOVAL_NONE) {
+ if (nextFObj.traitSpan(this) == FoValue.NONE) {
columnsNeeded = mainRA.traitColumnCount();
} else {
columnsNeeded = 1;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -34,6 +34,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.Marker;
import org.axsl.foR.fo.PageSequence;
@@ -463,7 +464,7 @@
// search forward if 'first-starting-within-page' or
// 'first-including-carryover'
if (retrieve.traitRetrievePosition()
- == Constants.FOVAL_FIRST_INCLUDING_CARRYOVER) {
+ == FoValue.FIRST_INCLUDING_CARRYOVER) {
for (int i = 0; i < pageMarkers.size(); i++) {
final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
@@ -472,7 +473,7 @@
}
}
} else if (retrieve.traitRetrievePosition()
- == Constants.FOVAL_FIRST_STARTING_WITHIN_PAGE) {
+ == FoValue.FIRST_STARTING_WITHIN_PAGE) {
for (int i = 0; i < pageMarkers.size(); i++) {
final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
@@ -483,7 +484,7 @@
}
}
} else if (retrieve.traitRetrievePosition()
- == Constants.FOVAL_LAST_STARTING_WITHIN_PAGE) {
+ == FoValue.LAST_STARTING_WITHIN_PAGE) {
for (int i = pageMarkers.size() - 1; i >= 0; i--) {
final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
@@ -494,7 +495,7 @@
}
}
} else if (retrieve.traitRetrievePosition()
- == Constants.FOVAL_LAST_ENDING_WITHIN_PAGE) {
+ == FoValue.LAST_ENDING_WITHIN_PAGE) {
for (int i = pageMarkers.size() - 1; i >= 0; i--) {
final Marker currentMarker = (Marker) pageMarkers.get(i);
if (currentMarker.traitMarkerClassName().equals(
@@ -510,14 +511,14 @@
ArrayList additionalMarkers = null;
final PageCollection pageCollection = getPageCollection();
if (retrieve.traitRetrieveBoundary()
- == Constants.FOVAL_PAGE_SEQUENCE) {
+ == FoValue.PAGE_SEQUENCE) {
final PageSequence pageSequence = pageCollection.getPageSequence();
if (pageSequence == getPageSequence()) {
additionalMarkers = pageCollection
.getCurrentPageSequenceMarkers();
}
} else if (retrieve.traitRetrieveBoundary()
- == Constants.FOVAL_DOCUMENT) {
+ == FoValue.DOCUMENT) {
additionalMarkers = pageCollection.getDocumentMarkers();
}
if (additionalMarkers == null) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -31,7 +31,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaR.SpanArea;
import org.axsl.areaW.AreaWException;
-import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.RegionBody;
@@ -179,7 +179,7 @@
* If the span requirement is for multiple columns & this has them,
* then the requirements match & simply return this.
*/
- if (fo.traitSpan(this) == Constants.FOVAL_NONE
+ if (fo.traitSpan(this) == FoValue.NONE
&& this.traitColumnCount() > 1) {
return this;
}
@@ -187,13 +187,13 @@
* If the span requirement is for only one column & this has only one,
* then the requirements match & simply return this.
*/
- if (fo.traitSpan(this) == Constants.FOVAL_ALL
+ if (fo.traitSpan(this) == FoValue.ALL
&& this.traitColumnCount() == 1) {
return this;
}
// The requirements do not match, so we need to create a new span area.
int numColumns = 0;
- if (fo.traitSpan(this) == Constants.FOVAL_ALL) {
+ if (fo.traitSpan(this) == FoValue.ALL) {
numColumns = 1;
} else {
numColumns = fo.traitColumnCount(this);
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-01-28 21:18:07 UTC (rev 8539)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-01-28 21:58:42 UTC (rev 8540)
@@ -30,7 +30,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaR.TableCellArea;
-import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.fo.RetrieveMarker;
import org.axsl.foR.fo.TableCell;
import or...
[truncated message content] |
|
From: <vic...@us...> - 2007-01-28 23:16:00
|
Revision: 8542
http://svn.sourceforge.net/foray/?rev=8542&view=rev
Author: victormote
Date: 2007-01-28 15:16:00 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Conform to new method names in aXSL.
Modified Paths:
--------------
trunk/foray/foray-app/.classpath
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-app/.classpath 2007-01-28 23:16:00 UTC (rev 8542)
@@ -36,6 +36,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen-R"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayHyphen-R"/>
+ <classpathentry kind="lib" path="/FOrayHyphen-R/build/ant/foray-hyphen-r-0.3-dev-rsrc.jar"/>
<classpathentry kind="var" path="FORAY_LIB_ROOT/foray-hyphen-r-0.3-rsrc.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -139,7 +139,7 @@
final StringBuffer buffer = new StringBuffer();
final FObj fobj = propertyList.getFObj();
buffer.append("Unexpected value for ");
- buffer.append(FoProperty.expandPropertyNameEnumeration(propertyType));
+ buffer.append(FoProperty.toXslFo(propertyType));
buffer.append(": \"" + value + "\"\n");
if (reason != null) {
buffer.append(" Reason: " + reason + "\n");
@@ -206,7 +206,7 @@
}
for (int i = 0; i < validKeywords.length; i++) {
final short kwIndex = validKeywords[i];
- final String keyword = FoValue.expandPropertyConstant(kwIndex);
+ final String keyword = FoValue.toXslFo(kwIndex);
if (possibleKeyword.equals(keyword)) {
return kwIndex;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/NamespaceFO.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -113,7 +113,7 @@
}
public String getPropertyName(final short propertyType) {
- return FoProperty.expandPropertyNameEnumeration(propertyType);
+ return FoProperty.toXslFo(propertyType);
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnFromParent.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -70,7 +70,7 @@
throws PropertyException {
String propertySought = null;
if (getArgs() == null || getArgs().length == 0) {
- propertySought = FoProperty.expandPropertyNameEnumeration(
+ propertySought = FoProperty.toXslFo(
callingProperty.getPropertyType());
} else {
final PropertyValue pv = getArgs()[0];
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnInheritedProp.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -70,7 +70,7 @@
throws PropertyException {
String propertySought = null;
if (getArgs() == null || getArgs().length == 0) {
- propertySought = FoProperty.expandPropertyNameEnumeration(
+ propertySought = FoProperty.toXslFo(
callingProperty.getPropertyType());
} else {
final PropertyValue pv = getArgs()[0];
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/FnNearestSpecProp.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -70,7 +70,7 @@
throws PropertyException {
String propertySought = null;
if (getArgs() == null || getArgs().length == 0) {
- propertySought = FoProperty.expandPropertyNameEnumeration(
+ propertySought = FoProperty.toXslFo(
callingProperty.getPropertyType());
} else {
final PropertyValue pv = getArgs()[0];
Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-01-28 22:11:42 UTC (rev 8541)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-01-28 23:16:00 UTC (rev 8542)
@@ -452,7 +452,7 @@
final StringBuffer buffer = new StringBuffer();
outputGeneratedBy(area, buffer);
outputAttribute(buffer, "leader-pattern",
- FoValue.expandPropertyConstant(area.traitLeaderPattern()));
+ FoValue.toXslFo(area.traitLeaderPattern()));
outputAttribute(buffer, "leader-length",
area.getProgressionDimension());
outputAttribute(buffer, "rule-thickness", area.traitRuleThickness());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 02:10:17
|
Revision: 8544
http://svn.sourceforge.net/foray/?rev=8544&view=rev
Author: victormote
Date: 2007-01-29 18:10:17 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Conform to aXSL changes regarding the creation of a new Baseline enum.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-29 01:02:13 UTC (rev 8543)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-30 02:10:17 UTC (rev 8544)
@@ -31,7 +31,7 @@
import org.foray.font.format.Kerning;
import org.foray.font.format.Panose;
-import org.axsl.common.Constants;
+import org.axsl.common.Baseline;
import org.apache.commons.logging.Log;
@@ -421,36 +421,36 @@
public int estimateBaseline(final int writingMode, final int baselineType,
final int fontSize) {
switch (baselineType) {
- case Constants.BASELINE_ALPHABETIC: {
+ case Baseline.ALPHABETIC: {
return fontSize + this.getDescender(fontSize);
}
- case Constants.BASELINE_IDEOGRAPHIC: {
+ case Baseline.IDEOGRAPHIC: {
return fontSize;
}
- case Constants.BASELINE_HANGING: {
+ case Baseline.HANGING: {
return Math.round(fontSize
* FOrayFont.DEFAULT_HANGING_BASELINE_POSITION);
}
- case Constants.BASELINE_MATHEMATICAL: {
+ case Baseline.MATHEMATICAL: {
/* For now, this is the same as Alphabetic. */
return fontSize + this.getDescender(fontSize);
}
- case Constants.BASELINE_CENTRAL: {
+ case Baseline.CENTRAL: {
return fontSize / 2;
}
- case Constants.BASELINE_MIDDLE: {
+ case Baseline.MIDDLE: {
/* First get the Alphabetic baseline. */
int baseline = baselineOffset(writingMode,
- Constants.BASELINE_ALPHABETIC, fontSize);
+ Baseline.ALPHABETIC, fontSize);
baseline -= this.getXHeight(fontSize) / 2;
return baseline;
}
- case Constants.BASELINE_TEXT_BEFORE_EDGE: {
+ case Baseline.TEXT_BEFORE_EDGE: {
/* TODO: This needs to comply with the Note under "text-before-edge"
* at Section 7.13 of XSL-FO 1.0. */
return 0;
}
- case Constants.BASELINE_TEXT_AFTER_EDGE: {
+ case Baseline.TEXT_AFTER_EDGE: {
/* TODO: This needs to comply with the Note under "text-after-edge"
* at Section 7.13 of XSL-FO 1.0. */
return fontSize;
@@ -466,7 +466,7 @@
*/
public int baseline(final String script) {
/* TODO: Fix this. */
- return Constants.BASELINE_ALPHABETIC;
+ return Baseline.ALPHABETIC;
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-29 01:02:13 UTC (rev 8543)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-30 02:10:17 UTC (rev 8544)
@@ -1716,10 +1716,10 @@
if (writingMode.getAbsoluteAxis(Constants.AXIS_IP)
== Constants.AXIS_HORIZONTAL) {
/* The writing mode is horizontal. */
- return Constants.BASELINE_ALPHABETIC;
+ return FoValue.ALPHABETIC;
} else {
/* The writing mode is vertical. */
- return Constants.BASELINE_CENTRAL;
+ return FoValue.CENTRAL;
}
} else {
return this.getBaselineFromScript(context);
@@ -1739,34 +1739,34 @@
return this.effectiveParent(context).traitDominantBaseline(context);
}
case FoValue.IDEOGRAPHIC: {
- return Constants.BASELINE_IDEOGRAPHIC;
+ return FoValue.IDEOGRAPHIC;
}
case FoValue.ALPHABETIC: {
- return Constants.BASELINE_ALPHABETIC;
+ return FoValue.ALPHABETIC;
}
case FoValue.HANGING: {
- return Constants.BASELINE_HANGING;
+ return FoValue.HANGING;
}
case FoValue.MATHEMATICAL: {
- return Constants.BASELINE_MATHEMATICAL;
+ return FoValue.MATHEMATICAL;
}
case FoValue.CENTRAL: {
- return Constants.BASELINE_CENTRAL;
+ return FoValue.CENTRAL;
}
case FoValue.MIDDLE: {
- return Constants.BASELINE_MIDDLE;
+ return FoValue.MIDDLE;
}
case FoValue.TEXT_AFTER_EDGE: {
- return Constants.BASELINE_TEXT_AFTER_EDGE;
+ return FoValue.TEXT_AFTER_EDGE;
}
case FoValue.TEXT_BEFORE_EDGE: {
- return Constants.BASELINE_TEXT_BEFORE_EDGE;
+ return FoValue.TEXT_BEFORE_EDGE;
}
default: {
/* This should never happen as inheritance and defaults have been
* handled upstream, but if it does, just return a reasonable
* value. */
- return Constants.BASELINE_ALPHABETIC;
+ return FoValue.ALPHABETIC;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 03:02:13
|
Revision: 8545
http://svn.sourceforge.net/foray/?rev=8545&view=rev
Author: victormote
Date: 2007-01-29 19:02:14 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Clean up some javadoc problems.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprNumeric.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -33,6 +33,7 @@
import org.axsl.areaW.AreaWException;
import org.axsl.areaW.PageArea;
import org.axsl.common.Constants;
+import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
import org.axsl.foR.FONode;
import org.axsl.foR.FObj;
@@ -327,9 +328,9 @@
}
/**
- * @return One of {@link Constants#FOVAL_NORMAL},
- * {@link Constants#FOVAL_ITALIC}, {@link Constants#FOVAL_OBLIQUE}, or
- * {@link Constants#FOVAL_BACKSLANT}.
+ * @return One of {@link FoValue#NORMAL},
+ * {@link FoValue#ITALIC}, {@link FoValue#OBLIQUE}, or
+ * {@link FoValue#BACKSLANT}.
*/
public short traitFontStyle() {
return traitGeneratedBy().traitFontStyle(this);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -32,7 +32,6 @@
import org.foray.common.XMLCharacter;
import org.foray.fotree.fo.obj.BookmarkTitle;
-import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
import org.axsl.foR.FOLineText;
@@ -774,11 +773,11 @@
* See XSL-FO Standard 1.0, Section 7.15.8.
* @param charArray The char array whose contents should be converted.
* @param inputWhiteSpaceTreatment The value of the white-space-treatment
- * property, one of {@link Constants#FOVAL_IGNORE},
- * {@link Constants#FOVAL_PRESERVE},
- * {@link Constants#FOVAL_IGNORE_IF_BEFORE_LINEFEED},
- * {@link Constants#FOVAL_IGNORE_IF_AFTER_LINEFEED},
- * or {@link Constants#FOVAL_IGNORE_IF_SURROUNDING_LINEFEED}.
+ * property, one of {@link FoValue#IGNORE},
+ * {@link FoValue#PRESERVE},
+ * {@link FoValue#IGNORE_IF_BEFORE_LINEFEED},
+ * {@link FoValue#IGNORE_IF_AFTER_LINEFEED},
+ * or {@link FoValue#IGNORE_IF_SURROUNDING_LINEFEED}.
* @return If no changes result from the application of
* white-space-treatment, <code>charArray</code> is returned.
* Otherwise, a new char array with the result is returned.
@@ -863,10 +862,10 @@
* @param charArray The char array whose contents should be converted.
* @param inputLinefeedTreatment The value of the linefeed-treatment
* property, one of
- * {@link Constants#FOVAL_IGNORE},
- * {@link Constants#FOVAL_PRESERVE},
- * {@link Constants#FOVAL_TREAT_AS_SPACE},
- * or {@link Constants#FOVAL_TREAT_AS_ZERO_WIDTH_SPACE}.
+ * {@link FoValue#IGNORE},
+ * {@link FoValue#PRESERVE},
+ * {@link FoValue#TREAT_AS_SPACE},
+ * or {@link FoValue#TREAT_AS_ZERO_WIDTH_SPACE}.
* @return If no changes result from the application of linefeed-treatment,
* <code>charArray</code> is returned. Otherwise, a new char array with the
* result is returned.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -150,8 +150,8 @@
/**
* @param absoluteAxis One of the absolute axes (either AXIS_HORIZONTAL,
* or AXIS_VERTICAL).
- * @return Either {@link Constants#FOPROP_CONTENT_WIDTH} or
- * {@link Constants#FOPROP_CONTENT_HEIGHT}.
+ * @return Either {@link FoProperty#CONTENT_WIDTH} or
+ * {@link FoProperty#CONTENT_HEIGHT}.
*/
public static short rawPropertyName(final int absoluteAxis) {
switch (absoluteAxis) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtInteger.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -79,7 +79,9 @@
}
}
- /** @see ExprNumeric#getLengthPower */
+ /**
+ * {@inheritDoc}
+ */
public byte getUnitPower() {
return 0;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtLength.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -145,13 +145,15 @@
}
/**
- * Note that this returns the raw value, without regard to units.
+ * {@inheritDoc}
*/
public double getNumericValue() {
return this.value;
}
- /** @see ExprNumeric#getLengthPower */
+ /**
+ * {@inheritDoc}
+ */
public byte getUnitPower() {
return 1;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtNumber.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -54,7 +54,9 @@
return new DtInteger(integer);
}
- /** @see ExprNumeric#getLengthPower */
+ /**
+ * {@inheritDoc}
+ */
public byte getUnitPower() {
return 0;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprNumeric.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprNumeric.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/ExprNumeric.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -48,7 +48,7 @@
byte OPERATION_NEGATION = '-';
/**
- * Return the numeric value of "this".
+ * Return the raw numeric value of "this", without regard to unit power.
* @return A double representation of the value of "this". Type "double" is
* assumed to be the lowest-common-denominator of all numeric values.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyKeyword.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -28,7 +28,6 @@
package org.foray.fotree.value;
-import org.axsl.common.Constants;
import org.axsl.common.FoValue;
/**
@@ -57,8 +56,7 @@
/**
* Return the keyword enumeration.
* @return The keyword enumeration.
- * @see Constants#FOVAL_NUM_NEGATIVE_180 and following for the property
- * keyword enumerations.
+ * @see FoValue and following for the property keyword enumerations.
*/
public short getValue() {
return value;
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 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/EagerLineBreaker.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -160,20 +160,7 @@
}
/**
- * This method should be used only by "eager" clients, that is those that
- * need to have immediate feedback about whether contentItem fit on output
- * or not.
- * ("Patient" clients should use {@link #addLineContent(LineContent)}.)
- * Eager clients must push the LineOutput to LineBreaker, whereas
- * LineBreaker pulls them as needed for patient clients.
- * @param contentItem The LineContent implementation that should be laid
- * out.
- * @param output The LineOutput item onto which the system should attempt
- * to lay out contentItem.
- * @return For non-text items, returns 1 for success or 0 if the item did
- * not fit onto the current line. For text items, returns the index into
- * its text (char []) to the first character that was <em>not</em>
- * successfully added to the line.
+ * {@inheritDoc}
*/
public int processLineContent(final LineContent contentItem,
final int start, final int end, final LineOutput output)
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java 2007-01-30 02:10:17 UTC (rev 8544)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/PatientLineBreaker.java 2007-01-30 03:02:14 UTC (rev 8545)
@@ -85,13 +85,7 @@
}
/**
- * This method should be used only by "patient" clients, that is those that
- * send all of their input to the text-processing system before processing
- * actually starts.
- * ("Eager" clients should use {@link #processLineContent(LineContent, int,
- * int, LineOutput)}.)
- * @param contentItem The LineContent implementation that should be laid
- * out.
+ * {@inheritDoc}
*/
public void addLineContent(final LineContent contentItem)
throws TextException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 03:13:03
|
Revision: 8546
http://svn.sourceforge.net/foray/?rev=8546&view=rev
Author: victormote
Date: 2007-01-29 19:13:03 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Replace removed axsl constant with a FOray one.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2007-01-30 03:02:14 UTC (rev 8545)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2007-01-30 03:13:03 UTC (rev 8546)
@@ -155,6 +155,9 @@
* entirely safe as String instances are immutable. */
public static final String EMPTY_STRING = "";
+ /** Constant defining an invalid character value. */
+ public static final char INVALID_UNICODE_CHARACTER = Character.MAX_VALUE;
+
/**
* Private constructor. This is a utility class, and should never be
* instantiated.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:02:14 UTC (rev 8545)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:13:03 UTC (rev 8546)
@@ -28,6 +28,7 @@
package org.foray.fotree;
+import org.foray.common.WKConstants;
import org.foray.fotree.fo.obj.Region;
import org.foray.fotree.fo.prop.AbsoluteDimension;
import org.foray.fotree.fo.prop.AbsoluteOffset;
@@ -230,7 +231,7 @@
}
try {
final char[] firstTextSegment = fobj.firstTextSegment();
- char firstChar = org.axsl.fontR.Font.INVALID_UNICODE_CHARACTER;
+ char firstChar = WKConstants.INVALID_UNICODE_CHARACTER;
if (firstTextSegment != null && firstTextSegment.length > 0) {
firstChar = firstTextSegment[0];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 03:49:01
|
Revision: 8547
http://svn.sourceforge.net/foray/?rev=8547&view=rev
Author: victormote
Date: 2007-01-29 19:49:01 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -248,7 +248,7 @@
if (rff != null) {
/* Try to find one with normal characteristics. */
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
FOrayFont.FONT_WEIGHT_NORMAL,
FOrayFont.FONT_VARIANT_NORMAL,
FOrayFont.FONT_STRETCH_NORMAL,
@@ -259,7 +259,7 @@
}
/* Try to find one with regardless of characteristics. */
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_ANY,
+ org.axsl.fontR.Font.Style.ANY,
FOrayFont.FONT_WEIGHT_ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
@@ -274,7 +274,7 @@
final Map.Entry entry = (Map.Entry) iterator.next();
rff = (RegisteredFontFamily) entry.getValue();
defaultFont = rff.findRegisteredFontDesc(
- FOrayFont.FONT_STYLE_ANY,
+ org.axsl.fontR.Font.Style.ANY,
FOrayFont.FONT_WEIGHT_ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
@@ -466,17 +466,17 @@
return;
}
registerBase14Description("Base14-Courier", "Base14-Courier",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Oblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Courier",
"Base14-Courier-BoldOblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -491,18 +491,18 @@
return;
}
registerBase14Description("Base14-Helvetica", "Base14-Helvetica",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-Oblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Helvetica", "Base14-Helvetica-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-BoldOblique",
- org.axsl.fontR.Font.FONT_STYLE_OBLIQUE,
+ org.axsl.fontR.Font.Style.OBLIQUE,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -517,16 +517,16 @@
return;
}
registerBase14Description("Base14-Times", "Base14-Times",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Italic",
- org.axsl.fontR.Font.FONT_STYLE_ITALIC,
+ org.axsl.fontR.Font.Style.ITALIC,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Bold",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
registerBase14Description("Base14-Times", "Base14-Times-BoldItalic",
- org.axsl.fontR.Font.FONT_STYLE_ITALIC,
+ org.axsl.fontR.Font.Style.ITALIC,
org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
}
@@ -541,7 +541,7 @@
return;
}
registerBase14Description("Base14-Symbol", "Base14-Symbol",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
}
@@ -556,7 +556,7 @@
return;
}
registerBase14Description("Base14-ZapfDingbats", "Base14-ZapfDingbats",
- org.axsl.fontR.Font.FONT_STYLE_NORMAL,
+ org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
}
@@ -642,9 +642,9 @@
this.logger.error(e.getMessage());
continue;
}
- byte fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ byte fontStyle = org.axsl.fontR.Font.Style.NORMAL;
if (awtFont.isItalic()) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
short fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (awtFont.isBold()) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -28,6 +28,7 @@
package org.foray.font;
+import org.axsl.fontR.Font;
import org.axsl.psR.Encoding;
/**
@@ -531,7 +532,7 @@
*/
public boolean styleMatches(final int inputDesiredStyle,
final boolean considerSimulated) {
- if (inputDesiredStyle == FOrayFont.FONT_STYLE_ANY) {
+ if (inputDesiredStyle == Font.Style.ANY) {
return true;
}
if (considerSimulated) {
@@ -539,9 +540,9 @@
/* If it can simulate oblique, it can be used for either
* oblique or italic or normal. */
switch (inputDesiredStyle) {
- case FOrayFont.FONT_STYLE_NORMAL:
- case FOrayFont.FONT_STYLE_ITALIC:
- case FOrayFont.FONT_STYLE_OBLIQUE: {
+ case Font.Style.NORMAL:
+ case Font.Style.ITALIC:
+ case Font.Style.OBLIQUE: {
return true;
}
}
@@ -555,12 +556,12 @@
}
/* If they are not equal, we need to treat "oblique" and "italic" as
* equivalent. */
- if (actualStyle == FOrayFont.FONT_STYLE_OBLIQUE) {
- actualStyle = FOrayFont.FONT_STYLE_ITALIC;
+ if (actualStyle == Font.Style.OBLIQUE) {
+ actualStyle = Font.Style.ITALIC;
}
int desiredStyle = inputDesiredStyle;
- if (inputDesiredStyle == FOrayFont.FONT_STYLE_OBLIQUE) {
- desiredStyle = FOrayFont.FONT_STYLE_ITALIC;
+ if (inputDesiredStyle == Font.Style.OBLIQUE) {
+ desiredStyle = Font.Style.ITALIC;
}
/* Test it again. */
if (actualStyle == desiredStyle) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -28,6 +28,7 @@
package org.foray.font;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontException;
import org.axsl.fontR.FontUtility;
import org.axsl.psR.Encoding;
@@ -95,7 +96,7 @@
throws FontException {
byte fontStyle = FontUtility.foFontStyle(style, false);
if (fontStyle < 0) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ fontStyle = Font.Style.NORMAL;
}
short fontWeight = FontUtility.foFontWeight(weight, false);
if (fontWeight < 0) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -3291,19 +3291,19 @@
public static byte convertFontStyle(final short parsedFontStyle) {
switch (parsedFontStyle) {
case FoValue.NORMAL: {
- return org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ return org.axsl.fontR.Font.Style.NORMAL;
}
case FoValue.ITALIC: {
- return org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ return org.axsl.fontR.Font.Style.ITALIC;
}
case FoValue.OBLIQUE: {
- return org.axsl.fontR.Font.FONT_STYLE_OBLIQUE;
+ return org.axsl.fontR.Font.Style.OBLIQUE;
}
case FoValue.BACKSLANT: {
- return org.axsl.fontR.Font.FONT_STYLE_BACKSLANT;
+ return org.axsl.fontR.Font.Style.BACKSLANT;
}
}
- return org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ return org.axsl.fontR.Font.Style.NORMAL;
}
public static int convertFontStretch(final short parsedFontStretch) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -916,9 +916,9 @@
fontFamily = "sans-serif";
}
final float fontSize = gFont.getSize();
- int fontStyle = org.axsl.fontR.Font.FONT_STYLE_NORMAL;
+ int fontStyle = org.axsl.fontR.Font.Style.NORMAL;
if (gFont.isItalic()) {
- fontStyle = org.axsl.fontR.Font.FONT_STYLE_ITALIC;
+ fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
int fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (gFont.isBold()) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 03:13:03 UTC (rev 8546)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 03:49:01 UTC (rev 8547)
@@ -287,9 +287,9 @@
final Float size, final boolean italic, final boolean bold)
throws FontException {
org.axsl.fontR.FontUse font = null;
- int style = Font.FONT_STYLE_NORMAL;
+ int style = Font.Style.NORMAL;
if (italic) {
- style = Font.FONT_STYLE_ITALIC;
+ style = Font.Style.ITALIC;
}
int weight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
if (bold) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 04:16:00
|
Revision: 8548
http://svn.sourceforge.net/foray/?rev=8548&view=rev
Author: victormote
Date: 2007-01-29 20:16:00 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontWeight.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -249,7 +249,7 @@
/* Try to find one with normal characteristics. */
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.NORMAL,
- FOrayFont.FONT_WEIGHT_NORMAL,
+ org.axsl.fontR.Font.Weight.NORMAL,
FOrayFont.FONT_VARIANT_NORMAL,
FOrayFont.FONT_STRETCH_NORMAL,
freeStandingFont,
@@ -260,7 +260,7 @@
/* Try to find one with regardless of characteristics. */
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.ANY,
- FOrayFont.FONT_WEIGHT_ANY,
+ org.axsl.fontR.Font.Weight.ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
freeStandingFont,
@@ -275,7 +275,7 @@
rff = (RegisteredFontFamily) entry.getValue();
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.ANY,
- FOrayFont.FONT_WEIGHT_ANY,
+ org.axsl.fontR.Font.Weight.ANY,
FOrayFont.FONT_VARIANT_ANY,
FOrayFont.FONT_STRETCH_ANY,
freeStandingFont,
@@ -467,17 +467,17 @@
}
registerBase14Description("Base14-Courier", "Base14-Courier",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Oblique",
org.axsl.fontR.Font.Style.OBLIQUE,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Courier", "Base14-Courier-Bold",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
registerBase14Description("Base14-Courier",
"Base14-Courier-BoldOblique",
org.axsl.fontR.Font.Style.OBLIQUE,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
}
/**
@@ -492,18 +492,18 @@
}
registerBase14Description("Base14-Helvetica", "Base14-Helvetica",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-Oblique",
org.axsl.fontR.Font.Style.OBLIQUE,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Helvetica", "Base14-Helvetica-Bold",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
registerBase14Description("Base14-Helvetica",
"Base14-Helvetica-BoldOblique",
org.axsl.fontR.Font.Style.OBLIQUE,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
}
/**
@@ -518,16 +518,16 @@
}
registerBase14Description("Base14-Times", "Base14-Times",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Italic",
org.axsl.fontR.Font.Style.ITALIC,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
registerBase14Description("Base14-Times", "Base14-Times-Bold",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
registerBase14Description("Base14-Times", "Base14-Times-BoldItalic",
org.axsl.fontR.Font.Style.ITALIC,
- org.axsl.fontR.Font.FONT_WEIGHT_BOLD);
+ org.axsl.fontR.Font.Weight.BOLD);
}
/**
@@ -542,7 +542,7 @@
}
registerBase14Description("Base14-Symbol", "Base14-Symbol",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
}
/**
@@ -557,7 +557,7 @@
}
registerBase14Description("Base14-ZapfDingbats", "Base14-ZapfDingbats",
org.axsl.fontR.Font.Style.NORMAL,
- org.axsl.fontR.Font.FONT_WEIGHT_NORMAL);
+ org.axsl.fontR.Font.Weight.NORMAL);
}
/**
@@ -646,9 +646,9 @@
if (awtFont.isItalic()) {
fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
- short fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
+ short fontWeight = org.axsl.fontR.Font.Weight.NORMAL;
if (awtFont.isBold()) {
- fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_BOLD;
+ fontWeight = org.axsl.fontR.Font.Weight.BOLD;
}
final byte fontVariant = org.axsl.fontR.Font.FONT_VARIANT_NORMAL;
final byte fontStretch = org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -30,6 +30,7 @@
import org.foray.common.WKConstants;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontConsumer;
import org.axsl.fontR.FontException;
import org.axsl.fontR.output.FontOutput;
@@ -145,7 +146,7 @@
if (desc != null) {
return desc.getFontWeight();
}
- return (short) Math.min(FOrayFont.FONT_WEIGHT_900,
+ return (short) Math.min(Font.Weight.RELATIVE_900,
this.registeredFontDesc.getFontWeight()
+ FOrayFontUse.FONT_WEIGHT_INCREMENT);
}
@@ -159,7 +160,7 @@
if (desc != null) {
return desc.getFontWeight();
}
- return (short) Math.max(FOrayFont.FONT_WEIGHT_100,
+ return (short) Math.max(Font.Weight.RELATIVE_100,
this.registeredFontDesc.getFontWeight()
- FOrayFontUse.FONT_WEIGHT_INCREMENT);
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -621,7 +621,7 @@
* @return True iff the style of this font description matches the criteria.
*/
public boolean weightMatches(final int desiredWeight) {
- if (desiredWeight == FOrayFont.FONT_WEIGHT_ANY) {
+ if (desiredWeight == Font.Weight.ANY) {
return true;
}
final int actualWeight = getFontWeight();
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -100,15 +100,15 @@
}
short fontWeight = FontUtility.foFontWeight(weight, false);
if (fontWeight < 0) {
- fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
+ fontWeight = Font.Weight.NORMAL;
}
byte fontVariant = FontUtility.foFontVariant(variant, false);
if (fontVariant < 0) {
- fontVariant = org.axsl.fontR.Font.FONT_VARIANT_NORMAL;
+ fontVariant = Font.FONT_VARIANT_NORMAL;
}
byte fontStretch = FontUtility.foFontStretch(stretch, false);
if (fontStretch < 0) {
- fontStretch = org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
+ fontStretch = Font.FONT_STRETCH_NORMAL;
}
final float simSmallCaps = convertPercent(simulatedSmallCaps);
final float simOblique = convertPercent(simulatedOblique);
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -1014,13 +1014,13 @@
}
final String weightString = this.currentTokenizer.nextToken();
if (weightString.equals("Light")) {
- this.setWeight(Font.FONT_WEIGHT_300);
+ this.setWeight(Font.Weight.RELATIVE_300);
} else if (weightString.equals("Medium")) {
- this.setWeight(Font.FONT_WEIGHT_NORMAL);
+ this.setWeight(Font.Weight.NORMAL);
} else if (weightString.equals("Regular")) {
- this.setWeight(Font.FONT_WEIGHT_NORMAL);
+ this.setWeight(Font.Weight.NORMAL);
} else if (weightString.equals("Bold")) {
- this.setWeight(Font.FONT_WEIGHT_BOLD);
+ this.setWeight(Font.Weight.BOLD);
} else {
this.setWeight(0);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontWeight.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontWeight.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontWeight.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -76,15 +76,15 @@
if (pv instanceof DtInteger) {
final int integer = ((DtInteger) pv).getValue();
switch (integer) {
- case Font.FONT_WEIGHT_100:
- case Font.FONT_WEIGHT_200:
- case Font.FONT_WEIGHT_300:
- case Font.FONT_WEIGHT_400:
- case Font.FONT_WEIGHT_500:
- case Font.FONT_WEIGHT_600:
- case Font.FONT_WEIGHT_700:
- case Font.FONT_WEIGHT_800:
- case Font.FONT_WEIGHT_900: {
+ case Font.Weight.RELATIVE_100:
+ case Font.Weight.RELATIVE_200:
+ case Font.Weight.RELATIVE_300:
+ case Font.Weight.RELATIVE_400:
+ case Font.Weight.RELATIVE_500:
+ case Font.Weight.RELATIVE_600:
+ case Font.Weight.RELATIVE_700:
+ case Font.Weight.RELATIVE_800:
+ case Font.Weight.RELATIVE_900: {
return pv;
}
}
@@ -101,10 +101,10 @@
return getValueNoInstance(context, fobj);
}
case FoValue.NORMAL: {
- return Font.FONT_WEIGHT_NORMAL;
+ return Font.Weight.NORMAL;
}
case FoValue.BOLD: {
- return Font.FONT_WEIGHT_BOLD;
+ return Font.Weight.BOLD;
}
case FoValue.BOLDER: {
/*
@@ -135,7 +135,7 @@
if (value() instanceof DtInteger) {
return (short) ((DtInteger) value()).getValue();
}
- return Font.FONT_WEIGHT_NORMAL;
+ return Font.Weight.NORMAL;
}
public static short getValueNoInstance(final FOContext context,
@@ -144,7 +144,7 @@
if (parent != null) {
return parent.traitFontWeight(context);
}
- return Font.FONT_WEIGHT_NORMAL;
+ return Font.Weight.NORMAL;
}
protected short[] getValidKeywords() {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -920,9 +920,9 @@
if (gFont.isItalic()) {
fontStyle = org.axsl.fontR.Font.Style.ITALIC;
}
- int fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
+ int fontWeight = org.axsl.fontR.Font.Weight.NORMAL;
if (gFont.isBold()) {
- fontWeight = org.axsl.fontR.Font.FONT_WEIGHT_BOLD;
+ fontWeight = org.axsl.fontR.Font.Weight.BOLD;
}
try {
final FontConsumer fontConsumer =
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -291,9 +291,9 @@
if (italic) {
style = Font.Style.ITALIC;
}
- int weight = org.axsl.fontR.Font.FONT_WEIGHT_NORMAL;
+ int weight = org.axsl.fontR.Font.Weight.NORMAL;
if (bold) {
- weight = org.axsl.fontR.Font.FONT_WEIGHT_BOLD;
+ weight = org.axsl.fontR.Font.Weight.BOLD;
}
final List gvtFonts = (List) aci.getAttribute(
GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-01-30 03:49:01 UTC (rev 8547)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-01-30 04:16:00 UTC (rev 8548)
@@ -472,7 +472,7 @@
italic = true;
}
boolean bold = false;
- if (title.traitFontWeight() >= Font.FONT_WEIGHT_BOLD) {
+ if (title.traitFontWeight() >= Font.Weight.BOLD) {
bold = true;
}
PDFOutlineItem pdfOutline = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-30 04:41:38
|
Revision: 8549
http://svn.sourceforge.net/foray/?rev=8549&view=rev
Author: victormote
Date: 2007-01-29 20:41:38 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 04:16:00 UTC (rev 8548)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 04:41:38 UTC (rev 8549)
@@ -250,7 +250,7 @@
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.Weight.NORMAL,
- FOrayFont.FONT_VARIANT_NORMAL,
+ org.axsl.fontR.Font.Variant.NORMAL,
FOrayFont.FONT_STRETCH_NORMAL,
freeStandingFont,
! freeStandingFont);
@@ -261,7 +261,7 @@
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.ANY,
org.axsl.fontR.Font.Weight.ANY,
- FOrayFont.FONT_VARIANT_ANY,
+ org.axsl.fontR.Font.Variant.ANY,
FOrayFont.FONT_STRETCH_ANY,
freeStandingFont,
! freeStandingFont);
@@ -276,7 +276,7 @@
defaultFont = rff.findRegisteredFontDesc(
org.axsl.fontR.Font.Style.ANY,
org.axsl.fontR.Font.Weight.ANY,
- FOrayFont.FONT_VARIANT_ANY,
+ org.axsl.fontR.Font.Variant.ANY,
FOrayFont.FONT_STRETCH_ANY,
freeStandingFont,
! freeStandingFont);
@@ -586,7 +586,7 @@
encoding,
style,
weight,
- org.axsl.fontR.Font.FONT_VARIANT_NORMAL,
+ org.axsl.fontR.Font.Variant.NORMAL,
org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
DEFAULT_SMALL_CAPS_SIZE,
Float.NaN,
@@ -650,7 +650,7 @@
if (awtFont.isBold()) {
fontWeight = org.axsl.fontR.Font.Weight.BOLD;
}
- final byte fontVariant = org.axsl.fontR.Font.FONT_VARIANT_NORMAL;
+ final byte fontVariant = org.axsl.fontR.Font.Variant.NORMAL;
final byte fontStretch = org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
new RegisteredFontDesc(rf, rff, null, fontStyle, fontWeight,
fontVariant, fontStretch);
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 04:16:00 UTC (rev 8548)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 04:41:38 UTC (rev 8549)
@@ -579,7 +579,7 @@
*/
public boolean variantMatches(final int desiredVariant,
final boolean considerSimulated) {
- if (desiredVariant == FOrayFont.FONT_VARIANT_ANY) {
+ if (desiredVariant == Font.Variant.ANY) {
return true;
}
if (considerSimulated) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 04:16:00 UTC (rev 8548)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 04:41:38 UTC (rev 8549)
@@ -104,7 +104,7 @@
}
byte fontVariant = FontUtility.foFontVariant(variant, false);
if (fontVariant < 0) {
- fontVariant = Font.FONT_VARIANT_NORMAL;
+ fontVariant = Font.Variant.NORMAL;
}
byte fontStretch = FontUtility.foFontStretch(stretch, false);
if (fontStretch < 0) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 04:16:00 UTC (rev 8548)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 04:41:38 UTC (rev 8549)
@@ -3283,9 +3283,9 @@
*/
public static int convertFontVariant(final int parsedFontVariant) {
if (parsedFontVariant == FoValue.SMALL_CAPS) {
- return org.axsl.fontR.Font.FONT_VARIANT_SMALL_CAPS;
+ return org.axsl.fontR.Font.Variant.SMALL_CAPS;
}
- return org.axsl.fontR.Font.FONT_VARIANT_NORMAL;
+ return org.axsl.fontR.Font.Variant.NORMAL;
}
public static byte convertFontStyle(final short parsedFontStyle) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 04:16:00 UTC (rev 8548)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 04:41:38 UTC (rev 8549)
@@ -931,7 +931,7 @@
org.axsl.fontR.Font.FONT_SELECTION_AUTO,
FontUtility.foFontFamily(fontFamily),
fontStyle, fontWeight,
- org.axsl.fontR.Font.FONT_VARIANT_NORMAL,
+ org.axsl.fontR.Font.Variant.NORMAL,
org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
(int) (fontSize * WKConstants.MILLIPOINTS_PER_POINT),
' ');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 01:06:34
|
Revision: 8550
http://svn.sourceforge.net/foray/?rev=8550&view=rev
Author: victormote
Date: 2007-01-30 17:06:34 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -251,7 +251,7 @@
org.axsl.fontR.Font.Style.NORMAL,
org.axsl.fontR.Font.Weight.NORMAL,
org.axsl.fontR.Font.Variant.NORMAL,
- FOrayFont.FONT_STRETCH_NORMAL,
+ org.axsl.fontR.Font.Stretch.NORMAL,
freeStandingFont,
! freeStandingFont);
if (defaultFont != null) {
@@ -262,7 +262,7 @@
org.axsl.fontR.Font.Style.ANY,
org.axsl.fontR.Font.Weight.ANY,
org.axsl.fontR.Font.Variant.ANY,
- FOrayFont.FONT_STRETCH_ANY,
+ org.axsl.fontR.Font.Stretch.ANY,
freeStandingFont,
! freeStandingFont);
}
@@ -277,7 +277,7 @@
org.axsl.fontR.Font.Style.ANY,
org.axsl.fontR.Font.Weight.ANY,
org.axsl.fontR.Font.Variant.ANY,
- FOrayFont.FONT_STRETCH_ANY,
+ org.axsl.fontR.Font.Stretch.ANY,
freeStandingFont,
! freeStandingFont);
}
@@ -587,7 +587,7 @@
style,
weight,
org.axsl.fontR.Font.Variant.NORMAL,
- org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
+ org.axsl.fontR.Font.Stretch.NORMAL,
DEFAULT_SMALL_CAPS_SIZE,
Float.NaN,
Float.NaN,
@@ -651,7 +651,7 @@
fontWeight = org.axsl.fontR.Font.Weight.BOLD;
}
final byte fontVariant = org.axsl.fontR.Font.Variant.NORMAL;
- final byte fontStretch = org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
+ final byte fontStretch = org.axsl.fontR.Font.Stretch.NORMAL;
new RegisteredFontDesc(rf, rff, null, fontStyle, fontWeight,
fontVariant, fontStretch);
try {
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -605,7 +605,7 @@
*/
public boolean stretchMatches(final int desiredStretch,
final boolean considerSimulated) {
- if (desiredStretch == FOrayFont.FONT_STRETCH_ANY) {
+ if (desiredStretch == Font.Stretch.ANY) {
return true;
}
final int actualStretch = getFontStretch();
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontFamily.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -108,7 +108,7 @@
}
byte fontStretch = FontUtility.foFontStretch(stretch, false);
if (fontStretch < 0) {
- fontStretch = Font.FONT_STRETCH_NORMAL;
+ fontStretch = Font.Stretch.NORMAL;
}
final float simSmallCaps = convertPercent(simulatedSmallCaps);
final float simOblique = convertPercent(simulatedOblique);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -3309,33 +3309,33 @@
public static int convertFontStretch(final short parsedFontStretch) {
switch (parsedFontStretch) {
case FoValue.ULTRA_CONDENSED: {
- return org.axsl.fontR.Font.FONT_STRETCH_ULTRA_CONDENSED;
+ return org.axsl.fontR.Font.Stretch.ULTRA_CONDENSED;
}
case FoValue.EXTRA_CONDENSED: {
- return org.axsl.fontR.Font.FONT_STRETCH_EXTRA_CONDENSED;
+ return org.axsl.fontR.Font.Stretch.EXTRA_CONDENSED;
}
case FoValue.CONDENSED: {
- return org.axsl.fontR.Font.FONT_STRETCH_CONDENSED;
+ return org.axsl.fontR.Font.Stretch.CONDENSED;
}
case FoValue.SEMI_CONDENSED: {
- return org.axsl.fontR.Font.FONT_STRETCH_SEMI_CONDENSED;
+ return org.axsl.fontR.Font.Stretch.SEMI_CONDENSED;
}
case FoValue.NORMAL: {
- return org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
+ return org.axsl.fontR.Font.Stretch.NORMAL;
}
case FoValue.SEMI_EXPANDED: {
- return org.axsl.fontR.Font.FONT_STRETCH_SEMI_EXPANDED;
+ return org.axsl.fontR.Font.Stretch.SEMI_EXPANDED;
}
case FoValue.EXPANDED: {
- return org.axsl.fontR.Font.FONT_STRETCH_EXPANDED;
+ return org.axsl.fontR.Font.Stretch.EXPANDED;
}
case FoValue.EXTRA_EXPANDED: {
- return org.axsl.fontR.Font.FONT_STRETCH_EXTRA_EXPANDED;
+ return org.axsl.fontR.Font.Stretch.EXTRA_EXPANDED;
}
case FoValue.ULTRA_EXPANDED: {
- return org.axsl.fontR.Font.FONT_STRETCH_ULTRA_EXPANDED;
+ return org.axsl.fontR.Font.Stretch.ULTRA_EXPANDED;
}
}
- return org.axsl.fontR.Font.FONT_STRETCH_NORMAL;
+ return org.axsl.fontR.Font.Stretch.NORMAL;
}
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -932,7 +932,7 @@
FontUtility.foFontFamily(fontFamily),
fontStyle, fontWeight,
org.axsl.fontR.Font.Variant.NORMAL,
- org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
+ org.axsl.fontR.Font.Stretch.NORMAL,
(int) (fontSize * WKConstants.MILLIPOINTS_PER_POINT),
' ');
} catch (final FontException exception) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-30 04:41:38 UTC (rev 8549)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-31 01:06:34 UTC (rev 8550)
@@ -306,7 +306,7 @@
font = this.fontConsumer.selectFontCSS(
FontUtility.foFontFamily(this.fontFamily),
style, weight, 0,
- org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
+ org.axsl.fontR.Font.Stretch.NORMAL,
fsize * WKConstants.MILLIPOINTS_PER_POINT,
' ');
if (font != null) {
@@ -323,7 +323,7 @@
return this.fontConsumer.selectFontXSL(
org.axsl.fontR.Font.FONT_SELECTION_AUTO,
new String[] {"any"}, style, weight, 0,
- org.axsl.fontR.Font.FONT_STRETCH_NORMAL,
+ org.axsl.fontR.Font.Stretch.NORMAL,
fsize * WKConstants.MILLIPOINTS_PER_POINT,
' ');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 01:25:17
|
Revision: 8551
http://svn.sourceforge.net/foray/?rev=8551&view=rev
Author: victormote
Date: 2007-01-30 17:25:18 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java 2007-01-31 01:06:34 UTC (rev 8550)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontConsumer.java 2007-01-31 01:25:18 UTC (rev 8551)
@@ -220,10 +220,10 @@
*/
private FontSelector getFontSelector(final int strategy) {
switch (strategy) {
- case Font.FONT_SELECTION_CBC: {
+ case Font.SelectionStrategy.CHARACTER_BY_CHARACTER: {
return this.getFontSelectorCBC();
}
- case Font.FONT_SELECTION_AUTO: {
+ case Font.SelectionStrategy.AUTO: {
return this.getFontSelectorAuto();
}
}
@@ -468,7 +468,8 @@
final int style, final int weight, final int variant,
final int stretch, final int size, final int codePoint)
throws FontException {
- return selectFontXSL(Font.FONT_SELECTION_CBC, familyList, style, weight,
+ return selectFontXSL(Font.SelectionStrategy.CHARACTER_BY_CHARACTER,
+ familyList, style, weight,
variant, stretch, size, codePoint);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 01:06:34 UTC (rev 8550)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 01:25:18 UTC (rev 8551)
@@ -3265,13 +3265,13 @@
final int parsedFontSelectionStrategy) {
switch(parsedFontSelectionStrategy) {
case FoValue.CHARACTER_BY_CHARACTER: {
- return org.axsl.fontR.Font.FONT_SELECTION_CBC;
+ return org.axsl.fontR.Font.SelectionStrategy.CHARACTER_BY_CHARACTER;
}
case FoValue.AUTO: {
- return org.axsl.fontR.Font.FONT_SELECTION_AUTO;
+ return org.axsl.fontR.Font.SelectionStrategy.AUTO;
}
}
- return org.axsl.fontR.Font.FONT_SELECTION_AUTO;
+ return org.axsl.fontR.Font.SelectionStrategy.AUTO;
}
/**
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-31 01:06:34 UTC (rev 8550)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2007-01-31 01:25:18 UTC (rev 8551)
@@ -928,7 +928,7 @@
final FontConsumer fontConsumer =
this.currentFont.getFontConsumer();
return fontConsumer.selectFontXSL(
- org.axsl.fontR.Font.FONT_SELECTION_AUTO,
+ org.axsl.fontR.Font.SelectionStrategy.AUTO,
FontUtility.foFontFamily(fontFamily),
fontStyle, fontWeight,
org.axsl.fontR.Font.Variant.NORMAL,
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-31 01:06:34 UTC (rev 8550)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2007-01-31 01:25:18 UTC (rev 8551)
@@ -321,7 +321,7 @@
if (font == null) {
this.fontFamily = "any";
return this.fontConsumer.selectFontXSL(
- org.axsl.fontR.Font.FONT_SELECTION_AUTO,
+ org.axsl.fontR.Font.SelectionStrategy.AUTO,
new String[] {"any"}, style, weight, 0,
org.axsl.fontR.Font.Stretch.NORMAL,
fsize * WKConstants.MILLIPOINTS_PER_POINT,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 01:37:07
|
Revision: 8552
http://svn.sourceforge.net/foray/?rev=8552&view=rev
Author: victormote
Date: 2007-01-30 17:37:05 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutput.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -91,7 +91,7 @@
* {@link org.axsl.fontR.Font#FONT_SIMPLE},
* {@link org.axsl.fontR.Font#FONT_COMPOSITE}, and
* {@link org.axsl.fontR.Font#FONT_COMPLEXITY_UNKNOWN}. */
- private byte fontComplexity = org.axsl.fontR.Font.FONT_COMPLEXITY_UNKNOWN;
+ private byte fontComplexity = org.axsl.fontR.Font.Complexity.UNKNOWN;
/** The Panose for this font. */
private Panose panose;
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -34,6 +34,8 @@
import org.foray.font.format.TTFFont;
import org.foray.font.format.TTFSubSetFile;
+import org.axsl.fontR.Font;
+
import java.io.IOException;
import java.io.InputStream;
@@ -97,7 +99,7 @@
* TODO: Right now, all TTF fonts are treated as complex fonts. Not
* sure this is right.
*/
- this.setFontComplexity(FOrayFont.FONT_COMPOSITE);
+ this.setFontComplexity(Font.Complexity.COMPOSITE);
this.setPostscriptName(stripWhiteSpace(this.ttf.getPostscriptName()));
this.setFontName(this.ttf.getFontName());
this.setFamilyName(this.ttf.getFamilyName());
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -39,6 +39,7 @@
import org.foray.ps.encode.EncodingVector;
import org.foray.ps.filter.PSFilter;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontException;
import java.io.IOException;
@@ -114,7 +115,7 @@
throw new FontException("Unusable Internal Encoding: "
+ reader.getDescription());
}
- this.setFontComplexity(FOrayFont.FONT_SIMPLE);
+ this.setFontComplexity(Font.Complexity.SIMPLE);
this.setPostscriptName(this.metricsFile.getPostscriptName());
this.setFontName(this.metricsFile.getFontName());
this.setFamilyName(this.metricsFile.getFontFamilyName());
Modified: trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -269,7 +269,7 @@
return false;
}
/* Don't try to subset simple fonts. */
- if (getFontComplexity() == FONT_SIMPLE) {
+ if (getFontComplexity() == Font.Complexity.SIMPLE) {
return false;
}
/* TODO: We don't know how to subset CFF fonts yet. */
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutput.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutput.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutput.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -36,6 +36,7 @@
import org.foray.font.Subset;
import org.foray.font.charset.CharSet;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontUse;
import org.axsl.fontR.output.FontOutput;
import org.axsl.fontR.output.FontPDF;
@@ -209,7 +210,7 @@
if (fsf == null) {
return null;
}
- if (fsf.getFontComplexity() != FOrayFont.FONT_SIMPLE) {
+ if (fsf.getFontComplexity() != Font.Complexity.SIMPLE) {
final Subset subset = this.fontUse.getSubset();
if (subset == null) {
return fsf.getWidths();
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -330,7 +330,7 @@
* {@link PDFFont#TRUETYPE}.
*/
public static byte getFontSubtype(final FontUse font) {
- if (font.getFont().getFontComplexity() == Font.FONT_COMPOSITE) {
+ if (font.getFont().getFontComplexity() == Font.Complexity.COMPOSITE) {
return PDFFont.TYPE0;
}
if (font.getFont().getFontFormat() == Font.FORMAT_TYPE1) {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java 2007-01-31 01:25:18 UTC (rev 8551)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java 2007-01-31 01:37:05 UTC (rev 8552)
@@ -87,7 +87,7 @@
private void addCharToBuffer(final StringBuffer buffer,
final int glyphIndex) {
final Font font = this.font.getFontUse().getFont();
- if (font.getFontComplexity() == Font.FONT_COMPOSITE) {
+ if (font.getFontComplexity() == Font.Complexity.COMPOSITE) {
buffer.append(PDFString.getUnicodeString(glyphIndex));
return;
}
@@ -138,7 +138,7 @@
private char startTextDelimiter() {
final Font font = this.font.getFontUse().getFont();
- if (font.getFontComplexity() == Font.FONT_COMPOSITE) {
+ if (font.getFontComplexity() == Font.Complexity.COMPOSITE) {
return '<';
}
return '(';
@@ -146,7 +146,7 @@
private char endTextDelimiter() {
final Font font = this.font.getFontUse().getFont();
- if (font.getFontComplexity() == Font.FONT_COMPOSITE) {
+ if (font.getFontComplexity() == Font.Complexity.COMPOSITE) {
return '>';
}
return ')';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 01:48:36
|
Revision: 8553
http://svn.sourceforge.net/foray/?rev=8553&view=rev
Author: victormote
Date: 2007-01-30 17:48:36 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/RegisteredFont.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFont.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSTrueTypeFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -57,7 +57,7 @@
private int stemV = 0;
/** The font format. */
- private byte fontFormat = FORMAT_UNKNOWN;
+ private byte fontFormat = Format.UNKNOWN;
/**
* Construct an instance.
Modified: trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/FSType1Font.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -215,7 +215,7 @@
* {@inheritDoc}
*/
public byte getFontFormat() {
- return FOrayFont.FORMAT_TYPE1;
+ return Format.TYPE1;
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -273,7 +273,7 @@
return false;
}
/* TODO: We don't know how to subset CFF fonts yet. */
- if (getFontFormat() == FORMAT_OTF_CFF) {
+ if (getFontFormat() == Format.OTF_CFF) {
return false;
}
/* Only subset if we have been told to. */
@@ -332,10 +332,10 @@
*/
public int getAWTFontFormat() {
switch (this.getFontFormat()) {
- case Font.FORMAT_TRUETYPE: {
+ case Font.Format.TRUETYPE: {
return java.awt.Font.TRUETYPE_FONT;
}
- case Font.FORMAT_TYPE1: {
+ case Font.Format.TYPE1: {
/* TODO: When Java 1.5 is the lowest supported platform, change
* this constant to java.awt.Font.TYPE1_FONT. */
return 1;
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -32,6 +32,7 @@
import org.foray.font.format.MetricsFileReader;
import org.foray.font.format.Panose;
+import org.axsl.fontR.Font;
import org.axsl.fontR.FontException;
import org.apache.commons.logging.Log;
@@ -100,7 +101,7 @@
/** {@link FOrayFont#FORMAT_UNKNOWN}, {@link FOrayFont#FORMAT_TYPE1}, or
* {@link FOrayFont#FORMAT_TRUETYPE}. */
- private int fontFormat = FOrayFont.FORMAT_UNKNOWN;
+ private int fontFormat = Font.Format.UNKNOWN;
/** URL to the font metrics file, if any. */
private MetricsFileReader metricsFile = null;
@@ -235,17 +236,17 @@
if (this.fontFileReader == null) {
/* The assumption here is that we have a metrics file for this
* font, but not a font file, therefore it is Type 1. */
- this.fontFormat = FOrayFont.FORMAT_TYPE1;
+ this.fontFormat = Font.Format.TYPE1;
} else {
this.fontFormat = this.fontFileReader.getFontFormat();
}
switch (this.fontFormat) {
- case FOrayFont.FORMAT_TYPE1: {
+ case Font.Format.TYPE1: {
return new FSType1Font(this);
}
- case FOrayFont.FORMAT_TRUETYPE:
- case FOrayFont.FORMAT_OTF_CFF:
- case FOrayFont.FORMAT_OTF_TRUETYPE: {
+ case Font.Format.TRUETYPE:
+ case Font.Format.OTF_CFF:
+ case Font.Format.OTF_TRUETYPE: {
return new FSTrueTypeFont(this);
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -273,7 +273,7 @@
final FreeStandingFont relatedFSFont =
this.freeStandingFontManifestation();
if (relatedFSFont == null) {
- return org.foray.font.FOrayFont.FORMAT_UNKNOWN;
+ return org.axsl.fontR.Font.Format.UNKNOWN;
}
return relatedFSFont.getFontFormat();
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -29,8 +29,9 @@
package org.foray.font.format;
import org.foray.common.RandomReader;
-import org.foray.font.FOrayFont;
+import org.axsl.fontR.Font;
+
import org.apache.commons.logging.Log;
import java.io.IOException;
@@ -90,7 +91,7 @@
private static final int SHORT_TO_DECIMAL_FACTOR = 10000;
/** Set to one of the Font.FORMAT constants. */
- private byte fontFormat = FOrayFont.FORMAT_UNKNOWN;
+ private byte fontFormat = Font.Format.UNKNOWN;
/** Set to one of the FILEFORMAT constants. */
private byte fileFormat = FontFileReader.FILEFORMAT_UNKNOWN;
@@ -147,7 +148,7 @@
tag = readString(TYPE_1_HEADER_1.length(), CHAR_ENCODE_US_ASCII);
if (tag.startsWith(TYPE_1_HEADER_2)
|| tag.equals(TYPE_1_HEADER_1)) {
- this.fontFormat = FOrayFont.FORMAT_TYPE1;
+ this.fontFormat = Font.Format.TYPE1;
this.fileFormat = FontFileReader.FILEFORMAT_TYPE1_PFA;
return;
}
@@ -159,7 +160,7 @@
tag = readString(TYPE_1_HEADER_1.length(), CHAR_ENCODE_US_ASCII);
if (tag.startsWith(TYPE_1_HEADER_2)
|| tag.equals(TYPE_1_HEADER_1)) {
- this.fontFormat = FOrayFont.FORMAT_TYPE1;
+ this.fontFormat = Font.Format.TYPE1;
this.fileFormat = FontFileReader.FILEFORMAT_TYPE1_PFB;
return;
}
@@ -168,7 +169,7 @@
seek(0);
sfntVersion = readInt();
if (sfntVersion == TTFTableDirectory.TTF_FILE_SFNT_VERSION_1) {
- this.fontFormat = FOrayFont.FORMAT_TRUETYPE;
+ this.fontFormat = Font.Format.TRUETYPE;
this.fileFormat = FontFileReader.FILEFORMAT_TTF_SINGLEFONT;
return;
}
@@ -176,7 +177,7 @@
seek(0);
tag = readString(TTF_HEADER.length(), CHAR_ENCODE_US_ASCII);
if (tag.equals(TTF_HEADER)) {
- this.fontFormat = FOrayFont.FORMAT_TRUETYPE;
+ this.fontFormat = Font.Format.TRUETYPE;
this.fileFormat = FontFileReader.FILEFORMAT_TTF_COLLECTION;
return;
}
@@ -184,7 +185,7 @@
seek(0);
tag = readString(OPENTYPE_CFF_HEADER.length(), CHAR_ENCODE_US_ASCII);
if (tag.equals(OPENTYPE_CFF_HEADER)) {
- this.fontFormat = FOrayFont.FORMAT_OTF_CFF;
+ this.fontFormat = Font.Format.OTF_CFF;
this.fileFormat = FontFileReader.FILEFORMAT_OTF_CFF;
return;
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFont.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -138,7 +138,7 @@
}
protected static byte getCidType(final Font fsFont) {
- if (fsFont.getFontFormat() == Font.FORMAT_TRUETYPE) {
+ if (fsFont.getFontFormat() == Font.Format.TRUETYPE) {
return PDFCIDFont.CID_TYPE2;
}
return PDFCIDFont.CID_TYPE0;
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2007-01-31 01:37:05 UTC (rev 8552)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2007-01-31 01:48:36 UTC (rev 8553)
@@ -333,7 +333,7 @@
if (font.getFont().getFontComplexity() == Font.Complexity.COMPOSITE) {
return PDFFont.TYPE0;
}
- if (font.getFont().getFontFormat() == Font.FORMAT_TYPE1) {
+ if (font.getFont().getFontFormat() == Font.Format.TYPE1) {
return PDFFont.TYPE1;
}
return PDFFont.TRUETYPE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 02:12:47
|
Revision: 8554
http://svn.sourceforge.net/foray/?rev=8554&view=rev
Author: victormote
Date: 2007-01-30 18:12:48 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new inner enumeration class.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 01:48:36 UTC (rev 8553)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 02:12:48 UTC (rev 8554)
@@ -32,6 +32,7 @@
import org.foray.font.format.Panose;
import org.axsl.common.Baseline;
+import org.axsl.fontR.Font;
import org.apache.commons.logging.Log;
@@ -378,7 +379,7 @@
*/
public float normalLineHeightFactor(final int algorithm) {
switch (algorithm) {
- case LH_ALGORITHM_DEFAULT:
+ case Font.LineHeightAlgorithm.DEFAULT:
default: {
return FOrayFont.DEFAULT_LINE_HEIGHT_FACTOR;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java 2007-01-31 01:48:36 UTC (rev 8553)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LineHeight.java 2007-01-31 02:12:48 UTC (rev 8554)
@@ -206,7 +206,7 @@
public static float getValueMultiplierNoInstance(final FOContext context,
final FObj fobj) {
final FontUse fontUse = fobj.getPrimaryFont(context);
- final int algorithm = Font.LH_ALGORITHM_DEFAULT;
+ final int algorithm = Font.LineHeightAlgorithm.DEFAULT;
return fontUse.getFont().normalLineHeightFactor(algorithm);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 02:34:41
|
Revision: 8555
http://svn.sourceforge.net/foray/?rev=8555&view=rev
Author: victormote
Date: 2007-01-30 18:34:41 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for a new enumeration class.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 02:12:48 UTC (rev 8554)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 02:34:41 UTC (rev 8555)
@@ -37,6 +37,7 @@
import org.axsl.areaW.TableArea;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.LinkType;
import org.axsl.foR.FONode;
import org.axsl.foR.WritingMode;
import org.axsl.foR.fo.BasicLink;
@@ -1076,14 +1077,14 @@
/**
* If this Area is descended from a fo:basic-link, return the link type
* for that link.
- * @return One of: {@link Constants#BASIC_LINK_EXTERNAL} or
- * {@link Constants#BASIC_LINK_INTERNAL}. If this area is not part
- * of a link, returns {@link Constants#BASIC_LINK_INVALID}.
+ * @return One of: {@link LinkType#EXTERNAL} or
+ * {@link LinkType#INTERNAL}. If this area is not part
+ * of a link, returns {@link LinkType#INVALID}.
*/
public byte linkType() {
final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
if (link == null) {
- return Constants.BASIC_LINK_INVALID;
+ return LinkType.INVALID;
}
return link.getLinkType();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 02:12:48 UTC (rev 8554)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 02:34:41 UTC (rev 8555)
@@ -33,7 +33,7 @@
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
-import org.axsl.common.Constants;
+import org.axsl.common.LinkType;
import org.axsl.foR.FOContext;
import org.axsl.foR.FONodeProxy;
import org.axsl.foR.FOTreeException;
@@ -82,10 +82,10 @@
public boolean isValid() {
switch (getLinkType()) {
- case Constants.BASIC_LINK_INTERNAL: {
+ case LinkType.INTERNAL: {
return true;
}
- case Constants.BASIC_LINK_EXTERNAL: {
+ case LinkType.EXTERNAL: {
return true;
}
default: {
@@ -107,12 +107,12 @@
public byte getLinkType() {
if (! traitInternalDestination().equals("")) {
- return Constants.BASIC_LINK_INTERNAL;
+ return LinkType.INTERNAL;
}
if (! traitExternalDestination().equals("")) {
- return Constants.BASIC_LINK_EXTERNAL;
+ return LinkType.EXTERNAL;
}
- return Constants.BASIC_LINK_INVALID;
+ return LinkType.INVALID;
}
public String getCookedExternalDestination() {
@@ -138,10 +138,10 @@
public String getDestination() {
switch (this.getLinkType()) {
- case Constants.BASIC_LINK_INTERNAL: {
+ case LinkType.INTERNAL: {
return this.traitInternalDestination();
}
- case Constants.BASIC_LINK_EXTERNAL: {
+ case LinkType.EXTERNAL: {
return this.getCookedExternalDestination();
}
default: {
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-01-31 02:12:48 UTC (rev 8554)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-01-31 02:34:41 UTC (rev 8555)
@@ -51,8 +51,8 @@
import org.axsl.areaR.PageArea;
import org.axsl.areaR.SVGArea;
import org.axsl.areaR.TextArea;
-import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.LinkType;
import org.axsl.fontR.Font;
import org.axsl.fontR.FontUse;
import org.axsl.graphicR.Graphic;
@@ -446,7 +446,7 @@
protected void createBasicLink(final BasicLinkArea area) {
boolean externalLink = false;
- if (area.linkType() == Constants.BASIC_LINK_EXTERNAL) {
+ if (area.linkType() == LinkType.EXTERNAL) {
externalLink = true;
}
this.currentPage.makeLink(area.brPoints(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 03:47:25
|
Revision: 8556
http://svn.sourceforge.net/foray/?rev=8556&view=rev
Author: victormote
Date: 2007-01-30 19:47:26 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for converting an enumeration to a typesafe enum.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 02:34:41 UTC (rev 8555)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 03:47:26 UTC (rev 8556)
@@ -1081,7 +1081,7 @@
* {@link LinkType#INTERNAL}. If this area is not part
* of a link, returns {@link LinkType#INVALID}.
*/
- public byte linkType() {
+ public LinkType linkType() {
final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
if (link == null) {
return LinkType.INVALID;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 02:34:41 UTC (rev 8555)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 03:47:26 UTC (rev 8556)
@@ -81,17 +81,14 @@
}
public boolean isValid() {
- switch (getLinkType()) {
- case LinkType.INTERNAL: {
+ final LinkType linkType = getLinkType();
+ if (linkType == LinkType.INTERNAL) {
return true;
}
- case LinkType.EXTERNAL: {
+ if (linkType == LinkType.EXTERNAL) {
return true;
}
- default: {
- return false;
- }
- }
+ return false;
}
public String getName() {
@@ -105,7 +102,7 @@
return this;
}
- public byte getLinkType() {
+ public LinkType getLinkType() {
if (! traitInternalDestination().equals("")) {
return LinkType.INTERNAL;
}
@@ -137,17 +134,14 @@
}
public String getDestination() {
- switch (this.getLinkType()) {
- case LinkType.INTERNAL: {
+ final LinkType linkType = getLinkType();
+ if (linkType == LinkType.INTERNAL) {
return this.traitInternalDestination();
}
- case LinkType.EXTERNAL: {
+ if (linkType == LinkType.EXTERNAL) {
return this.getCookedExternalDestination();
}
- default: {
- return null;
- }
- }
+ return null;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 18:05:24
|
Revision: 8559
http://svn.sourceforge.net/foray/?rev=8559&view=rev
Author: victormote
Date: 2007-01-31 10:04:58 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Conform to axsl changes for converting an enumeration to a typesafe enum.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -30,7 +30,7 @@
import org.axsl.areaR.GeneralInlineArea;
import org.axsl.areaW.AreaWException;
-import org.axsl.common.Constants;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FONode;
import org.axsl.foR.fo.RetrieveMarker;
@@ -76,8 +76,8 @@
* Overrides superclass method because InlineArea contents stack in the IPD.
* @see Area#contentStackingAxis()
*/
- public byte contentStackingAxisRelative() {
- return Constants.AXIS_IP;
+ public RelativeAxis contentStackingAxisRelative() {
+ return RelativeAxis.INLINE_PROGRESSION;
}
public Area getOverflowArea(final Area childRequesting)
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -39,6 +39,7 @@
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.common.LinkType;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FONode;
import org.axsl.foR.WritingMode;
import org.axsl.foR.fo.BasicLink;
@@ -902,8 +903,8 @@
* The default value is that contents stack in the BPD. Classes that
* stack in the IPD should override this method.
*/
- public byte contentStackingAxisRelative() {
- return Constants.AXIS_BP;
+ public RelativeAxis contentStackingAxisRelative() {
+ return RelativeAxis.BLOCK_PROGRESSION;
}
/**
@@ -921,7 +922,7 @@
* the writing-mode.
*/
public byte contentStackingDirectionAbsolute() {
- final byte relative = contentStackingAxisRelative();
+ final RelativeAxis relative = contentStackingAxisRelative();
return getWritingMode().getAbsoluteDirFromRelativeAxis(relative);
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -28,7 +28,7 @@
package org.foray.area;
-import org.axsl.common.Constants;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FONode;
import org.axsl.foR.fo.RetrieveMarker;
@@ -329,7 +329,7 @@
public int crOriginIPDOffset() {
int offset = 0;
if (getParentArea().contentStackingAxisRelative()
- == Constants.AXIS_IP) {
+ == RelativeAxis.INLINE_PROGRESSION) {
offset += this.pdUsedBySiblings();
offset += this.getAnteriorSpace();
offset += this.traitBorderStartWidth();
@@ -344,7 +344,7 @@
public int crOriginBPDOffset() {
int offset = 0;
if (getParentArea().contentStackingAxisRelative()
- == Constants.AXIS_BP) {
+ == RelativeAxis.BLOCK_PROGRESSION) {
offset += this.pdUsedBySiblings();
offset += this.getAnteriorSpace();
offset += this.traitBorderBeforeWidth();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -33,6 +33,7 @@
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
import org.axsl.foR.FOText;
import org.axsl.foR.FOTextContent;
@@ -536,8 +537,8 @@
* Overrides superclass method because LineArea contents stack in the IPD.
* @see Area#contentStackingAxis()
*/
- public byte contentStackingAxisRelative() {
- return Constants.AXIS_IP;
+ public RelativeAxis contentStackingAxisRelative() {
+ return RelativeAxis.INLINE_PROGRESSION;
}
/*
@@ -588,7 +589,7 @@
*/
public int alignmentPointOffset() {
final AbsoluteAxis axis = this.getWritingMode().getAbsoluteAxis(
- Constants.AXIS_IP);
+ RelativeAxis.INLINE_PROGRESSION);
final int baseline = this.traitDominantBaseline();
final Font font = this.getPrimaryFont().getFont();
return font.baselineOffset(axis, baseline, this.traitFontSize());
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -36,6 +36,7 @@
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FObj;
import org.axsl.foR.fo.Marker;
import org.axsl.foR.fo.PageSequence;
@@ -385,7 +386,7 @@
public int crOriginX() {
switch (getWritingMode().getAbsoluteDirFromRelativeAxis(
- Constants.AXIS_BP)) {
+ RelativeAxis.BLOCK_PROGRESSION)) {
case Constants.DIRECTION_TOP_TO_BOTTOM:
case Constants.DIRECTION_BOTTOM_TO_TOP: {
if (getWritingMode().getIPDirectionOdd()
@@ -406,7 +407,7 @@
public int crOriginY() {
switch (getWritingMode().getAbsoluteDirFromRelativeAxis(
- Constants.AXIS_BP)) {
+ RelativeAxis.BLOCK_PROGRESSION)) {
case Constants.DIRECTION_TOP_TO_BOTTOM: {
return traitPageHeight() - getMarginTop();
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -34,6 +34,7 @@
import org.axsl.areaW.AreaWException;
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.fo.RegionBody;
import org.axsl.foR.fo.SimplePageMaster;
import org.axsl.graphicR.Graphic;
@@ -153,7 +154,7 @@
int y = getParentArea().crOriginY();
final SimplePageMaster spm = getPageMaster();
switch (getWritingMode().getAbsoluteDirFromRelativeAxis(
- Constants.AXIS_BP)) {
+ RelativeAxis.BLOCK_PROGRESSION)) {
case Constants.DIRECTION_TOP_TO_BOTTOM: {
y -= spm.getBeforeExtent();
break;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -30,7 +30,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.TableCellArea;
-import org.axsl.common.Constants;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.fo.RetrieveMarker;
import org.axsl.foR.fo.TableCell;
import org.axsl.foR.fo.TableRow;
@@ -53,8 +53,8 @@
* the IPD.
* @see Area#contentStackingAxis()
*/
- public byte contentStackingAxisRelative() {
- return Constants.AXIS_IP;
+ public RelativeAxis contentStackingAxisRelative() {
+ return RelativeAxis.INLINE_PROGRESSION;
}
public int crOriginY() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -33,6 +33,7 @@
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ShadowEffect;
@@ -1714,7 +1715,8 @@
final String script = this.traitScript(context);
final WritingMode writingMode = this.getWritingMode(context);
if (script.equals("auto")) {
- if (writingMode.getAbsoluteAxis(Constants.AXIS_IP)
+ if (writingMode.getAbsoluteAxis(
+ RelativeAxis.INLINE_PROGRESSION)
== AbsoluteAxis.HORIZONTAL) {
/* The writing mode is horizontal. */
return FoValue.ALPHABETIC;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -148,6 +148,7 @@
import org.axsl.common.Constants;
import org.axsl.common.FoProperty;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
import org.axsl.foR.ShadowEffect;
import org.axsl.foR.Shape;
@@ -641,10 +642,11 @@
property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
- return property.getValue(context, Constants.AXIS_IP, fobj);
+ return property.getValue(context, RelativeAxis.INLINE_PROGRESSION,
+ fobj);
}
return BorderSeparation.getValueNoInstance(context,
- Constants.AXIS_IP, fobj);
+ RelativeAxis.INLINE_PROGRESSION, fobj);
}
public int getBorderSeparationBPD(final FOContext context) {
@@ -654,10 +656,11 @@
property = (BorderSpacing) getProperty(FoProperty.BORDER_SPACING);
}
if (property != null) {
- return property.getValue(context, Constants.AXIS_BP, fobj);
+ return property.getValue(context, RelativeAxis.BLOCK_PROGRESSION,
+ fobj);
}
return BorderSeparation.getValueNoInstance(context,
- Constants.AXIS_BP, fobj);
+ RelativeAxis.BLOCK_PROGRESSION, fobj);
}
public int getNumberColumnsRepeated() {
@@ -1587,10 +1590,10 @@
* "auto".
*/
private int getRelativeDimension(final FOContext context,
- final byte relativeAxis, final int subProperty,
+ final RelativeAxis relativeAxis, final int subProperty,
final int parentAreaCRDimension) {
RelativeDimension property = null;
- if (relativeAxis == Constants.AXIS_BP) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
property = (RelativeDimension)
getProperty(FoProperty.BLOCK_PROGRESSION_DIMENSION);
} else {
@@ -1652,42 +1655,42 @@
public int traitBPDimensionMin(final FOContext context,
final int parentAreaContentBPD) {
- return getRelativeDimension(context, Constants.AXIS_BP,
+ return getRelativeDimension(context, RelativeAxis.BLOCK_PROGRESSION,
Property.MINIMUM,
parentAreaContentBPD);
}
public int traitBPDimensionOpt(final FOContext context,
final int parentAreaContentBPD) {
- return getRelativeDimension(context, Constants.AXIS_BP,
+ return getRelativeDimension(context, RelativeAxis.BLOCK_PROGRESSION,
Property.OPTIMUM,
parentAreaContentBPD);
}
public int traitBPDimensionMax(final FOContext context,
final int parentAreaContentBPD) {
- return getRelativeDimension(context, Constants.AXIS_BP,
+ return getRelativeDimension(context, RelativeAxis.BLOCK_PROGRESSION,
Property.MAXIMUM,
parentAreaContentBPD);
}
public int traitIPDimensionMin(final FOContext context,
final int parentAreaContentIPD) {
- return getRelativeDimension(context, Constants.AXIS_IP,
+ return getRelativeDimension(context, RelativeAxis.INLINE_PROGRESSION,
Property.MINIMUM,
parentAreaContentIPD);
}
public int traitIPDimensionOpt(final FOContext context,
final int parentAreaContentIPD) {
- return getRelativeDimension(context, Constants.AXIS_IP,
+ return getRelativeDimension(context, RelativeAxis.INLINE_PROGRESSION,
Property.OPTIMUM,
parentAreaContentIPD);
}
public int traitIPDimensionMax(final FOContext context,
final int parentAreaContentIPD) {
- return getRelativeDimension(context, Constants.AXIS_IP,
+ return getRelativeDimension(context, RelativeAxis.INLINE_PROGRESSION,
Property.MAXIMUM,
parentAreaContentIPD);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -40,6 +40,7 @@
import org.axsl.common.Constants;
import org.axsl.common.FoProperty;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
@@ -89,7 +90,8 @@
throw unexpectedValue(value, propertyList);
}
- public int getValue(final FOContext context, final byte relativeAxis,
+ public int getValue(final FOContext context,
+ final RelativeAxis relativeAxis,
final FObj fobj, final int dimAncestorGenByBlockLevelFO) {
if (value() instanceof DtPercentage) {
final int base = dimAncestorGenByBlockLevelFO;
@@ -134,12 +136,12 @@
}
private int getInheritValue(final FOContext context,
- final byte relativeAxis, final FObj fobj,
+ final RelativeAxis relativeAxis, final FObj fobj,
final int dimAncestorGenByBlockLevelFO) {
switch (getPropertyType()) {
case FoProperty.HEIGHT:
case FoProperty.WIDTH: {
- if (relativeAxis == Constants.AXIS_BP) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
return fobj.effectiveParent(context).traitBPDimensionOpt(
context, dimAncestorGenByBlockLevelFO);
}
@@ -148,7 +150,7 @@
}
case FoProperty.MAX_HEIGHT:
case FoProperty.MAX_WIDTH: {
- if (relativeAxis == Constants.AXIS_BP) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
return fobj.effectiveParent(context).traitBPDimensionMax(
context, dimAncestorGenByBlockLevelFO);
}
@@ -157,7 +159,7 @@
}
case FoProperty.MIN_HEIGHT:
case FoProperty.MIN_WIDTH: {
- if (relativeAxis == Constants.AXIS_BP) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
return fobj.effectiveParent(context).traitBPDimensionMin(
context, dimAncestorGenByBlockLevelFO);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -38,8 +38,8 @@
import org.foray.fotree.value.PropertyKeyword;
import org.foray.fotree.value.PropertyValue;
-import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
@@ -87,7 +87,7 @@
throw unexpectedValue(value, propertyList);
}
- public int getValue(final FOContext context, final byte axis,
+ public int getValue(final FOContext context, final RelativeAxis axis,
final FObj fobj) {
if (value() instanceof PropertyKeyword) {
final short keyword = ((PropertyKeyword) value()).getValue();
@@ -100,35 +100,31 @@
value();
ExprNumeric numeric = null;
final int fontSize = fobj.traitFontSize(context);
- switch (axis) {
- case Constants.AXIS_BP: {
+ if (axis == RelativeAxis.BLOCK_PROGRESSION) {
numeric = lengthDir.getBPDLength();
return numeric.getLength(fontSize, 0);
}
- case Constants.AXIS_IP: {
+ if (axis == RelativeAxis.INLINE_PROGRESSION) {
numeric = lengthDir.getIPDLength();
return numeric.getLength(fontSize, 0);
}
- }
}
// This is an error that should already be caught.
return getValueNoInstance(context, axis, fobj);
}
public static int getValueNoInstance(final FOContext context,
- final byte axis, final FObj fobj) {
+ final RelativeAxis axis, final FObj fobj) {
final FObj parent = fobj.effectiveParent(context);
if (parent == null) {
return 0;
}
- switch (axis) {
- case Constants.AXIS_BP: {
+ if (axis == RelativeAxis.BLOCK_PROGRESSION) {
return parent.traitBorderSeparationBPD(context);
}
- case Constants.AXIS_IP: {
+ if (axis == RelativeAxis.INLINE_PROGRESSION) {
return parent.traitBorderSeparationIPD(context);
}
- }
return 0;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -43,8 +43,8 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.common.AbsoluteAxis;
-import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
/**
@@ -113,9 +113,11 @@
context);
AbsoluteAxis absoluteAxis = AbsoluteAxis.INVALID;
if (fobj instanceof RegionBefore || fobj instanceof RegionAfter) {
- absoluteAxis = writingMode.getAbsoluteAxis(Constants.AXIS_BP);
+ absoluteAxis = writingMode.getAbsoluteAxis(
+ RelativeAxis.BLOCK_PROGRESSION);
} else if (fobj instanceof RegionStart || fobj instanceof RegionEnd) {
- absoluteAxis = writingMode.getAbsoluteAxis(Constants.AXIS_IP);
+ absoluteAxis = writingMode.getAbsoluteAxis(
+ RelativeAxis.INLINE_PROGRESSION);
}
if (absoluteAxis == AbsoluteAxis.VERTICAL) {
return fobj.traitPageHeight();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeDimension.java 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeDimension.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -40,6 +40,7 @@
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
+import org.axsl.common.RelativeAxis;
import org.axsl.foR.FOContext;
/**
@@ -80,7 +81,7 @@
throw unexpectedValue(value, propertyList);
}
- public int getValue(final FOContext context, final byte axis,
+ public int getValue(final FOContext context, final RelativeAxis axis,
final int subProperty,
final FObj fobj, final int parentAreaCRDimension) {
if (value() instanceof DtLengthRange) {
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 2007-01-31 17:33:28 UTC (rev 8558)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2007-01-31 18:04:58 UTC (rev 8559)
@@ -30,6 +30,7 @@
import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
+import org.axsl.common.RelativeAxis;
import java.util.HashMap;
@@ -264,18 +265,18 @@
* horizontal axis.
* @return Either AXIS_BP or AXIS_IP, or -1 if writing-mode is invalid.
*/
- public byte getHorizontalAxis() {
+ public RelativeAxis getHorizontalAxis() {
switch (bpd) {
case Constants.DIRECTION_LEFT_TO_RIGHT:
case Constants.DIRECTION_RIGHT_TO_LEFT: {
- return Constants.AXIS_BP;
+ return RelativeAxis.BLOCK_PROGRESSION;
}
case Constants.DIRECTION_TOP_TO_BOTTOM:
case Constants.DIRECTION_BOTTOM_TO_TOP: {
- return Constants.AXIS_IP;
+ return RelativeAxis.INLINE_PROGRESSION;
}
}
- return -1;
+ return RelativeAxis.INVALID;
}
/**
@@ -283,18 +284,18 @@
* vertical axis.
* @return Either AXIS_BP or AXIS_IP, or -1 if writing-mode is invalid.
*/
- public byte getVerticalAxis() {
+ public RelativeAxis getVerticalAxis() {
switch (bpd) {
case Constants.DIRECTION_LEFT_TO_RIGHT:
case Constants.DIRECTION_RIGHT_TO_LEFT: {
- return Constants.AXIS_IP;
+ return RelativeAxis.INLINE_PROGRESSION;
}
case Constants.DIRECTION_TOP_TO_BOTTOM:
case Constants.DIRECTION_BOTTOM_TO_TOP: {
- return Constants.AXIS_BP;
+ return RelativeAxis.BLOCK_PROGRESSION;
}
}
- return -1;
+ return RelativeAxis.INVALID;
}
/**
@@ -338,15 +339,13 @@
* @return Either AXIS_HORIZONTAL or AXIS_VERTICAL, or -1 if writing-mode
* or input is invalid.
*/
- public AbsoluteAxis getAbsoluteAxis(final byte relativeAxis) {
- switch (relativeAxis) {
- case Constants.AXIS_BP: {
+ public AbsoluteAxis getAbsoluteAxis(final RelativeAxis relativeAxis) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
return getBPAxis();
}
- case Constants.AXIS_IP: {
+ if (relativeAxis == RelativeAxis.INLINE_PROGRESSION) {
return getIPAxis();
}
- }
return AbsoluteAxis.INVALID;
}
@@ -357,14 +356,14 @@
* @return Either AXIS_IP or AXIS_BP, or -1 if writing-mode or input
* is invalid.
*/
- public byte getRelativeAxis(final AbsoluteAxis absoluteAxis) {
+ public RelativeAxis getRelativeAxis(final AbsoluteAxis absoluteAxis) {
if (absoluteAxis == AbsoluteAxis.HORIZONTAL) {
return getHorizontalAxis();
}
if (absoluteAxis == AbsoluteAxis.VERTICAL) {
return getVerticalAxis();
}
- return -1;
+ return RelativeAxis.INVALID;
}
/**
@@ -593,15 +592,14 @@
* DIRECTION_LEFT_TO_RIGHT, or DIRECTION_RIGHT_TO_LEFT, or -1 for invalid
* input or writing mode.
*/
- public byte getAbsoluteDirFromRelativeAxis(final byte relativeAxis) {
- switch (relativeAxis) {
- case Constants.AXIS_BP: {
+ public byte getAbsoluteDirFromRelativeAxis(
+ final RelativeAxis relativeAxis) {
+ if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
return this.bpd;
}
- case Constants.AXIS_IP: {
+ if (relativeAxis == RelativeAxis.INLINE_PROGRESSION) {
return this.ipdOdd;
}
- }
return -1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-01-31 17:50:46
|
Revision: 8558
http://svn.sourceforge.net/foray/?rev=8558&view=rev
Author: victormote
Date: 2007-01-31 09:33:28 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Conform to axsl changes for converting an enumeration to a typesafe enum.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PageDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -35,6 +35,7 @@
import org.axsl.areaW.ListBlockArea;
import org.axsl.areaW.NormalBlockArea;
import org.axsl.areaW.TableArea;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.common.LinkType;
@@ -347,7 +348,7 @@
public int brOriginX() {
// Start at the padding-rectangle origin.
int x = prOriginX();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
final boolean goingRight = this.traitIPDirectionOdd()
== Constants.DIRECTION_LEFT_TO_RIGHT;
@@ -377,7 +378,7 @@
public int brOriginY() {
// Start at the padding-rectangle origin.
int y = prOriginY();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
final boolean goingDown = this.traitBPDirection()
== Constants.DIRECTION_TOP_TO_BOTTOM;
@@ -447,7 +448,7 @@
public int prOriginX() {
// Start at the content-rectangle origin.
int x = crOriginX();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
final boolean goingRight = this.traitIPDirectionOdd()
== Constants.DIRECTION_LEFT_TO_RIGHT;
@@ -477,7 +478,7 @@
public int prOriginY() {
// Start at the content-rectangle origin.
int y = crOriginY();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
final boolean goingDown = this.traitBPDirection()
== Constants.DIRECTION_TOP_TO_BOTTOM;
if (goingDown) {
@@ -880,11 +881,11 @@
* @return Either AXIS_HORIZONTAL or AXIS_VERTICAL, or -1 if writing-mode
* is invalid.
*/
- public byte getBPAxis() {
+ public AbsoluteAxis getBPAxis() {
return traitGeneratedBy().getBPAxis(this);
}
- public byte getIPAxis() {
+ public AbsoluteAxis getIPAxis() {
return traitGeneratedBy().getIPAxis(this);
}
@@ -910,7 +911,7 @@
* relative content stacking axis and the writing-mode.
* @see #contentStackingAxisRelative()
*/
- public byte contentStackingAxisAbsolute() {
+ public AbsoluteAxis contentStackingAxisAbsolute() {
return getWritingMode().getAbsoluteAxis(contentStackingAxisRelative());
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -30,6 +30,7 @@
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
@@ -586,7 +587,7 @@
* alignment-point.
*/
public int alignmentPointOffset() {
- final int axis = this.getWritingMode().getAbsoluteAxis(
+ final AbsoluteAxis axis = this.getWritingMode().getAbsoluteAxis(
Constants.AXIS_IP);
final int baseline = this.traitDominantBaseline();
final Font font = this.getPrimaryFont().getFont();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -33,6 +33,7 @@
import org.axsl.areaR.RegionBodyArea;
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.foR.FObj;
@@ -353,14 +354,14 @@
}
public int crIPD() {
- if (getWritingMode().getIPAxis() == Constants.AXIS_HORIZONTAL) {
+ if (getWritingMode().getIPAxis() == AbsoluteAxis.HORIZONTAL) {
return traitPageWidth() - getMarginLeft() - getMarginRight();
}
return traitPageHeight() - getMarginTop() - getMarginBottom();
}
public int crBPD() {
- if (getWritingMode().getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (getWritingMode().getBPAxis() == AbsoluteAxis.VERTICAL) {
return traitPageHeight() - getMarginTop() - getMarginBottom();
}
return traitPageWidth() - getMarginLeft() - getMarginRight();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -32,6 +32,7 @@
import org.axsl.areaR.RegionBodyArea;
import org.axsl.areaR.RenderVisitor;
import org.axsl.areaW.AreaWException;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.foR.fo.RegionBody;
import org.axsl.foR.fo.SimplePageMaster;
@@ -83,7 +84,7 @@
public int crBPD() {
int dimension = getParentArea().brBPD();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
dimension -= getMarginTop();
dimension -= getMarginBottom();
} else {
@@ -95,7 +96,7 @@
public int crIPD() {
int dimension = getParentArea().brIPD();
- if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
dimension -= getMarginLeft();
dimension -= getMarginRight();
} else {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -31,6 +31,7 @@
import org.foray.font.format.Kerning;
import org.foray.font.format.Panose;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Baseline;
import org.axsl.fontR.Font;
@@ -389,8 +390,8 @@
/**
* {@inheritDoc}
*/
- public int baselineOffset(final int writingMode, final int baselineType,
- final int fontSize) {
+ public int baselineOffset(final AbsoluteAxis writingMode,
+ final int baselineType, final int fontSize) {
final int baseline = extractBaseline(writingMode, baselineType,
fontSize);
if (baseline == Integer.MIN_VALUE) {
@@ -401,26 +402,32 @@
/**
* Returns the font's explicit definition of the baseline, if possible.
- * @param writingMode Same as for {@link #baselineOffset(int, int, int)}.
- * @param baselineType Same as for {@link #baselineOffset(int, int, int)}.
- * @param fontSize Same as for {@link #baselineOffset(int, int, int)}.
+ * @param writingMode Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
+ * @param baselineType Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
+ * @param fontSize Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
* @return The extracted Baseline, as described for
- * {@link #baselineOffset(int, int, int)}, if it exists. Otherwise, returns
- * {@link Integer#MIN_VALUE}.
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}, if it exists.
+ * Otherwise, returns {@link Integer#MIN_VALUE}.
*/
- public abstract int extractBaseline(int writingMode, int baselineType,
- int fontSize);
+ public abstract int extractBaseline(AbsoluteAxis writingMode,
+ int baselineType, int fontSize);
/**
* Provides reasonable estimates of the various baseline values for the
* font, based on other font metrics.
- * @param writingMode Same as for {@link #baselineOffset(int, int, int)}.
- * @param baselineType Same as for {@link #baselineOffset(int, int, int)}.
- * @param fontSize Same as for {@link #baselineOffset(int, int, int)}.
+ * @param writingMode Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
+ * @param baselineType Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
+ * @param fontSize Same as for
+ * {@link #baselineOffset(AbsoluteAxis, int, int)}.
* @return The estimated value of the baseline.
*/
- public int estimateBaseline(final int writingMode, final int baselineType,
- final int fontSize) {
+ public int estimateBaseline(final AbsoluteAxis writingMode,
+ final int baselineType, final int fontSize) {
switch (baselineType) {
case Baseline.ALPHABETIC: {
return fontSize + this.getDescender(fontSize);
Modified: trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -34,6 +34,7 @@
import org.foray.font.format.Kerning;
import org.foray.ps.encode.Encoding;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.fontR.Font;
import java.io.IOException;
@@ -420,8 +421,8 @@
/**
* {@inheritDoc}
*/
- public int extractBaseline(final int writingMode, final int baselineType,
- final int fontSize) {
+ public int extractBaseline(final AbsoluteAxis writingMode,
+ final int baselineType, final int fontSize) {
return Integer.MIN_VALUE;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -34,6 +34,7 @@
import org.foray.font.format.FontFileReader;
import org.foray.font.format.Kerning;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.fontR.FontException;
import java.awt.Font;
@@ -553,8 +554,8 @@
/**
* {@inheritDoc}
*/
- public int extractBaseline(final int writingMode, final int baselineType,
- final int fontSize) {
+ public int extractBaseline(final AbsoluteAxis writingMode,
+ final int baselineType, final int fontSize) {
return Integer.MIN_VALUE;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -30,6 +30,7 @@
import org.foray.common.XMLCharacter;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
@@ -1714,7 +1715,7 @@
final WritingMode writingMode = this.getWritingMode(context);
if (script.equals("auto")) {
if (writingMode.getAbsoluteAxis(Constants.AXIS_IP)
- == Constants.AXIS_HORIZONTAL) {
+ == AbsoluteAxis.HORIZONTAL) {
/* The writing mode is horizontal. */
return FoValue.ALPHABETIC;
} else {
@@ -2454,14 +2455,14 @@
/**
* {@inheritDoc}
*/
- public byte getBPAxis(final FOContext context) {
+ public AbsoluteAxis getBPAxis(final FOContext context) {
return propertyList.getBPAxis(context);
}
/**
* {@inheritDoc}
*/
- public byte getIPAxis(final FOContext context) {
+ public AbsoluteAxis getIPAxis(final FOContext context) {
return propertyList.getIPAxis(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -144,6 +144,7 @@
import org.foray.fotree.xml.PropertyMakerXML;
import org.foray.fotree.xml.prop.Lang;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.Constants;
import org.axsl.common.FoProperty;
import org.axsl.common.FoValue;
@@ -1037,7 +1038,7 @@
return MaximumRepeats.getValueNoInstance();
}
- private int getPageDimension(final byte axis) {
+ private int getPageDimension(final AbsoluteAxis axis) {
final short propertyType = PageDimension.rawPropertyType(axis);
final PageDimension property = (PageDimension)
getProperty(propertyType);
@@ -1055,11 +1056,11 @@
}
public int getPageWidth() {
- return getPageDimension(Constants.AXIS_HORIZONTAL);
+ return getPageDimension(AbsoluteAxis.HORIZONTAL);
}
public int getPageHeight() {
- return getPageDimension(Constants.AXIS_VERTICAL);
+ return getPageDimension(AbsoluteAxis.VERTICAL);
}
public short getTextAlign(final FOContext context) {
@@ -1406,14 +1407,15 @@
}
public ContentDimension getContentDimensionProperty(
- final byte absoluteAxis) {
+ final AbsoluteAxis absoluteAxis) {
final short propertyType = ContentDimension.rawPropertyName(
absoluteAxis);
return (ContentDimension) getProperty(propertyType);
}
private float getContentDimension(final FOContext context,
- final byte absoluteAxis, final float intrinsicContentDimension,
+ final AbsoluteAxis absoluteAxis,
+ final float intrinsicContentDimension,
final float viewportDimension) {
final ContentDimension property = getContentDimensionProperty(
absoluteAxis);
@@ -1430,7 +1432,7 @@
*/
public float getContentWidth(final FOContext context,
final float intrinsicContentWidth, final float viewportWidth) {
- return getContentDimension(context, Constants.AXIS_HORIZONTAL,
+ return getContentDimension(context, AbsoluteAxis.HORIZONTAL,
intrinsicContentWidth, viewportWidth);
}
@@ -1441,7 +1443,7 @@
public float getContentHeight(final FOContext context,
final float intrinsicContentHeight,
final float viewportHeight) {
- return getContentDimension(context, Constants.AXIS_VERTICAL,
+ return getContentDimension(context, AbsoluteAxis.VERTICAL,
intrinsicContentHeight, viewportHeight);
}
@@ -1601,9 +1603,10 @@
}
// Try the corresponding absolute dimension
AbsoluteDimension absDimProperty = null;
- final byte absoluteAxis = getWritingMode(context).getAbsoluteAxis(
+ final DtWritingMode writingMode = this.getWritingMode(context);
+ final AbsoluteAxis absoluteAxis = writingMode.getAbsoluteAxis(
relativeAxis);
- if (absoluteAxis == Constants.AXIS_HORIZONTAL) {
+ if (absoluteAxis == AbsoluteAxis.HORIZONTAL) {
switch (subProperty) {
case Property.MINIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
@@ -1621,7 +1624,7 @@
break;
}
}
- } else if (absoluteAxis == Constants.AXIS_VERTICAL) {
+ } else if (absoluteAxis == AbsoluteAxis.VERTICAL) {
switch (subProperty) {
case Property.MINIMUM: {
absDimProperty = (AbsoluteDimension) getProperty(
@@ -1642,7 +1645,7 @@
}
if (absDimProperty != null) {
return absDimProperty.getValue(context,
- absoluteAxis, fobj, parentAreaCRDimension);
+ relativeAxis, fobj, parentAreaCRDimension);
}
return RelativeDimension.getValueNoInstance();
}
@@ -3123,20 +3126,20 @@
final GlyphOrientation property = (GlyphOrientation)
getProperty(FoProperty.GLYPH_ORIENTATION_HORIZONTAL);
if (property != null) {
- return property.getValue(context, fobj, Constants.AXIS_HORIZONTAL);
+ return property.getValue(context, fobj, AbsoluteAxis.HORIZONTAL);
}
return GlyphOrientation.getValueNoInstance(context, fobj,
- Constants.AXIS_HORIZONTAL);
+ AbsoluteAxis.HORIZONTAL);
}
public short traitGlyphOrientationVertical(final FOContext context) {
final GlyphOrientation property = (GlyphOrientation)
getProperty(FoProperty.GLYPH_ORIENTATION_VERTICAL);
if (property != null) {
- return property.getValue(context, fobj, Constants.AXIS_VERTICAL);
+ return property.getValue(context, fobj, AbsoluteAxis.VERTICAL);
}
return GlyphOrientation.getValueNoInstance(context, fobj,
- Constants.AXIS_VERTICAL);
+ AbsoluteAxis.VERTICAL);
}
public int traitBackgroundPositionHorizontal(final FOContext context,
@@ -3146,7 +3149,7 @@
getProperty(FoProperty.BACKGROUND_POSITION_HORIZONTAL);
if (property != null) {
return property.getValue(context, fobj,
- Constants.AXIS_HORIZONTAL, paddingRectangleWidth,
+ AbsoluteAxis.HORIZONTAL, paddingRectangleWidth,
backgroundImageWidth);
}
// Try the first shorthand
@@ -3154,7 +3157,7 @@
FoProperty.BACKGROUND_POSITION);
if (property != null) {
return property.getShorthandValue(context,
- fobj, Constants.AXIS_HORIZONTAL,
+ fobj, AbsoluteAxis.HORIZONTAL,
paddingRectangleWidth, backgroundImageWidth);
}
// Try the second shorthand
@@ -3164,7 +3167,7 @@
property = background.getPosition();
if (property != null) {
return property.getShorthandValue(context,
- fobj, Constants.AXIS_HORIZONTAL,
+ fobj, AbsoluteAxis.HORIZONTAL,
paddingRectangleWidth, backgroundImageWidth);
}
}
@@ -3178,7 +3181,7 @@
getProperty(FoProperty.BACKGROUND_POSITION_VERTICAL);
if (property != null) {
return property.getValue(context, fobj,
- Constants.AXIS_VERTICAL, paddingRectangleHeight,
+ AbsoluteAxis.VERTICAL, paddingRectangleHeight,
backgroundImageHeight);
}
// Try the first shorthand
@@ -3186,7 +3189,7 @@
FoProperty.BACKGROUND_POSITION);
if (property != null) {
return property.getShorthandValue(context,
- fobj, Constants.AXIS_VERTICAL,
+ fobj, AbsoluteAxis.VERTICAL,
paddingRectangleHeight, backgroundImageHeight);
}
// Try the second shorthand
@@ -3196,7 +3199,7 @@
property = background.getPosition();
if (property != null) {
return property.getShorthandValue(context,
- fobj, Constants.AXIS_VERTICAL,
+ fobj, AbsoluteAxis.VERTICAL,
paddingRectangleHeight, backgroundImageHeight);
}
}
@@ -3248,7 +3251,7 @@
* @return Either AXIS_HORIZONTAL or AXIS_VERTICAL, or -1 if writing-mode
* is invalid.
*/
- public byte getBPAxis(final FOContext context) {
+ public AbsoluteAxis getBPAxis(final FOContext context) {
return getWritingMode(context).getBPAxis();
}
@@ -3257,7 +3260,7 @@
* @return Either AXIS_HORIZONTAL or AXIS_VERTICAL, or -1 if writing-mode
* is invalid.
*/
- public byte getIPAxis(final FOContext context) {
+ public AbsoluteAxis getIPAxis(final FOContext context) {
return getWritingMode(context).getIPAxis();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -39,7 +39,7 @@
import org.foray.fotree.value.PropertyKeyword;
import org.foray.fotree.value.PropertyValue;
-import org.axsl.common.Constants;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.FoProperty;
import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
@@ -186,7 +186,7 @@
}
public int getValue(final FOContext context, final FObj fobj,
- final byte axis, final int paddingRectangleDimension,
+ final AbsoluteAxis axis, final int paddingRectangleDimension,
final int backgroundImageDimension) {
if (value() instanceof DtPercentage) {
final float percent = ((DtPercentage) value()).getValue();
@@ -215,18 +215,16 @@
case FoValue.INHERIT: {
final FObj parent = fobj.effectiveParent(context);
if (parent != null) {
- switch (axis) {
- case Constants.AXIS_HORIZONTAL: {
+ if (axis == AbsoluteAxis.HORIZONTAL) {
return parent.traitBackgroundPositionHorizontal(
context, paddingRectangleDimension,
backgroundImageDimension);
}
- case Constants.AXIS_VERTICAL: {
+ if (axis == AbsoluteAxis.VERTICAL) {
return parent.traitBackgroundPositionVertical(
context, paddingRectangleDimension,
backgroundImageDimension);
}
- }
}
}
}
@@ -235,7 +233,7 @@
}
public int getShorthandValue(final FOContext context, final FObj fobj,
- final byte axis, final int paddingRectangleDimension,
+ final AbsoluteAxis axis, final int paddingRectangleDimension,
final int backgroundImageDimension) {
final PropertyCollection collection = (PropertyCollection) value();
final BackgroundPosition bpProperty = (BackgroundPosition) collection
@@ -243,19 +241,19 @@
final PropertyValue pv = bpProperty.value();
if (collection.getCount() == 1) {
if (pv instanceof DtPercentage || pv instanceof DtLength) {
- if (axis == Constants.AXIS_VERTICAL) {
+ if (axis == AbsoluteAxis.VERTICAL) {
return Math.round((paddingRectangleDimension
- backgroundImageDimension) / 2);
}
}
if (pv instanceof PropertyKeyword) {
final short keyword = ((PropertyKeyword) pv).getValue();
- if (axis == Constants.AXIS_HORIZONTAL
+ if (axis == AbsoluteAxis.HORIZONTAL
&& keywordInSet(keyword, VALID_KEYWORDS_VERTICAL)) {
return Math.round((paddingRectangleDimension
- backgroundImageDimension) / 2);
}
- if (axis == Constants.AXIS_VERTICAL
+ if (axis == AbsoluteAxis.VERTICAL
&& keywordInSet(keyword, VALID_KEYWORDS_HORIZONTAL)) {
return Math.round((paddingRectangleDimension
- backgroundImageDimension) / 2);
@@ -276,10 +274,10 @@
final PropertyValue pv2 = bpProperty2.value();
BackgroundPosition bpPropertyToUse = null;
if (pv instanceof DtPercentage || pv instanceof DtLength) {
- if (axis == Constants.AXIS_HORIZONTAL) {
+ if (axis == AbsoluteAxis.HORIZONTAL) {
bpPropertyToUse = bpProperty;
}
- if (axis == Constants.AXIS_VERTICAL) {
+ if (axis == AbsoluteAxis.VERTICAL) {
bpPropertyToUse = bpProperty2;
}
}
@@ -299,14 +297,14 @@
if (keywordInSet(keyword2, VALID_KEYWORDS_HORIZONTAL)) {
horizontalFirst = false;
}
- if (axis == Constants.AXIS_HORIZONTAL) {
+ if (axis == AbsoluteAxis.HORIZONTAL) {
if (horizontalFirst) {
bpPropertyToUse = bpProperty;
} else {
bpPropertyToUse = bpProperty2;
}
}
- if (axis == Constants.AXIS_VERTICAL) {
+ if (axis == AbsoluteAxis.VERTICAL) {
if (horizontalFirst) {
bpPropertyToUse = bpProperty2;
} else {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java 2007-01-31 15:08:14 UTC (rev 8557)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java 2007-01-31 17:33:28 UTC (rev 8558)
@@ -37,7 +37,7 @@
import org.foray.fotree.value.PropertyKeyword;
import org.foray.fotree.value.PropertyValue;
-import org.axsl.common.Constants;
+import org.axsl.common.AbsoluteAxis;
import org.axsl.common.FoProperty;
import org.axsl.common.FoValue;
import org.axsl.foR.FOContext;
@@ -82,8 +82,8 @@
* @param context An object that knows how to resolve FO Tree context
* issues.
* @param fobj The FObj instance to which this property is attached.
- * @param absoluteAxis One of {@link Constants#AXIS_HORIZONTAL} or
- * {@link Constants#AXIS_VERTICAL}.
+ * @param absoluteAxis One of {@link AbsoluteAxis#HORIZONTAL} or
+ * {@link AbsoluteAxis#VERTICAL}.
* @param intrinsicContentDimension The intrinsic dimension, either height
* or width (depending on the nature of this instance), of the content.
* @param viewportDimension The viewport dimension, either height or width
@@ -92,7 +92,8 @@
* @return The scaling factor implied or stated by this property.
*/
public float getValue(final FOContext context, final FObj fobj,
- final byte absoluteAxis, final float intrinsicContentDimension,
+ final AbsoluteAxis absoluteAxis,
+ final float intrinsicContentDimension,
final float viewportDimension) {
if (value() instanceof PropertyKeyword) {
final short keyword = ((PropertyKeyword) value()).getValue();
@@ -102,19 +103,15 @@
if (parent == null) {
return getValueNoInstance();
}
- switch (absoluteAxis) {
- case Constants.AXIS_VERTICAL: {
+ if (absoluteAxis == AbsoluteAxis.VERTICAL) {
return parent.getContentHeight(context,
intrinsicContentDimension, viewportDimension);
}
- case Constants.AXIS_HORIZONTAL: {
+ if (absoluteAxis == AbsoluteAxis.HORIZONTAL) {
return parent.getContentWidth(context,
intrinsicContentDimension, viewportDimension);
}
- default: {
- return getValueNoIn...
[truncated message content] |