Thread: [FOray-commit] SF.net SVN: foray: [10071] trunk/foray (Page 20)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-20 20:49:08
|
Revision: 10071
http://svn.sourceforge.net/foray/?rev=10071&view=rev
Author: victormote
Date: 2007-07-20 13:49:08 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing unneeded methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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-07-20 20:39:33 UTC (rev 10070)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 20:49:08 UTC (rev 10071)
@@ -629,7 +629,7 @@
* {@link AbsoluteAxis#VERTICAL}, or null if writing-mode is invalid.
*/
public AbsoluteAxis getBPAxis() {
- return traitGeneratedBy().getBpAxis(this);
+ return getWritingMode().getBpAxis();
}
/**
@@ -638,7 +638,7 @@
* {@link AbsoluteAxis#VERTICAL}, or null if writing-mode is invalid.
*/
public AbsoluteAxis getIPAxis() {
- return traitGeneratedBy().getIpAxis(this);
+ return getWritingMode().getIpAxis();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:39:33 UTC (rev 10070)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:49:08 UTC (rev 10071)
@@ -921,7 +921,6 @@
default: throw new IllegalArgumentException(
"Illegal wrap-option value: " + foWrapOption.toXslFo());
}
-
}
/**
@@ -3861,20 +3860,6 @@
}
/**
- * {@inheritDoc}
- */
- public AbsoluteAxis getBpAxis(final FoContext context) {
- return this.getPropertyList().getBPAxis(this, context);
- }
-
- /**
- * {@inheritDoc}
- */
- public AbsoluteAxis getIpAxis(final FoContext context) {
- return this.getPropertyList().getIPAxis(this, context);
- }
-
- /**
* Returns the writing-mode for this FO.
* @param context An object that knows how to resolve FO Tree context
* issues.
@@ -3892,20 +3877,6 @@
}
/**
- * {@inheritDoc}
- */
- public FObj getPreviousSiblingFo() {
- AbstractOrderedTreeNode node = this;
- while (node != null) {
- node = (FObj) node.getPreviousSibling();
- if (node instanceof FObj) {
- return (FObj) node;
- }
- }
- return null;
- }
-
- /**
* Reports whether the object fits the %block parameter entity described
* in XSL-FO Std 1.0, Section 6.2. This includes not just the %block
* definition, but also all other objects, such as the neutral containers
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 20:55:47
|
Revision: 10072
http://svn.sourceforge.net/foray/?rev=10072&view=rev
Author: victormote
Date: 2007-07-20 13:55:50 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes renaming two methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.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-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -841,7 +841,7 @@
* {@inheritDoc}
*/
public LinkType linkType() {
- final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
+ final BasicLink link = this.traitGeneratedBy().ancestorBasicLink(this);
if (link == null) {
return null;
}
@@ -852,7 +852,7 @@
* {@inheritDoc}
*/
public String linkDestination() {
- final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
+ final BasicLink link = this.traitGeneratedBy().ancestorBasicLink(this);
if (link == null) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -758,8 +758,8 @@
/**
* {@inheritDoc}
*/
- public Table getNearestTable(final FoContext context) {
- return effectiveParent(context).getNearestTable(context);
+ public Table ancestorTable(final FoContext context) {
+ return effectiveParent(context).ancestorTable(context);
}
/**
@@ -776,8 +776,8 @@
/**
* {@inheritDoc}
*/
- public BasicLink getBasicLink(final FoContext context) {
- return effectiveParent(context).getBasicLink(context);
+ public BasicLink ancestorBasicLink(final FoContext context) {
+ return effectiveParent(context).ancestorBasicLink(context);
}
/**
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-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -116,7 +116,7 @@
* Override the FONode method, because "this" is the object being sought.
*/
@Override
- public BasicLink getBasicLink(final FoContext context) {
+ public BasicLink ancestorBasicLink(final FoContext context) {
return this;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -222,7 +222,7 @@
* above this one.
*/
@Override
- public BasicLink getBasicLink(final FoContext context) {
+ public BasicLink ancestorBasicLink(final FoContext context) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -208,7 +208,7 @@
* Overrides the FObj method, because there are no Tables above here.
*/
@Override
- public Table getNearestTable(final FoContext context) {
+ public Table ancestorTable(final FoContext context) {
return null;
}
@@ -218,7 +218,7 @@
* check for a link.
*/
@Override
- public BasicLink getBasicLink(final FoContext context) {
+ public BasicLink ancestorBasicLink(final FoContext context) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -190,7 +190,7 @@
* Overrides the FObj method, because this is the nearest Table.
*/
@Override
- public Table getNearestTable(final FoContext context) {
+ public Table ancestorTable(final FoContext context) {
return this;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -99,7 +99,7 @@
* how many columns it contains. Therefore, what needs to be done here
* is to notify the table so that it knows how many columns it does
* have. */
- final Table ancestorTable = this.getNearestTable(null);
+ final Table ancestorTable = this.ancestorTable(null);
final int cellColNum = this.traitColumnNumber(null);
final int numCols = this.traitNumberColumnsSpanned();
final int maxCellOccupied = cellColNum + numCols - 1;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -115,7 +115,7 @@
* is the first column.
*/
public TableColumn getPreviousColumn(final FoContext context) {
- final Table table = this.getNearestTable(context);
+ final Table table = this.ancestorTable(context);
if (table == null) {
return null;
}
@@ -140,7 +140,7 @@
* is the last column.
*/
public TableColumn getNextColumn(final FoContext context) {
- final Table table = this.getNearestTable(context);
+ final Table table = this.ancestorTable(context);
if (table == null) {
return null;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2007-07-20 20:49:08 UTC (rev 10071)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2007-07-20 20:55:50 UTC (rev 10072)
@@ -355,7 +355,7 @@
table = (Table) fobj;
} else {
/* TODO: Provide the right context. */
- table = fobj.getNearestTable(null);
+ table = fobj.ancestorTable(null);
}
if (table == null) {
throw new PropertyException("Ancestor 'table' object not found "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 21:24:43
|
Revision: 10073
http://svn.sourceforge.net/foray/?rev=10073&view=rev
Author: victormote
Date: 2007-07-20 14:23:58 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing getFontConsumer method from Fo, and adding methods to expose the servers and factories to FoTree.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/ForeignXML.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/obj/Metadata.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Block.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTree.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarBegin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowMap.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowNameSpecifier.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowSourceList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowTargetList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FootnoteBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexKeyReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexPageCitationList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexRangeBegin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexRangeEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InitialPropertySet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Inline.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InlineContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListBlock.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItem.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemLabel.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Marker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiCase.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiProperties.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiPropertySet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiSwitch.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiToggle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceWrapper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionNameSpecifier.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveMarker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveTableMarker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ScalingValueCitation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableAndCaption.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCaption.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableRow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Title.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Wrapper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -29,6 +29,7 @@
package org.foray.area;
import org.axsl.area.AreaTreeFactory;
+import org.axsl.fo.FoTree;
import org.axsl.fo.fo.Root;
import org.axsl.text.TextServer;
@@ -61,8 +62,9 @@
* {@inheritDoc}
*/
public AreaTree makeAreaTree(final Root root) {
+ final FoTree foTree = root.getFoTree();
final AreaTree areaTree = AreaTree.makeAreaTree(root,
- root.getFontConsumer(), this.textServer, getLogger());
+ foTree.getFontConsumer(), this.textServer, getLogger());
return areaTree;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -496,8 +496,7 @@
}
/**
- * Returns the graphic server.
- * @return The graphic server.
+ * {@inheritDoc}
*/
public GraphicServer getGraphicServer() {
return this.graphicServer;
@@ -511,8 +510,7 @@
}
/**
- * Returns the text server.
- * @return The text server.
+ * {@inheritDoc}
*/
public TextServer getTextServer() {
return this.textServer;
@@ -533,16 +531,14 @@
}
/**
- * Returns the font consumer.
- * @return The font consumer.
+ * {@inheritDoc}
*/
public FontConsumer getFontConsumer() {
return this.fontConsumer;
}
/**
- * Returns the speech server.
- * @return The speech server.
+ * {@inheritDoc}
*/
public SpeechServer getSpeechServer() {
return this.speechServer;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -268,7 +268,7 @@
/* We reserve and hard-code zero for the root node. */
this.sequentialIndex = 0;
} else {
- final FOTreeBuilder builder = parent.getFOTreeBuilder();
+ final FOTreeBuilder builder = parent.getFoTree();
this.sequentialIndex = builder.getNextSequentialIndex();
}
}
@@ -415,8 +415,8 @@
* Return the ancestor tree builder.
* @return The ancestor tree builder.
*/
- public FOTreeBuilder getFOTreeBuilder() {
- return getParent().getFOTreeBuilder();
+ public FOTreeBuilder getFoTree() {
+ return getParent().getFoTree();
}
/**
@@ -825,10 +825,11 @@
}
/**
- * {@inheritDoc}
+ * Convenience method for obtaining the FontConsumer for this document.
+ * @return The FontConsumer for this document.
*/
public FontConsumer getFontConsumer() {
- return getFOTreeBuilder().getFontConsumer();
+ return getFoTree().getFontConsumer();
}
/**
@@ -836,7 +837,7 @@
* @return The speech server.
*/
public SpeechServer getSpeechServer() {
- return getFOTreeBuilder().getSpeechServer();
+ return getFoTree().getSpeechServer();
}
/**
@@ -844,7 +845,7 @@
* @return The graphic server being used by this tree.
*/
public GraphicServer getGraphicServer() {
- return getFOTreeBuilder().getGraphicServer();
+ return getFoTree().getGraphicServer();
}
/**
@@ -852,7 +853,7 @@
* @return The text server being used by this tree.
*/
public TextServer getTextServer() {
- return getFOTreeBuilder().getTextServer();
+ return getFoTree().getTextServer();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/ForeignXML.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/ForeignXML.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/ForeignXML.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -100,7 +100,7 @@
this.domDocument = createDOMDocument();
this.currentElement = domDocument.getDocumentElement();
processAttributes(this.currentElement, propertyList.getAttributes());
- parent.getFOTreeBuilder().activateForeignXML(this);
+ parent.getFoTree().activateForeignXML(this);
}
/**
@@ -214,7 +214,7 @@
// back over to the FOTreeBuilder.
if (currentElement == this.domDocument.getDocumentElement()) {
currentElement.normalize();
- getFOTreeBuilder().disactivateForeignXML();
+ getFoTree().disactivateForeignXML();
return;
}
// Otherwise go back up the tree one level.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/obj/Metadata.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/obj/Metadata.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/obj/Metadata.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -136,7 +136,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getAxslNamespace();
+ return this.getFoTree().getAxslNamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -91,7 +91,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -93,7 +93,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -95,7 +95,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -101,7 +101,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -183,7 +183,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
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-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -180,7 +180,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -110,7 +110,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Block.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Block.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Block.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -117,7 +117,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -127,7 +127,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -166,7 +166,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -128,7 +128,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTree.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTree.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTree.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -120,7 +120,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarBegin.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarBegin.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarBegin.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -107,7 +107,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarEnd.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarEnd.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarEnd.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -106,7 +106,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -126,7 +126,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -114,7 +114,7 @@
private void filterContent() {
/* If we need to preserve the raw content, no filtering should be done,
* or if it is done, it must be done on a duplicate of the raw data. */
- if (this.getFOTreeBuilder().preserveRawContent()) {
+ if (this.getFoTree().preserveRawContent()) {
return;
}
final Marker ancestorMarker = this.ancestorMarker();
@@ -1231,7 +1231,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -110,7 +110,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -245,7 +245,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -139,7 +139,7 @@
* other namespaces is permitted. */
for (FObj node : this.getChildren()) {
if (node.getNamespace()
- == this.getFOTreeBuilder().getFONamespace()) {
+ == this.getFoTree().getFONamespace()) {
if (node instanceof ColorProfile) {
/* The content is valid. */
} else {
@@ -164,7 +164,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -129,7 +129,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
@@ -147,8 +147,8 @@
makeGraphicAttempted = true;
try {
this.graphic = getGraphicServer().makeGraphic(traitSrc(context),
- getFOTreeBuilder().getGraphicSearchPath(),
- getFOTreeBuilder().getCachingGraphics());
+ getFoTree().getGraphicSearchPath(),
+ getFoTree().getCachingGraphics());
} catch (final GraphicException e) {
getLogger().error(e.getMessage() + "\n"
+ this.getContextMessage());
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -109,7 +109,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -114,7 +114,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowMap.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowMap.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowMap.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -111,7 +111,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowNameSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowNameSpecifier.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowNameSpecifier.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -107,7 +107,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowSourceList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowSourceList.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowSourceList.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -112,7 +112,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowTargetList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowTargetList.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowTargetList.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -112,7 +112,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return this.getFoTree().getFONamespace();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2007-07-20 20:55:50 UTC (rev 10072)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2007-07-20 21:23:58 UTC (rev 10073)
@@ -118,7 +118,7 @@
* {@inheritDoc}
*/
public Namespace getNamespace() {
- return this.getFOTreeBuilder().getFONamespace();
+ return thi...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-20 21:34:50
|
Revision: 10074
http://svn.sourceforge.net/foray/?rev=10074&view=rev
Author: victormote
Date: 2007-07-20 14:34:46 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Clean up AreaTree factory to ensure that AreaTrees created use the same servers and factories that are used by the FoTree.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-07-20 21:23:58 UTC (rev 10073)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2007-07-20 21:34:46 UTC (rev 10074)
@@ -101,7 +101,7 @@
final FoTreeFactory foTreeServer = FOraySpecific.makeFOTreeFactory(
logger, sessionConfig, fontServer, graphicServer, textServer);
final AreaTreeFactory areaTreeFactory =
- FOraySpecific.makeAreaTreeFactory(logger, textServer);
+ FOraySpecific.makeAreaTreeFactory(logger);
final LayoutFactory layoutFactory = FOraySpecific.makeLayoutFactory(
logger);
final SpeechServer speechServer = FOraySpecific.makeSpeechServer();
@@ -229,13 +229,12 @@
/**
* Make a standard AreaTreeFactory instance for use in FOray.
* @param logger The logger.
- * @param textServer The TextServer to use.
* @return The newly-created AreaTreeFactory instance.
* @throws FOrayException For errors creating the server.
*/
- public static FOrayAreaTreeFactory makeAreaTreeFactory(final Log logger,
- final TextServer textServer) throws FOrayException {
- return new FOrayAreaTreeFactory(logger, textServer);
+ public static FOrayAreaTreeFactory makeAreaTreeFactory(final Log logger)
+ throws FOrayException {
+ return new FOrayAreaTreeFactory(logger);
}
/**
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java 2007-07-20 21:23:58 UTC (rev 10073)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/AreaTreeCreator.java 2007-07-20 21:34:46 UTC (rev 10074)
@@ -71,8 +71,7 @@
final FOrayFOTreeServer treeServer = FoDocumentReader.getInstance()
.getTreeServer();
final FOrayAreaTreeFactory areaTreeFactory =
- FOraySpecific.makeAreaTreeFactory(treeServer.getLogger(),
- treeServer.getTextServer());
+ FOraySpecific.makeAreaTreeFactory(treeServer.getLogger());
this.areaTreeFactory = areaTreeFactory;
final PioneerFactory layoutFactory = FOraySpecific.makeLayoutFactory(
treeServer.getLogger());
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-20 21:23:58 UTC (rev 10073)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-20 21:34:46 UTC (rev 10074)
@@ -32,6 +32,7 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.AreaTreeListener;
import org.axsl.fo.Fo;
+import org.axsl.fo.FoTree;
import org.axsl.fo.fo.Bookmark;
import org.axsl.fo.fo.BookmarkTree;
import org.axsl.fo.fo.Marker;
@@ -124,16 +125,13 @@
/**
* Package-visible factory method.
* @param root The FO Root object that generates this area tree.
- * @param fontConsumer The Font Consumer.
- * @param textServer The Text Server.
* @param logger The logger.
* @return The new instance.
*/
- static AreaTree makeAreaTree(final Root root,
- final FontConsumer fontConsumer, final TextServer textServer,
- final Log logger) {
- final AreaTree newAreaTree = new AreaTree(fontConsumer, textServer,
- logger);
+ static AreaTree makeAreaTree(final Root root, final Log logger) {
+ final FoTree foTree = root.getFoTree();
+ final AreaTree newAreaTree = new AreaTree(foTree.getFontConsumer(),
+ foTree.getTextServer(), logger);
/*
* These registration steps must take place after the AreaTreeControl
* has been stored.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java 2007-07-20 21:23:58 UTC (rev 10073)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FOrayAreaTreeFactory.java 2007-07-20 21:34:46 UTC (rev 10074)
@@ -29,9 +29,7 @@
package org.foray.area;
import org.axsl.area.AreaTreeFactory;
-import org.axsl.fo.FoTree;
import org.axsl.fo.fo.Root;
-import org.axsl.text.TextServer;
import org.apache.commons.logging.Log;
@@ -45,26 +43,19 @@
/** The logger. */
private Log logger;
- /** The text server for this factory. */
- private TextServer textServer;
-
/**
* Constructor.
* @param logger The logger.
- * @param textServer The text server.
*/
- public FOrayAreaTreeFactory(final Log logger, final TextServer textServer) {
+ public FOrayAreaTreeFactory(final Log logger) {
this.logger = logger;
- this.textServer = textServer;
}
/**
* {@inheritDoc}
*/
public AreaTree makeAreaTree(final Root root) {
- final FoTree foTree = root.getFoTree();
- final AreaTree areaTree = AreaTree.makeAreaTree(root,
- foTree.getFontConsumer(), this.textServer, getLogger());
+ final AreaTree areaTree = AreaTree.makeAreaTree(root, getLogger());
return areaTree;
}
@@ -76,4 +67,14 @@
return this.logger;
}
+ /**
+ * Sets the logger to be used by AreaTree instances.
+ * If a new logger is needed for each AreaTree instance created, this method
+ * should be run before running {@link #makeAreaTree(Root)}.
+ * @param logger The new logger.
+ */
+ public void setLogger(final Log logger) {
+ this.logger = logger;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 21:48:48
|
Revision: 10075
http://svn.sourceforge.net/foray/?rev=10075&view=rev
Author: victormote
Date: 2007-07-20 14:48:48 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl change removing uneeded convenience method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-20 21:34:46 UTC (rev 10074)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-20 21:48:48 UTC (rev 10075)
@@ -737,10 +737,13 @@
* Overrides the Area method because it needs to handle faux-small-caps.
*/
public int traitFontSize() {
+ final CharacterContent generatedBy = this.traitGeneratedBy();
+ final int nominalFontSize = generatedBy.traitFontSize(this);
if (hasFauxSmallCaps) {
- return traitGeneratedBy().getFauxSmallCapFontSize(this);
+ final FontUse fontUse = getPrimaryFont();
+ return fontUse.smallCapsSize(nominalFontSize);
}
- return traitGeneratedBy().traitFontSize(this);
+ return nominalFontSize;
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 21:34:46 UTC (rev 10074)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 21:48:48 UTC (rev 10075)
@@ -3854,7 +3854,12 @@
}
/**
- * {@inheritDoc}
+ * Returns the font-size for the lowercase characters when faux small caps
+ * are used by this FO.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The size, in millipoints, of the font for lowercase faux small
+ * caps characters.
*/
public int getFauxSmallCapFontSize(final FoContext context) {
return getPrimaryFont(context).smallCapsSize(traitFontSize(context));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-23 16:11:42
|
Revision: 10087
http://svn.sourceforge.net/foray/?rev=10087&view=rev
Author: victormote
Date: 2007-07-23 09:11:40 -0700 (Mon, 23 Jul 2007)
Log Message:
-----------
Conform to axsl style changes.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-22 00:17:50 UTC (rev 10086)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-23 16:11:40 UTC (rev 10087)
@@ -126,9 +126,9 @@
import org.axsl.fo.fo.prop.AutoRestorePa;
import org.axsl.fo.fo.prop.BaselineShiftPa;
import org.axsl.fo.fo.prop.BasicLinkPa;
-import org.axsl.fo.fo.prop.BlockPa;
import org.axsl.fo.fo.prop.BlockProgressionDimensionPa;
-import org.axsl.fo.fo.prop.BreakPa;
+import org.axsl.fo.fo.prop.BreakAfterPa;
+import org.axsl.fo.fo.prop.BreakBeforePa;
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
@@ -164,6 +164,8 @@
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
import org.axsl.fo.fo.prop.GlyphOrientationPa;
+import org.axsl.fo.fo.prop.HyphenationKeepPa;
+import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.fo.fo.prop.IdPa;
import org.axsl.fo.fo.prop.IndexClassPa;
import org.axsl.fo.fo.prop.IndexKeyPa;
@@ -171,15 +173,21 @@
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.IntrusionDisplacePa;
import org.axsl.fo.fo.prop.KeepTogetherPa;
-import org.axsl.fo.fo.prop.KeepWithPa;
+import org.axsl.fo.fo.prop.KeepWithNextPa;
+import org.axsl.fo.fo.prop.KeepWithPreviousPa;
+import org.axsl.fo.fo.prop.LastLineEndIndentPa;
import org.axsl.fo.fo.prop.LeaderPa;
import org.axsl.fo.fo.prop.LineHeightPa;
+import org.axsl.fo.fo.prop.LineHeightShiftAdjustmentPa;
+import org.axsl.fo.fo.prop.LineStackingStrategyPa;
+import org.axsl.fo.fo.prop.LinefeedTreatmentPa;
import org.axsl.fo.fo.prop.ListBlockPa;
import org.axsl.fo.fo.prop.MediaUsagePa;
import org.axsl.fo.fo.prop.MergePagesAcrossIndexKeyReferencesPa;
import org.axsl.fo.fo.prop.MergeRangesAcrossIndexKeyReferencesPa;
import org.axsl.fo.fo.prop.MergeSequentialPageNumbersPa;
import org.axsl.fo.fo.prop.NumberColumnsRepeatedPa;
+import org.axsl.fo.fo.prop.OrphansPa;
import org.axsl.fo.fo.prop.OverflowPa;
import org.axsl.fo.fo.prop.PageCitationStrategyPa;
import org.axsl.fo.fo.prop.PageHeightPa;
@@ -202,15 +210,19 @@
import org.axsl.fo.fo.prop.SwitchToPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.fo.fo.prop.TablePa;
+import org.axsl.fo.fo.prop.TextAlignLastPa;
import org.axsl.fo.fo.prop.TextAlignPa;
import org.axsl.fo.fo.prop.TextAltitudePa;
import org.axsl.fo.fo.prop.TextDecorationPa;
import org.axsl.fo.fo.prop.TextDepthPa;
+import org.axsl.fo.fo.prop.TextIndentPa;
import org.axsl.fo.fo.prop.TextShadowPa;
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
import org.axsl.fo.fo.prop.VisibilityPa;
+import org.axsl.fo.fo.prop.WhiteSpaceCollapsePa;
import org.axsl.fo.fo.prop.WhiteSpaceTreatmentPa;
+import org.axsl.fo.fo.prop.WidowsPa;
import org.axsl.fo.fo.prop.WrapOptionPa;
import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.fo.fo.prop.ZIndexPa;
@@ -247,21 +259,25 @@
CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
AlignmentBaselinePa, AllowedHeightScalePa, AllowedWidthScalePa,
AutoRestorePa, BaselineShiftPa, BasicLinkPa,
- BlockPa, BlockProgressionDimensionPa, BreakPa, CaptionSidePa,
+ BlockProgressionDimensionPa, BreakAfterPa, BreakBeforePa,
+ CaptionSidePa,
CaseNamePa, CaseTitlePa, ChangeBarClassPa, ChangeBarColorPa,
ChangeBarOffsetPa,
ChangeBarPlacementPa, ChangeBarStylePa, ChangeBarWidthPa, CharacterPa,
ClearPa, ClipPa, ColorPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
- ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa, IdPa,
+ ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
+ HyphenationKeepPa, HyphenationLadderCountPa, IdPa,
IndexClassPa, IndexKeyPa, InlineProgressionDimensionPa,
- InternalDestinationPa, IntrusionDisplacePa, KeepTogetherPa, KeepWithPa,
- LeaderPa,
- LineHeightPa, ListBlockPa,
+ InternalDestinationPa, IntrusionDisplacePa, KeepTogetherPa,
+ KeepWithNextPa, KeepWithPreviousPa,
+ LastLineEndIndentPa, LeaderPa, LinefeedTreatmentPa,
+ LineHeightShiftAdjustmentPa,
+ LineHeightPa, LineStackingStrategyPa, ListBlockPa,
MediaUsagePa, MergePagesAcrossIndexKeyReferencesPa,
MergeRangesAcrossIndexKeyReferencesPa, MergeSequentialPageNumbersPa,
- NumberColumnsRepeatedPa, OverflowPa, PageCitationStrategyPa,
+ NumberColumnsRepeatedPa, OrphansPa, OverflowPa, PageCitationStrategyPa,
PageHeightPa, PageWidthPa,
PageNumberTreatmentPa, PageSequencePa,
ReferenceOrientationPa, RefIdPa, RefIndexKeyPa, RelativeAlignPa,
@@ -269,11 +285,14 @@
RetrievePositionWithinTablePa, ScalingMethodPa,
ScoreSpacesPa, SpanPa, SrcPa, StartingStatePa, SuppressAtLineBreakPa,
SwitchToPa,
- TableBorderPrecedencePa, TablePa, TextAlignPa, TextAltitudePa,
+ TableBorderPrecedencePa, TablePa, TextAlignPa, TextAlignLastPa,
+ TextAltitudePa,
TextDecorationPa,
- TextDepthPa, TextShadowPa,
+ TextDepthPa, TextIndentPa, TextShadowPa,
TreatAsWordSpacePa,
- UnicodeBidiPa, VisibilityPa, WhiteSpaceTreatmentPa, WrapOptionPa,
+ UnicodeBidiPa, VisibilityPa, WhiteSpaceCollapsePa,
+ WhiteSpaceTreatmentPa, WidowsPa,
+ WrapOptionPa,
ZIndexPa {
/** A static empty and immutable list of children, suitable for return by
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-22 00:17:50 UTC (rev 10086)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-23 16:11:40 UTC (rev 10087)
@@ -95,7 +95,7 @@
import org.axsl.fo.fo.TableRow;
import org.axsl.fo.fo.Title;
import org.axsl.fo.fo.Wrapper;
-import org.axsl.fo.fo.prop.BreakPa;
+import org.axsl.fo.fo.prop.BreakBeforePa;
import org.axsl.fo.svg.SvgElement;
import org.axsl.text.line.EagerLineBreaker;
@@ -278,10 +278,10 @@
* {@link Status#OK} if no break is required.
*/
public Status checkBreakBefore(final Fo node, final Area area) {
- if (! (node instanceof BreakPa)) {
+ if (! (node instanceof BreakBeforePa)) {
return Status.OK;
}
- final BreakPa breakableNode = (BreakPa) node;
+ final BreakBeforePa breakableNode = (BreakBeforePa) node;
if (!(area instanceof NormalFlowRefArea)) {
switch (breakableNode.traitBreakBefore(area)) {
case PAGE:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-23 19:58:53
|
Revision: 10088
http://svn.sourceforge.net/foray/?rev=10088&view=rev
Author: victormote
Date: 2007-07-23 12:58:52 -0700 (Mon, 23 Jul 2007)
Log Message:
-----------
Conform to axsl style changes.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-23 16:11:40 UTC (rev 10087)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-23 19:58:52 UTC (rev 10088)
@@ -41,7 +41,9 @@
import org.axsl.fo.fo.Leader;
import org.axsl.fo.fo.PageNumber;
import org.axsl.fo.fo.PageNumberCitation;
-import org.axsl.fo.fo.prop.LeaderPa;
+import org.axsl.fo.fo.prop.LeaderAlignmentPa;
+import org.axsl.fo.fo.prop.LeaderPatternPa;
+import org.axsl.fo.fo.prop.LeaderPatternWidthPa;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
@@ -211,7 +213,7 @@
* of zero (including the PDFRenderer) can eventually remove that special
* handling. We'll refrain from doing so until we are sure there are no
* unintended side-effects of this override logic.
- * @see LeaderPa#traitLeaderPattern
+ * @see LeaderPatternPa#traitLeaderPattern
*/
public LeaderPattern traitLeaderPattern() {
/* */
@@ -225,7 +227,7 @@
/**
* Pass-thru of the FOTree trait value.
* @return The leader pattern width, in millipoints.
- * @see LeaderPa#traitLeaderPatternWidth
+ * @see LeaderPatternWidthPa#traitLeaderPatternWidth
*/
public int traitLeaderPatternWidth() {
return traitGeneratedBy().traitLeaderPatternWidth(this);
@@ -234,7 +236,7 @@
/**
* Pass-thru of the FOTree trait value.
* @return The leader alignment.
- * @see LeaderPa#traitLeaderAlignment
+ * @see LeaderAlignmentPa#traitLeaderAlignment
*/
public LeaderAlignment traitLeaderAlignment() {
return traitGeneratedBy().traitLeaderAlignment(this);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-23 16:11:40 UTC (rev 10087)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-23 19:58:52 UTC (rev 10088)
@@ -138,7 +138,6 @@
import org.axsl.fo.fo.prop.ChangeBarPlacementPa;
import org.axsl.fo.fo.prop.ChangeBarStylePa;
import org.axsl.fo.fo.prop.ChangeBarWidthPa;
-import org.axsl.fo.fo.prop.CharacterPa;
import org.axsl.fo.fo.prop.ClearPa;
import org.axsl.fo.fo.prop.ClipPa;
import org.axsl.fo.fo.prop.ColorPa;
@@ -163,7 +162,8 @@
import org.axsl.fo.fo.prop.ExternalDestinationPa;
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
-import org.axsl.fo.fo.prop.GlyphOrientationPa;
+import org.axsl.fo.fo.prop.GlyphOrientationHorizontalPa;
+import org.axsl.fo.fo.prop.GlyphOrientationVerticalPa;
import org.axsl.fo.fo.prop.HyphenationKeepPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.fo.fo.prop.IdPa;
@@ -176,7 +176,11 @@
import org.axsl.fo.fo.prop.KeepWithNextPa;
import org.axsl.fo.fo.prop.KeepWithPreviousPa;
import org.axsl.fo.fo.prop.LastLineEndIndentPa;
-import org.axsl.fo.fo.prop.LeaderPa;
+import org.axsl.fo.fo.prop.LeaderAlignmentPa;
+import org.axsl.fo.fo.prop.LeaderLengthPa;
+import org.axsl.fo.fo.prop.LeaderPatternPa;
+import org.axsl.fo.fo.prop.LeaderPatternWidthPa;
+import org.axsl.fo.fo.prop.LetterSpacingPa;
import org.axsl.fo.fo.prop.LineHeightPa;
import org.axsl.fo.fo.prop.LineHeightShiftAdjustmentPa;
import org.axsl.fo.fo.prop.LineStackingStrategyPa;
@@ -201,6 +205,8 @@
import org.axsl.fo.fo.prop.RenderingIntentPa;
import org.axsl.fo.fo.prop.RetrieveBoundaryWithinTablePa;
import org.axsl.fo.fo.prop.RetrievePositionWithinTablePa;
+import org.axsl.fo.fo.prop.RuleStylePa;
+import org.axsl.fo.fo.prop.RuleThicknessPa;
import org.axsl.fo.fo.prop.ScalingMethodPa;
import org.axsl.fo.fo.prop.ScoreSpacesPa;
import org.axsl.fo.fo.prop.SpanPa;
@@ -223,6 +229,7 @@
import org.axsl.fo.fo.prop.WhiteSpaceCollapsePa;
import org.axsl.fo.fo.prop.WhiteSpaceTreatmentPa;
import org.axsl.fo.fo.prop.WidowsPa;
+import org.axsl.fo.fo.prop.WordSpacingPa;
import org.axsl.fo.fo.prop.WrapOptionPa;
import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.fo.fo.prop.ZIndexPa;
@@ -263,16 +270,19 @@
CaptionSidePa,
CaseNamePa, CaseTitlePa, ChangeBarClassPa, ChangeBarColorPa,
ChangeBarOffsetPa,
- ChangeBarPlacementPa, ChangeBarStylePa, ChangeBarWidthPa, CharacterPa,
+ ChangeBarPlacementPa, ChangeBarStylePa, ChangeBarWidthPa,
ClearPa, ClipPa, ColorPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
- ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
+ ExternalDestinationPa, FloatPa, FlowNamePa,
+ GlyphOrientationHorizontalPa, GlyphOrientationVerticalPa,
HyphenationKeepPa, HyphenationLadderCountPa, IdPa,
IndexClassPa, IndexKeyPa, InlineProgressionDimensionPa,
InternalDestinationPa, IntrusionDisplacePa, KeepTogetherPa,
KeepWithNextPa, KeepWithPreviousPa,
- LastLineEndIndentPa, LeaderPa, LinefeedTreatmentPa,
+ LastLineEndIndentPa, LeaderAlignmentPa, LeaderLengthPa,
+ LeaderPatternPa, LeaderPatternWidthPa, RuleStylePa, RuleThicknessPa,
+ LetterSpacingPa, LinefeedTreatmentPa,
LineHeightShiftAdjustmentPa,
LineHeightPa, LineStackingStrategyPa, ListBlockPa,
MediaUsagePa, MergePagesAcrossIndexKeyReferencesPa,
@@ -291,7 +301,7 @@
TextDepthPa, TextIndentPa, TextShadowPa,
TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WhiteSpaceCollapsePa,
- WhiteSpaceTreatmentPa, WidowsPa,
+ WhiteSpaceTreatmentPa, WidowsPa, WordSpacingPa,
WrapOptionPa,
ZIndexPa {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-24 19:24:18
|
Revision: 10095
http://svn.sourceforge.net/foray/?rev=10095&view=rev
Author: victormote
Date: 2007-07-24 12:24:19 -0700 (Tue, 24 Jul 2007)
Log Message:
-----------
Implement new checkstyle requirement for "this" references for instance variables.
Modified Paths:
--------------
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowSpanMgr.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-pretty/src/java/org/foray/pretty/FOrayPretty.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayXDiff.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/dtd/ElementStack.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInteger.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSPathLine.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSPathMove.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSStack.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingParser.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/Ascii85EncodeFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/AsciiHexDecodeFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/EexecDecodeFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/PSFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/RunLengthEncodeFilter.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoFrame.java
trunk/foray/foray-ps/src/java/org/foray/ps/java2d/demo/DemoPanel.java
trunk/foray/foray-ps/src/java/org/foray/ps/pdf/PDFSystemDict.java
trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTPrintRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/Command.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/LoadableProperties.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/MessagesDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialogAboutBox.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/SecureResourceBundle.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLStream.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/SVGUtilities.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-speech/src/java/org/foray/speech/SpeechServer4a.java
trunk/foray/foray-speech/src/java/org/foray/speech/Voice4a.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractFlowPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -68,7 +68,7 @@
* @return The layout status of this item.
*/
public Status getStatus() {
- return status;
+ return this.status;
}
/**
@@ -84,7 +84,7 @@
* @return Returns the progressSnapshot.
*/
public List<Integer> getProgressSnapshot() {
- return progressSnapshot;
+ return this.progressSnapshot;
}
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -95,8 +95,8 @@
}
if (getProgress() == FONodePL.START) {
- if (rowSpanMgr == null) {
- rowSpanMgr = new RowSpanMgr(table.getTableColumns().length,
+ if (this.rowSpanMgr == null) {
+ this.rowSpanMgr = new RowSpanMgr(table.getTableColumns().length,
this.getLayout());
}
@@ -156,7 +156,7 @@
* part of a keep set, we can take following keeps into
* account again */
if (endKeepGroup && i > getProgress()) {
- rowSpanMgr.setIgnoreKeeps(false);
+ this.rowSpanMgr.setIgnoreKeeps(false);
}
}
@@ -183,7 +183,7 @@
return status;
}
if ((keepWith.size() > 0)
- && (! rowSpanMgr.ignoreKeeps())) {
+ && (! this.rowSpanMgr.ignoreKeeps())) {
// && status.getCode() == Status.AREA_FULL_NONE
// FIXME!!! Handle rows spans!!!
removeTableRowLayout(row);
@@ -197,7 +197,7 @@
/* Fix for infinite loop bug if keeps are too big for
* page */
- rowSpanMgr.setIgnoreKeeps(true);
+ this.rowSpanMgr.setIgnoreKeeps(true);
return Status.AREA_FULL_NONE;
}
@@ -209,11 +209,11 @@
/* Fix for infinite loop bug if spanned rows are too big for
* page */
- rowSpanMgr.setIgnoreKeeps(true);
+ this.rowSpanMgr.setIgnoreKeeps(true);
return status;
} else if (status == Status.KEEP_WITH_NEXT
- || rowSpanMgr.hasUnfinishedSpans()) {
+ || this.rowSpanMgr.hasUnfinishedSpans()) {
keepWith.add(row);
endKeepGroup = false;
} else {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -58,7 +58,7 @@
/** The number of loops that will be allowed without layout progress
* before aborting layout. */
- private int infLoopThreshhold = DEFAULT_LOOPS_ALLOWED;
+ private int infLoopThreshhold = BlockPL.DEFAULT_LOOPS_ALLOWED;
/** Indicates whether we have already checked for a "break before"
* condition. */
@@ -81,7 +81,7 @@
* {@inheritDoc}
*/
public void resetProgress() {
- anythingLaidOut = false;
+ this.anythingLaidOut = false;
super.resetProgress();
}
@@ -96,12 +96,12 @@
}
final BlockContentFactory bcArea = (BlockContentFactory) areaNode;
- if (! breakStatusBeforeChecked) {
- breakStatusBeforeChecked = true;
+ if (! this.breakStatusBeforeChecked) {
+ this.breakStatusBeforeChecked = true;
// no break if first in area tree, or leading in context
// area
- final Status breakBeforeStatus = getLayout().checkBreakBefore(node,
- areaNode.nearestArea());
+ final Status breakBeforeStatus = getLayout().checkBreakBefore(
+ this.node, areaNode.nearestArea());
if (breakBeforeStatus != Status.OK) {
return breakBeforeStatus;
}
@@ -109,10 +109,10 @@
NormalBlockArea blockArea;
- if (! anythingLaidOut) {
- noLayoutCount++;
+ if (! this.anythingLaidOut) {
+ this.noLayoutCount++;
}
- if (noLayoutCount > infLoopThreshhold) {
+ if (this.noLayoutCount > this.infLoopThreshhold) {
throw new AreaTreeException(
"No meaningful layout in block after many attempts. \n"
+ "Infinite loop is assumed. Processing halted.");
@@ -124,7 +124,7 @@
if (getProgress() == FONodePL.START) {
// Reset the "loop counter".
- noLayoutCount = 0;
+ this.noLayoutCount = 0;
if (areaNode instanceof NormalBlockArea) {
getLayout().completeCurrentLineInBlock(
@@ -133,10 +133,10 @@
setProgress(0);
}
- blockArea = bcArea.makeNormalBlockArea(node, graftingPoint);
+ blockArea = bcArea.makeNormalBlockArea(this.node, graftingPoint);
- for (int i = getProgress(); i < node.getChildCount(); i++) {
- final Fo fo = node.getChildAt(i);
+ for (int i = getProgress(); i < this.node.getChildCount(); i++) {
+ final Fo fo = this.node.getChildAt(i);
final FONodePL nodePL = this.getLayoutProxy(fo);
Status status = null;
@@ -159,18 +159,18 @@
if (status == Status.AREA_FULL_NONE) {
if (i == 0) {
/* Nothing was laid out. A new page is needed. */
- anythingLaidOut = false;
+ this.anythingLaidOut = false;
return status;
}
/* A previous child has already been laid out, but there is
* no room to lay out more. A new page is needed. */
- anythingLaidOut = true;
+ this.anythingLaidOut = true;
return Status.AREA_FULL_SOME;
}
- anythingLaidOut = true;
+ this.anythingLaidOut = true;
return status;
}
- anythingLaidOut = true;
+ this.anythingLaidOut = true;
if (status.isPageBreak()) {
return status;
}
@@ -182,14 +182,14 @@
// no break if last in area tree, or trailing in context
// area
final Status breakAfterStatus = Status.checkBreakAfter(
- node.traitBreakAfter(areaNode));
+ this.node.traitBreakAfter(areaNode));
if (breakAfterStatus != Status.OK) {
setProgress(FONodePL.BREAK_AFTER);
blockArea = null;
return breakAfterStatus;
}
- if (node.traitKeepWithNextWithinColumn(areaNode) > 0
- || node.traitKeepWithNextWithinPage(areaNode) > 0) {
+ if (this.node.traitKeepWithNextWithinColumn(areaNode) > 0
+ || this.node.traitKeepWithNextWithinPage(areaNode) > 0) {
return Status.KEEP_WITH_NEXT;
}
return Status.OK;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ExternalGraphicPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -63,7 +63,7 @@
setProgress(0);
}
- final int height = realFONode.viewportBpd(areaNode);
+ final int height = this.realFONode.viewportBpd(areaNode);
if (areaNode.nearestArea().pdAvailable()
< height) {
return Status.AREA_FULL_NONE;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -63,7 +63,7 @@
* for FObjs it is the child number
* for FOText it is the character number
*/
- private int progress = START;
+ private int progress = FONodePL.START;
/** The ancestor layout controller. */
private PioneerLS layout;
@@ -82,7 +82,7 @@
* Resets the progress of the layout for the item to "START".
*/
public void resetProgress() {
- this.progress = START;
+ this.progress = FONodePL.START;
}
/**
@@ -106,7 +106,7 @@
public void rollback(final List<Integer> snapshot) {
this.progress = (snapshot.get(0)).intValue();
snapshot.remove(0);
- if (this.progress == START) {
+ if (this.progress == FONodePL.START) {
resetProgress();
return;
}
@@ -117,7 +117,7 @@
* @return Returns the progress value.
*/
public int getProgress() {
- return progress;
+ return this.progress;
}
/**
@@ -193,7 +193,7 @@
* @return The logger.
*/
public Log getLogger() {
- return layout.getLogger();
+ return this.layout.getLogger();
}
/**
@@ -218,10 +218,10 @@
foContext = new OverrideGraftingContext(lineArea,
graftingPoint);
}
- EagerLineBreaker lb = layout.getLineBreaker();
+ EagerLineBreaker lb = this.layout.getLineBreaker();
if (lb == null) {
- lb = lineArea.getTextServer().provideEagerLineBreaker(null, layout,
- lineArea.getFontConsumer());
+ lb = lineArea.getTextServer().provideEagerLineBreaker(null,
+ this.layout, lineArea.getFontConsumer());
}
int status = 0;
final FoLineText contextAware = lineText.getContextWrapper(
@@ -233,7 +233,7 @@
throw new AreaTreeException("Error in text layout:\n"
+ generatedBy.getContextMessage(), e);
}
- layout.setLineBreaker(lb);
+ this.layout.setLineBreaker(lb);
if (status >= end) {
return -1;
}
@@ -253,10 +253,10 @@
protected int addNonTextItemToLine(final LineArea lineArea,
final FoLineNonText nonText, final FoContext foContext)
throws AreaTreeException {
- EagerLineBreaker lb = layout.getLineBreaker();
+ EagerLineBreaker lb = this.layout.getLineBreaker();
if (lb == null) {
- lb = lineArea.getTextServer().provideEagerLineBreaker(null, layout,
- lineArea.getFontConsumer());
+ lb = lineArea.getTextServer().provideEagerLineBreaker(null,
+ this.layout, lineArea.getFontConsumer());
}
int status = 0;
final FoLineNonText contextAware = nonText.getContextWrapper(
@@ -268,7 +268,7 @@
throw new AreaTreeException("Error in non-text layout:\n"
+ generatedBy.getContextMessage());
}
- layout.setLineBreaker(lb);
+ this.layout.setLineBreaker(lb);
return status;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -134,7 +134,7 @@
* Each {@link FoNode} in the {@link FOTree} has a unique index, which
* indexes into this proxy map. */
private ArrayList<FONodePL> proxyMap = new ArrayList<FONodePL>(
- INITIAL_PROXY_MAP_SIZE);
+ PioneerLS.INITIAL_PROXY_MAP_SIZE);
/** The line-breaker to be used by this layout system. */
private EagerLineBreaker currentLineBreaker;
@@ -807,7 +807,7 @@
* @param fb The footnote to be added.
*/
public void addPendingFootnote(final FootnoteBody fb) {
- pendingFootnotes.add(fb);
+ this.pendingFootnotes.add(fb);
}
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowSpanMgr.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowSpanMgr.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RowSpanMgr.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -63,7 +63,7 @@
* @return True iff operating in the last row spanned.
*/
boolean isInLastRow() {
- return rowsRemaining == 1;
+ return this.rowsRemaining == 1;
}
/**
@@ -71,7 +71,7 @@
* @return True iff the row completiion is successful.
*/
boolean finishRow() {
- if (--rowsRemaining == 0) {
+ if (--this.rowsRemaining == 0) {
return true;
}
return false;
@@ -87,7 +87,7 @@
}
/** The array of span info items. */
- private SpanInfo[] spanInfo;
+ private RowSpanMgr.SpanInfo[] spanInfo;
/** Indicates whether keeps should be ignored. */
private boolean ignoreKeeps = false;
@@ -113,9 +113,10 @@
final int firstCol = cell.traitColumnNumber(null);
final int numCols = cell.traitNumberColumnsSpanned();
final int rowsSpanned = cell.traitNumberRowsSpanned();
- spanInfo[firstCol - 1] = new SpanInfo(cell, rowsSpanned);
+ this.spanInfo[firstCol - 1] = new SpanInfo(cell, rowsSpanned);
for (int i = 0; i < numCols - 1; i++) {
- spanInfo[firstCol + i] = new SpanInfo(null, rowsSpanned); // copy!
+ /* copy! */
+ this.spanInfo[firstCol + i] = new SpanInfo(null, rowsSpanned);
}
}
@@ -125,7 +126,7 @@
* @return True iff the column is spanned.
*/
public boolean isSpanned(final int colNum) {
- return spanInfo[colNum - 1] != null;
+ return this.spanInfo[colNum - 1] != null;
}
/**
@@ -134,8 +135,8 @@
* @return The spanning cell, or null if no cell spans this column.
*/
public TableCell getSpanningCell(final int colNum) {
- if (spanInfo[colNum - 1] != null) {
- return spanInfo[colNum - 1].cell;
+ if (this.spanInfo[colNum - 1] != null) {
+ return this.spanInfo[colNum - 1].cell;
}
return null;
}
@@ -145,8 +146,8 @@
* @return True iff any column has an unfinished vertical span.
*/
public boolean hasUnfinishedSpans() {
- for (int i = 0; i < spanInfo.length; i++) {
- if (spanInfo[i] != null) {
+ for (int i = 0; i < this.spanInfo.length; i++) {
+ if (this.spanInfo[i] != null) {
return true;
}
}
@@ -163,9 +164,10 @@
* spans, add the rowHeight to the spanHeight.
*/
public void finishRow() {
- for (int i = 0; i < spanInfo.length; i++) {
- if (spanInfo[i] != null && spanInfo[i].finishRow()) {
- spanInfo[i] = null;
+ for (int i = 0; i < this.spanInfo.length; i++) {
+ if (this.spanInfo[i] != null
+ && this.spanInfo[i].finishRow()) {
+ this.spanInfo[i] = null;
}
}
}
@@ -177,8 +179,8 @@
* @return True iff the column is in the last row of its vertical span.
*/
public boolean isInLastRow(final int colNum) {
- if (spanInfo[colNum - 1] != null) {
- return spanInfo[colNum - 1].isInLastRow();
+ if (this.spanInfo[colNum - 1] != null) {
+ return this.spanInfo[colNum - 1].isInLastRow();
}
return false;
}
@@ -198,7 +200,7 @@
* @return True iff keeps and spans should be ignored.
*/
public boolean ignoreKeeps() {
- return ignoreKeeps;
+ return this.ignoreKeeps;
}
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -76,9 +76,9 @@
* @return The allocation height of the cell area.
*/
public int getHeight(final FoContext context) {
- final TableArea tableArea = areaContainer.ancestorTableArea();
+ final TableArea tableArea = this.areaContainer.ancestorTableArea();
final Table table = tableArea.traitGeneratedBy();
- return areaContainer.crBpd()
+ return this.areaContainer.crBpd()
+ table.traitBorderSeparationBpd(context)
- (this.node.traitBorderBeforeWidth(context)
+ this.node.traitBorderAfterWidth(context))
@@ -96,17 +96,18 @@
if (getProgress() == FONodePL.START) {
setProgress(0);
- bDone = false;
+ this.bDone = false;
}
final TableRowContainer tableRow = (TableRowContainer) areaNode;
- final TableCellArea cellArea = tableRow.makeTableCellArea(node,
+ final TableCellArea cellArea = tableRow.makeTableCellArea(this.node,
graftingPoint);
- areaContainer = cellArea;
+ this.areaContainer = cellArea;
final int numChildren = this.node.getChildCount();
- for (int i = getProgress(); bDone == false && i < numChildren; i++) {
+ for (int i = getProgress(); this.bDone == false && i < numChildren;
+ i++) {
final Fo fo = this.node.getChildAt(i);
// Overflows may cause a row to be re-layedout,
@@ -122,7 +123,7 @@
return Status.AREA_FULL_SOME;
}
}
- bDone = true;
+ this.bDone = true;
return Status.OK;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -88,21 +88,22 @@
}
setProgress(0);
- if (table.traitBreakBefore(areaNode) == Break.PAGE) {
+ if (this.table.traitBreakBefore(areaNode) == Break.PAGE) {
return Status.FORCE_PAGE_BREAK;
}
- if (table.traitBreakBefore(areaNode) == Break.ODD_PAGE) {
+ if (this.table.traitBreakBefore(areaNode) == Break.ODD_PAGE) {
return Status.FORCE_PAGE_BREAK_ODD;
}
- if (table.traitBreakBefore(areaNode) == Break.EVEN_PAGE) {
+ if (this.table.traitBreakBefore(areaNode) == Break.EVEN_PAGE) {
return Status.FORCE_PAGE_BREAK_EVEN;
}
/* Process the marker children. */
- for (int i = getProgress(); i < table.qtyMarkerChildren(); i++) {
- final Fo fo = table.getChildAt(i);
+ for (int i = getProgress(); i < this.table.qtyMarkerChildren();
+ i++) {
+ final Fo fo = this.table.getChildAt(i);
if (fo instanceof Marker) {
final MarkerPL markerPL = (MarkerPL) getLayoutProxy(fo);
markerPL.layout(areaNode, graftingPoint);
@@ -122,7 +123,7 @@
return Status.OK;
}
- final TableArea tableArea = bcArea.makeTableArea(table,
+ final TableArea tableArea = bcArea.makeTableArea(this.table,
graftingPoint);
Status status = null;
@@ -149,8 +150,8 @@
}
/* Process the table body(s). */
- for (int i = getProgress(); i < table.getChildCount(); i++) {
- final Fo fo = table.getChildAt(i);
+ for (int i = getProgress(); i < this.table.getChildCount(); i++) {
+ final Fo fo = this.table.getChildAt(i);
if (fo instanceof TableBody) {
status = getLayoutProxy(fo).layout(tableArea,
graftingPoint);
@@ -167,9 +168,9 @@
}
}
- if (table.getTableFooter() != null
- && table.traitTableOmitFooterAtBreak(areaNode)) {
- final TableFooter tf = table.getTableFooter();
+ if (this.table.getTableFooter() != null
+ && this.table.traitTableOmitFooterAtBreak(areaNode)) {
+ final TableFooter tf = this.table.getTableFooter();
final TableFooterPL tfPL = (TableFooterPL) getLayoutProxy(tf);
status = tfPL.layout(tableArea, graftingPoint);
if (status.isIncomplete()) {
@@ -189,17 +190,17 @@
}
}
- if (table.traitBreakAfter(areaNode) == Break.PAGE) {
+ if (this.table.traitBreakAfter(areaNode) == Break.PAGE) {
setProgress(FONodePL.BREAK_AFTER);
return Status.FORCE_PAGE_BREAK;
}
- if (table.traitBreakAfter(areaNode) == Break.ODD_PAGE) {
+ if (this.table.traitBreakAfter(areaNode) == Break.ODD_PAGE) {
setProgress(FONodePL.BREAK_AFTER);
return Status.FORCE_PAGE_BREAK_ODD;
}
- if (table.traitBreakAfter(areaNode) == Break.EVEN_PAGE) {
+ if (this.table.traitBreakAfter(areaNode) == Break.EVEN_PAGE) {
setProgress(FONodePL.BREAK_AFTER);
return Status.FORCE_PAGE_BREAK_EVEN;
}
@@ -217,7 +218,7 @@
*/
private Status layoutTableHeader(final TableArea tableArea,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final TableHeader th = table.getTableHeader();
+ final TableHeader th = this.table.getTableHeader();
if (th == null) {
return Status.OK;
}
@@ -242,7 +243,7 @@
*/
private Status layoutTableFooter(final TableArea tableArea,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final TableFooter tf = table.getTableFooter();
+ final TableFooter tf = this.table.getTableFooter();
if (tf == null) {
return Status.OK;
}
@@ -265,7 +266,7 @@
* @param tableArea The table area which should be wiped clean.
*/
private void resetAll(final TableArea tableArea) {
- final TableHeader header = table.getTableHeader();
+ final TableHeader header = this.table.getTableHeader();
if (header != null) {
final TableHeaderPL tableHeaderPL = (TableHeaderPL)
this.getLayoutProxy(header);
@@ -274,7 +275,7 @@
tableArea.removeChild(headerContainer);
tableHeaderPL.resetProgress();
}
- final TableFooter footer = table.getTableFooter();
+ final TableFooter footer = this.table.getTableFooter();
if (footer != null) {
final TableFooterPL tableFooterPL = (TableFooterPL)
this.getLayoutProxy(footer);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableRowPL.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -103,9 +103,9 @@
if (status.isIncomplete()) {
if ((this.node.traitKeepTogetherWithinColumn(areaNode)
== Integer.MAX_VALUE
- && ignoreKeepTogether == false)
- || (status == Status.AREA_FULL_NONE)
- || rowSpan > 1) {
+ && this.ignoreKeepTogether == false)
+ || (status == Status.AREA_FULL_NONE)
+ || rowSpan > 1) {
/* This entire row needs to be pushed to the next
* column/page unless it is at the top of the column
* area. */
Modified: trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java
===================================================================
--- trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java 2007-07-24 16:50:42 UTC (rev 10094)
+++ trunk/foray/foray-pretty/src/java/org/foray/pretty/FOrayPretty.java 2007-07-24 19:24:19 UTC (rev 10095)
@@ -151,7 +151,7 @@
/** The XML declaration string. */
private String xmlDeclaration = "<?xml version=\"1.0\" "
- + "encoding=\"" + outputEncoding + "\"?>";
+ + "encoding=\"" + this.outputEncoding + "\"?>";
/** The line terminator that should be used in the output. */
private String lineTerminator = "\n";
@@ -170,7 +170,7 @@
private int indent = 2;
/** The maximum number of characters desired on each line. */
- private int desiredLineLength = DEFAULT_LINE_LENGTH;
+ private int desiredLineLength = FOrayPretty.DEFAULT_LINE_LENGTH;
/**
* Block elements are started on a new line. However, if they are inside
@@ -309,7 +309,7 @@
*/
private void cleanup() {
try {
- output.close();
+ thi...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-24 20:21:39
|
Revision: 10096
http://svn.sourceforge.net/foray/?rev=10096&view=rev
Author: victormote
Date: 2007-07-24 13:20:49 -0700 (Tue, 24 Jul 2007)
Log Message:
-----------
Implement new checkstyle requirement for "this" references for instance variables.
Modified Paths:
--------------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/ByteVector.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/CharVector.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenBreak.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenation.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/MorphHyphenation.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternParser.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/SerializeHyphPattern.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/NatLangParser.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/NaturalLanguage.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/ValidateChars.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/WordList.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifBook.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifBookComponent.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifDocument.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifFrame.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifPage.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifPgf.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifPgfLine.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifRuling.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifRulingCatalog.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifTbl.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifTextFlow.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifTextRect.java
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/PDFGraphicsState.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFAnnotList.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFArray.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFBorderStyle.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFont.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDFontDescriptor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCIDSystemInfo.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCMap.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCharProcs.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFColor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDate.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDestination.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontDescriptor.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFontFileStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFunction.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFGoTo.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFGoToRemote.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFICCStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFObject.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFOutlineItem.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFOutlineParent.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPage.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPages.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPattern.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFRectangle.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFResources.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFRoot.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFShading.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFString.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFTextString.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFUri.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXImage.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/ByteVector.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/ByteVector.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/ByteVector.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -47,7 +47,7 @@
private static final int DEFAULT_BLOCK_SIZE = 2048;
/** Capacity increment size. */
- private int blockSize = DEFAULT_BLOCK_SIZE;
+ private int blockSize = ByteVector.DEFAULT_BLOCK_SIZE;
/** The encapsulated array. */
private byte[] backingArray;
@@ -59,7 +59,7 @@
* No-argument constructor.
*/
public ByteVector() {
- this(DEFAULT_BLOCK_SIZE);
+ this(ByteVector.DEFAULT_BLOCK_SIZE);
}
/**
@@ -68,12 +68,12 @@
*/
public ByteVector(final int capacity) {
if (capacity > 0) {
- blockSize = capacity;
+ this.blockSize = capacity;
} else {
- blockSize = DEFAULT_BLOCK_SIZE;
+ this.blockSize = ByteVector.DEFAULT_BLOCK_SIZE;
}
- backingArray = new byte[blockSize];
- nextIndex = 0;
+ this.backingArray = new byte[this.blockSize];
+ this.nextIndex = 0;
}
/**
@@ -81,7 +81,7 @@
* @return The number of items in the vector.
*/
public int length() {
- return nextIndex;
+ return this.nextIndex;
}
/**
@@ -89,7 +89,7 @@
* @return The currect capacity of the vector.
*/
public int capacity() {
- return backingArray.length;
+ return this.backingArray.length;
}
/**
@@ -98,7 +98,7 @@
* @param val The byte value to be placed in the vector.
*/
public void put(final int index, final byte val) {
- backingArray[index] = val;
+ this.backingArray[index] = val;
}
/**
@@ -107,7 +107,7 @@
* @return The value at <code>index</code>.
*/
public byte get(final int index) {
- return backingArray[index];
+ return this.backingArray[index];
}
/**
@@ -117,13 +117,15 @@
* @return The index to the beginning of the allocated elements (bytes).
*/
public int alloc(final int size) {
- final int index = nextIndex;
- if (nextIndex + size >= backingArray.length) {
- final byte[] newArray = new byte[backingArray.length + blockSize];
- System.arraycopy(backingArray, 0, newArray, 0, backingArray.length);
- backingArray = newArray;
+ final int index = this.nextIndex;
+ if (this.nextIndex + size >= this.backingArray.length) {
+ final byte[] newArray = new byte[this.backingArray.length
+ + this.blockSize];
+ System.arraycopy(this.backingArray, 0, newArray, 0,
+ this.backingArray.length);
+ this.backingArray = newArray;
}
- nextIndex += size;
+ this.nextIndex += size;
return index;
}
@@ -132,10 +134,10 @@
* unused capacity.
*/
public void trimToSize() {
- if (nextIndex < backingArray.length) {
- final byte[] aux = new byte[nextIndex];
- System.arraycopy(backingArray, 0, aux, 0, nextIndex);
- backingArray = aux;
+ if (this.nextIndex < this.backingArray.length) {
+ final byte[] aux = new byte[this.nextIndex];
+ System.arraycopy(this.backingArray, 0, aux, 0, this.nextIndex);
+ this.backingArray = aux;
}
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/CharVector.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/CharVector.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/CharVector.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -58,7 +58,7 @@
* No-argument constructor.
*/
public CharVector() {
- this(DEFAULT_BLOCK_SIZE);
+ this(CharVector.DEFAULT_BLOCK_SIZE);
}
/**
@@ -67,12 +67,12 @@
*/
public CharVector(final int capacity) {
if (capacity > 0) {
- blockSize = capacity;
+ this.blockSize = capacity;
} else {
- blockSize = DEFAULT_BLOCK_SIZE;
+ this.blockSize = CharVector.DEFAULT_BLOCK_SIZE;
}
- backingArray = new char[blockSize];
- nextIndex = 0;
+ this.backingArray = new char[this.blockSize];
+ this.nextIndex = 0;
}
/**
@@ -92,7 +92,7 @@
* @return the array backing this vector.
*/
public char[] getArray() {
- return backingArray;
+ return this.backingArray;
}
/**
@@ -100,7 +100,7 @@
* @return The number of items in the vector.
*/
public int length() {
- return nextIndex;
+ return this.nextIndex;
}
/**
@@ -108,7 +108,7 @@
* @return The currect capacity of the vector.
*/
public int capacity() {
- return backingArray.length;
+ return this.backingArray.length;
}
/**
@@ -117,7 +117,7 @@
* @param val The char value to be placed in the vector.
*/
public void put(final int index, final char val) {
- backingArray[index] = val;
+ this.backingArray[index] = val;
}
/**
@@ -126,7 +126,7 @@
* @return The value at <code>index</code>.
*/
public char get(final int index) {
- return backingArray[index];
+ return this.backingArray[index];
}
/**
@@ -136,13 +136,15 @@
* @return The index to the beginning of the allocated elements (chars).
*/
public int alloc(final int size) {
- final int index = nextIndex;
- if (nextIndex + size >= backingArray.length) {
- final char[] newArray = new char[backingArray.length + blockSize];
- System.arraycopy(backingArray, 0, newArray, 0, backingArray.length);
- backingArray = newArray;
+ final int index = this.nextIndex;
+ if (this.nextIndex + size >= this.backingArray.length) {
+ final char[] newArray = new char[this.backingArray.length
+ + this.blockSize];
+ System.arraycopy(this.backingArray, 0, newArray, 0,
+ this.backingArray.length);
+ this.backingArray = newArray;
}
- nextIndex += size;
+ this.nextIndex += size;
return index;
}
@@ -151,10 +153,10 @@
* unused capacity.
*/
public void trimToSize() {
- if (nextIndex < backingArray.length) {
- final char[] aux = new char[nextIndex];
- System.arraycopy(backingArray, 0, aux, 0, nextIndex);
- backingArray = aux;
+ if (this.nextIndex < this.backingArray.length) {
+ final char[] aux = new char[this.nextIndex];
+ System.arraycopy(this.backingArray, 0, aux, 0, this.nextIndex);
+ this.backingArray = aux;
}
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenBreak.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenBreak.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenBreak.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -75,27 +75,27 @@
* @param post The post-break text (can be null).
*/
FOrayHyphenBreak(final String pre, final String no, final String post) {
- preBreak = pre;
- noBreak = no;
- postBreak = post;
+ this.preBreak = pre;
+ this.noBreak = no;
+ this.postBreak = post;
}
/**
* {@inheritDoc}
*/
public String toString() {
- if (noBreak == null
- && postBreak == null
- && preBreak != null
- && preBreak.equals("-")) {
+ if (this.noBreak == null
+ && this.postBreak == null
+ && this.preBreak != null
+ && this.preBreak.equals("-")) {
return "-";
}
final StringBuilder res = new StringBuilder("{");
- res.append(preBreak);
+ res.append(this.preBreak);
res.append("}{");
- res.append(postBreak);
+ res.append(this.postBreak);
res.append("}{");
- res.append(noBreak);
+ res.append(this.noBreak);
res.append('}');
return res.toString();
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenation.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenation.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenation.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -135,11 +135,11 @@
public String toString() {
final StringBuilder str = new StringBuilder();
int start = 0;
- for (int i = 0; i < hyphenPoints.length; i++) {
- str.append(word.substring(start, hyphenPoints[i]) + "-");
- start = hyphenPoints[i];
+ for (int i = 0; i < this.hyphenPoints.length; i++) {
+ str.append(this.word.substring(start, this.hyphenPoints[i]) + "-");
+ start = this.hyphenPoints[i];
}
- str.append(word.substring(start));
+ str.append(this.word.substring(start));
return str.toString();
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/FOrayHyphenationServer.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -163,8 +163,8 @@
}
/* Look in the cache first. */
- if (hyphenTrees.containsKey(key)) {
- return hyphenTrees.get(key);
+ if (this.hyphenTrees.containsKey(key)) {
+ return this.hyphenTrees.get(key);
}
/* If we have already tried and failed, no need to check again. */
@@ -179,7 +179,7 @@
* it. */
HyphenationTree hyphenationTree = getHyphenationTree(key);
if (hyphenationTree != null) {
- hyphenTrees.put(key, hyphenationTree);
+ this.hyphenTrees.put(key, hyphenationTree);
return hyphenationTree;
}
@@ -187,12 +187,13 @@
* use it. */
hyphenationTree = loadHyphenationTree(key);
if (hyphenationTree != null) {
- hyphenTrees.put(key, hyphenationTree);
+ this.hyphenTrees.put(key, hyphenationTree);
return hyphenationTree;
}
final StringBuilder warningMessage = new StringBuilder(
- PATTERN_MISSING_TEXT + key + " (" + language.getEnglishName());
+ FOrayHyphenationServer.PATTERN_MISSING_TEXT
+ + key + " (" + language.getEnglishName());
if (country != null
&& country != Iso3166.NULL) {
warningMessage.append(", " + country.getEnglishName());
@@ -200,7 +201,7 @@
warningMessage.append(")");
/* Log a warning and add it to the list of not found keys. */
getLogger().warn(warningMessage);
- hyphenTreesNotFound.add(key);
+ this.hyphenTreesNotFound.add(key);
return null;
}
@@ -223,14 +224,16 @@
(ClassLoader) getCCL.invoke(Thread.currentThread(),
new Object[0]);
is = contextClassLoader.getResourceAsStream(
- PATTERN_RESOURCE_PATH + "/" + key
+ FOrayHyphenationServer.PATTERN_RESOURCE_PATH
+ + "/" + key
+ "." + FOrayConstants.BINARY_SERIALIZATION_EXTENSION);
}
} catch (final Exception e) { }
if (is == null) {
is = FOrayHyphenationServer.class.getResourceAsStream(
- "/" + PATTERN_RESOURCE_PATH + "/" + key
+ "/" + FOrayHyphenationServer.PATTERN_RESOURCE_PATH
+ + "/" + key
+ "." + FOrayConstants.BINARY_SERIALIZATION_EXTENSION);
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -122,7 +122,7 @@
*/
public HyphenationTree() {
/* This reserves index 0, which we don't use. */
- patternValues.alloc(1);
+ this.patternValues.alloc(1);
}
/**
@@ -146,25 +146,25 @@
* up. */
bytesNeeded ++;
}
- final int offset = patternValues.alloc(bytesNeeded);
+ final int offset = this.patternValues.alloc(bytesNeeded);
for (int stringIndex = 0; stringIndex < stringLength; stringIndex++) {
final byte packedValue = (byte) ((values.charAt(stringIndex)
- '0' + 1) & WKConstants.MAX_4_BIT_UNSIGNED_BYTE);
final int packedIndex = (stringIndex >> 1) + offset;
if ((stringIndex & 1) == 1) {
/* If the index is odd, place in the low-order bits. */
- final byte currentValue = patternValues.get(packedIndex);
+ final byte currentValue = this.patternValues.get(packedIndex);
final byte newValue = (byte) (currentValue | packedValue);
- patternValues.put(packedIndex, newValue);
+ this.patternValues.put(packedIndex, newValue);
} else {
/* If the index is even, place in the high-order bits. */
final byte newValue = (byte) (packedValue
<< WKConstants.BITS_PER_NIBBLE);
- patternValues.put(packedIndex, newValue);
+ this.patternValues.put(packedIndex, newValue);
}
}
/* Add the null terminator. */
- patternValues.put(bytesNeeded - 1 + offset, (byte) 0);
+ this.patternValues.put(bytesNeeded - 1 + offset, (byte) 0);
return offset;
}
@@ -179,18 +179,18 @@
void loadPatterns(final URL url, final Log logger)
throws HyphenationException {
final PatternParser pp = new PatternParser(this, logger);
- tempInterletterValues = new TernaryTree();
+ this.tempInterletterValues = new TernaryTree();
pp.parse(url);
// patterns/values should be now in the tree
// let's optimize a bit
- patternKeys.trimToSize();
- patternValues.trimToSize();
- classes.trimToSize();
+ this.patternKeys.trimToSize();
+ this.patternValues.trimToSize();
+ this.classes.trimToSize();
// get rid of the auxiliary map
- tempInterletterValues = null;
+ this.tempInterletterValues = null;
}
/**
@@ -233,7 +233,7 @@
* that. */
final StringBuilder buf = new StringBuilder();
int packedIndex = start;
- byte packedValue = patternValues.get(packedIndex++);
+ byte packedValue = this.patternValues.get(packedIndex++);
while (packedValue != 0) {
/* Unpack the high-order nibble. */
char c = (char) ((packedValue >>> WKConstants.BITS_PER_NIBBLE) - 1);
@@ -248,7 +248,7 @@
buf.append(c);
/* Load the next byte. */
- packedValue = patternValues.get(packedIndex++);
+ packedValue = this.patternValues.get(packedIndex++);
}
/* Convert the StringBuffer to the return byte[]. */
@@ -383,7 +383,7 @@
}
/* Check the exceptions first. */
- FOrayHyphenation hyphenation = exceptions.get(normalizedWord);
+ FOrayHyphenation hyphenation = this.exceptions.get(normalizedWord);
if (hyphenation != null) {
return hyphenation;
}
@@ -438,7 +438,7 @@
final char[] c = new char[2];
for (int i = 0; i < length; i++) {
c[0] = inputArray[offset + i];
- final int nc = classes.find(c, 0);
+ final int nc = this.classes.find(c, 0);
if (nc < 0) {
/* Found a non-letter character. Abort. */
return null;
@@ -465,7 +465,7 @@
/* Create the array of test characters to be used in the pattern
* searches. */
final char[] testChars = new char[normalizedWord.length()
- + QTY_MARKER_CHARS];
+ + HyphenationTree.QTY_MARKER_CHARS];
/* Copy the String contents to the new array, but skip the first
* element. */
normalizedWord.getChars(0, normalizedWord.length(), testChars, 1);
@@ -553,7 +553,7 @@
key[1] = 0;
for (int i = 0; i < chargroup.length(); i++) {
key[0] = chargroup.charAt(i);
- classes.insert(key, 0, equivChar);
+ this.classes.insert(key, 0, equivChar);
}
}
}
@@ -613,7 +613,7 @@
} else {
exception = new FOrayHyphenation(unhyphenatedWord, points, values);
}
- exceptions.put(unhyphenatedWord, exception);
+ this.exceptions.put(unhyphenatedWord, exception);
}
/**
@@ -633,10 +633,10 @@
final String pattern = getPatternChars(rawPattern);
final String ivalue = getInterletterValues(rawPattern);
- int k = tempInterletterValues.find(ivalue);
+ int k = this.tempInterletterValues.find(ivalue);
if (k <= 0) {
k = packValues(ivalue);
- tempInterletterValues.insert(ivalue, (char) k);
+ this.tempInterletterValues.insert(ivalue, (char) k);
}
this.patternKeys.insert(pattern, (char) k);
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/MorphHyphenation.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/MorphHyphenation.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/MorphHyphenation.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -83,9 +83,9 @@
/* Not too worried about efficiency here. It is unlikely there will
* ever be more than one in the same word. */
for (int i = 0; i < this.breaks.length; i++) {
- if (breaks[i] == null) {
- indexes[i] = index;
- breaks[i] = specialBreak;
+ if (this.breaks[i] == null) {
+ this.indexes[i] = index;
+ this.breaks[i] = specialBreak;
return;
}
}
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternParser.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternParser.java 2007-07-24 19:24:19 UTC (rev 10095)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternParser.java 2007-07-24 20:20:49 UTC (rev 10096)
@@ -105,10 +105,10 @@
+ " requires a PatternConsumer instance at construction.");
}
this.logger = logger;
- token = new StringBuilder();
- parser = createParser();
- parser.setContentHandler(this);
- parser.setErrorHandler(this);
+ this.token = new StringBuilder();
+ this.parser = createParser();
+ this.parser.setContentHandler(this);
+ this.parser.setErrorHandler(this);
this.consumer = consumer;
}
@@ -134,9 +134,9 @@
final InputSource uri = new InputSource(inputStream);
try {
- parser.parse(uri);
+ this.parser.parse(uri);
} catch (final SAXException e) {
- throw new HyphenationException(errMsg);
+ throw new HyphenationException(this.errMsg);
} catch (final IOException e) {
throw new HyphenationException(e.getMessage());
} catch (final NullPointerException e) {
@@ -194,9 +194,9 @@
chars.setCharAt(countr - i, chars.charAt(countr));
}
chars.setLength(chars.length() - i);
- if (token.length() > 0) {
- word = token.toString();
- token.setLength(0);
+ if (this.token.length() > 0) {
+ word = this.token.toString();
+ this.token.setLength(0);
return word;
}
}
@@ -207,17 +207,17 @@
break;
}
}
- token.append(chars.toString().substring(0, i));
+ this.token.append(chars.toString().substring(0, i));
for (int countr = i; countr < chars.length(); countr++) {
chars.setCharAt(countr - i, chars.charAt(countr));
}
chars.setLength(chars.length() - i);
if (space) {
- word = token.toString();
- token.setLength(0);
+ word = this.token.toString();
+ this.token.setLength(0);
return word;
}
- token.append(chars);
+ this.token.append(chars);
return null;
}
@@ -229,17 +229,17 @@
if (local.equals("hyphen-char")) {
final String h = attrs.getValue("value");
if (h != null && h.length() == 1) {
- consumer.setHyphenChar(h.charAt(0));
+ this.consumer.setHyphenChar(h.charAt(0));
}
} else if (local.equals("classes")) {
- currElement = ELEM_CLASSES;
+ this.currElement = PatternParser.ELEM_CLASSES;
} else if (local.equals("patterns")) {
- currElement = ELEM_PATTERNS;
+ this.currElement = PatternParser.ELEM_PATTERNS;
} else if (local.equals("exceptions")) {
- currElement = ELEM_EXCEPTIONS;
+ this.currElement = PatternParser.ELEM_EXCEPTIONS;
} else if (local.equals("hyphen")) {
- if (token.length() > 0) {
- this.consumer.addException(token.toString(), 0);
+ if (this.token.length() > 0) {
+ this.consumer.addException(this.token.toString(), 0);
}
try {
this.consumer.addMorphException(attrs.getValue("no"),
@@ -248,9 +248,9 @@
} catch (final HyphenationException e) {
this.error(new SAXParseException("", null, e));
}
- currElement = ELEM_HYPHEN;
+ this.currElement = PatternParser.ELEM_HYPHEN;
}
- token.setLength(0);
+ this.token.setLength(0);
}
/**
@@ -258,29 +258,29 @@
*/
public void endElement(final String uri, final String local,
final String raw) {
- if (token.length() > 0) {
- final String word = token.toString();
- switch (currElement) {
- case ELEM_CLASSES:
- consumer.addClass(word);
+ if (this.token.length() > 0) {
+ final String word = this.token.toString();
+ switch (this.currElement) {
+ case PatternParser.ELEM_CLASSES:
+ this.consumer.addClass(word);
break;
- case ELEM_EXCEPTIONS:
+ case PatternParser.ELEM_EXCEPTIONS:
this.consumer.addException(word, 0);
break;
- case ELEM_PATTERNS:
- consumer.addPattern(word);
+ case PatternParser.ELEM_PATTERNS:
+ this.consumer.addPattern(word);
break;
- case ELEM_HYPHEN:
+ case PatternParser.ELEM_HYPHEN:
break;
}
- if (currElement != ELEM_HYPHEN) {
- token.setLength(0);
+ if (this.currElement != PatternParser.ELEM_HYPHEN) {
+ this.token.setLength(0);
}
}
- if (currElement == ELEM_HYPHEN) {
- currElement = ELEM_EXCEPTIONS;
+ if (this.currElement == PatternParser.ELEM_HYPHEN) {
+ this.currElement = PatternParser.ELEM_EXCEPTIONS;
} else {
- currElement = 0;
+ this.currElement = 0;
}
}
@@ -293,15 +293,15 @@
chars.append(ch, start, length);
String word = readToken(chars);
while (word != null) {
- switch (currElement) {
- case ELEM_CLASSES:
- consumer.addClass(word);
+ ...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-24 21:05:14
|
Revision: 10097
http://svn.sourceforge.net/foray/?rev=10097&view=rev
Author: victormote
Date: 2007-07-24 14:05:09 -0700 (Tue, 24 Jul 2007)
Log Message:
-----------
Implement new checkstyle requirement for "this" references for instance variables.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
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/SerializeStandardFonts.java
trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFilePFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileReader.java
trunk/foray/foray-font/src/java/org/foray/font/format/Panose.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableCMAP.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableGLYF.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableHEAD.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableKERN.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableOS2.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTablePCLT.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTablePOST.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphicServer.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GIFGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicLink4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/JPEGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PDFGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TIFFGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/BatikUaDocument.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFAElementBridge.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFANode.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsConfiguration.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsDevice.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFTextPainter.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PSGraphics2D.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/BMPFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/EPSFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/GIFFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/GraphicFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/JPEGFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/PDFFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/PNGFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/SVGFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/factory/TIFFFactory.java
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -66,7 +66,7 @@
/** The current status of the parser, one of {@link #OUT}, {@link #IN_KEY},
* or {@link #IN_VALUE}. */
- private int status = OUT;
+ private int status = ConfigurationParser.OUT;
/** The session configuration into which the configuration file is being
* parsed. */
@@ -128,7 +128,7 @@
final XMLReader parser = createParser();
parser.setContentHandler(this);
try {
- parser.parse(filename);
+ parser.parse(this.filename);
} catch (final SAXException e) {
if (e.getException() instanceof FOrayException) {
throw (FOrayException) e.getException();
@@ -156,7 +156,7 @@
final EntityResolver entityResolver = makeEntityResolver(
this.sessionConfig);
xmlReader.setEntityResolver(entityResolver);
- logger.debug("Config: Using "
+ this.logger.debug("Config: Using "
+ xmlReader.getClass().getName() + " as SAX2 Parser.");
return xmlReader;
} catch (final javax.xml.parsers.ParserConfigurationException e) {
@@ -205,11 +205,11 @@
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes) {
if (localName.equals("key")) {
- status += IN_KEY;
+ this.status += ConfigurationParser.IN_KEY;
return;
}
if (localName.equals("value")) {
- status += IN_VALUE;
+ this.status += ConfigurationParser.IN_VALUE;
return;
}
if (localName.equals("entry")) {
@@ -219,7 +219,7 @@
return;
}
// to make sure that user knows about false tag
- logger.error(getFormattedLocation() + "\nUnknown tag in "
+ this.logger.error(getFormattedLocation() + "\nUnknown tag in "
+ "configuration file: " + localName);
}
@@ -229,14 +229,14 @@
public void endElement(final String uri, final String localName,
final String qName) {
if (localName.equals("entry")) {
- this.store(key, value);
- status = OUT;
- key = "";
- value = "";
+ this.store(this.key, this.value);
+ this.status = ConfigurationParser.OUT;
+ this.key = "";
+ this.value = "";
} else if (localName.equals("key")) {
- status -= IN_KEY;
+ this.status -= ConfigurationParser.IN_KEY;
} else if (localName.equals("value")) {
- status -= IN_VALUE;
+ this.status -= ConfigurationParser.IN_VALUE;
}
}
@@ -247,12 +247,12 @@
final char characters[] = new char[length];
System.arraycopy(ch, start, characters, 0, length);
final String text = new String(characters);
- switch (status) {
- case IN_KEY:
- key = text;
+ switch (this.status) {
+ case ConfigurationParser.IN_KEY:
+ this.key = text;
break;
- case IN_VALUE:
- value = text;
+ case ConfigurationParser.IN_VALUE:
+ this.value = text;
break;
}
}
@@ -279,11 +279,12 @@
* @return The location information, formatted.
*/
private String getFormattedLocation() {
- if (locator == null) {
+ if (this.locator == null) {
return "";
}
- return locator.getSystemId() + ":" + locator.getLineNumber() + ":"
- + locator.getColumnNumber();
+ return this.locator.getSystemId() + ":"
+ + this.locator.getLineNumber() + ":"
+ + this.locator.getColumnNumber();
}
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -116,7 +116,7 @@
private FOrayDocument(final FOraySession session) {
this.session = session;
session.registerDocument(this);
- treeBuilder = this.session.getFOTreeFactory().makeFoTree();
+ this.treeBuilder = this.session.getFOTreeFactory().makeFoTree();
}
/**
@@ -140,7 +140,7 @@
if (parser == null) {
this.parser = this.createParser();
}
- this.parser.setContentHandler(treeBuilder);
+ this.parser.setContentHandler(this.treeBuilder);
}
/**
@@ -156,7 +156,7 @@
this(session);
this.inputSource = new DocumentInputSource(domDocument);
this.parser = new DocumentReader();
- this.parser.setContentHandler(treeBuilder);
+ this.parser.setContentHandler(this.treeBuilder);
}
/**
@@ -264,7 +264,7 @@
*/
public synchronized void process() throws FOrayException {
// Get the FOrayTarget to process.
- final FOrayTarget target = targetList.get(0);
+ final FOrayTarget target = this.targetList.get(0);
processTarget(target);
}
@@ -282,10 +282,11 @@
try {
if (this.jaxpTransformer == null) {
// Regular SAX Input
- parser.parse(this.inputSource);
+ this.parser.parse(this.inputSource);
} else {
// SAX Events generated by a JAXP Transformer
- jaxpTransformer.transform(this.jaxpSource, jaxpResult);
+ this.jaxpTransformer.transform(this.jaxpSource,
+ this.jaxpResult);
}
} catch (final SAXException e) {
if (e.getException() instanceof FOrayException) {
@@ -300,7 +301,7 @@
} catch (final IOException e) {
throw new FOrayException(e);
} finally {
- cleanup(currentTarget);
+ cleanup(this.currentTarget);
}
}
@@ -402,7 +403,7 @@
* @return The SpeechServer for this document.
*/
public SpeechServer getSpeechServer() {
- return session.getSpeechServer();
+ return this.session.getSpeechServer();
}
/**
@@ -410,7 +411,7 @@
* @return The TextServer for this document.
*/
public TextServer getTextServer() {
- return session.getTextServer();
+ return this.session.getTextServer();
}
/**
@@ -418,7 +419,7 @@
* @return The GraphicServer for this document.
*/
public GraphicServer getGraphicServer() {
- return session.getGraphicServer();
+ return this.session.getGraphicServer();
}
/**
@@ -426,7 +427,7 @@
* @return The SessionConfig for this document.
*/
public SessionConfig getSessionConfig() {
- return session.getSessionConfig();
+ return this.session.getSessionConfig();
}
/**
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -127,7 +127,7 @@
* @param thrown The thrown item to be wrapped inside the exception.
*/
protected void setException(final Throwable thrown) {
- exception = thrown;
+ this.exception = thrown;
}
/**
@@ -135,7 +135,7 @@
* @return The thrown item, if any, wrapped inside this exception.
*/
public Throwable getException() {
- return exception;
+ return this.exception;
}
/**
@@ -159,7 +159,7 @@
* @return The original exception thrown.
*/
protected Throwable getRootException() {
- Throwable result = exception;
+ Throwable result = this.exception;
if (result instanceof SAXException) {
result = ((SAXException) result).getException();
@@ -169,7 +169,7 @@
((InvocationTargetException) result)
.getTargetException();
}
- if (result != exception) {
+ if (result != this.exception) {
return result;
}
return null;
@@ -192,12 +192,12 @@
public void printStackTrace() {
synchronized (System.err) {
super.printStackTrace();
- if (exception != null) {
- System.err.println(EXCEPTION_SEPARATOR);
- exception.printStackTrace();
+ if (this.exception != null) {
+ System.err.println(FOrayException.EXCEPTION_SEPARATOR);
+ this.exception.printStackTrace();
}
if (getRootException() != null) {
- System.err.println(EXCEPTION_SEPARATOR);
+ System.err.println(FOrayException.EXCEPTION_SEPARATOR);
getRootException().printStackTrace();
}
}
@@ -209,12 +209,12 @@
public void printStackTrace(final PrintStream stream) {
synchronized (stream) {
super.printStackTrace(stream);
- if (exception != null) {
- stream.println(EXCEPTION_SEPARATOR);
- exception.printStackTrace(stream);
+ if (this.exception != null) {
+ stream.println(FOrayException.EXCEPTION_SEPARATOR);
+ this.exception.printStackTrace(stream);
}
if (getRootException() != null) {
- stream.println(EXCEPTION_SEPARATOR);
+ stream.println(FOrayException.EXCEPTION_SEPARATOR);
getRootException().printStackTrace(stream);
}
}
@@ -226,12 +226,12 @@
public void printStackTrace(final PrintWriter writer) {
synchronized (writer) {
super.printStackTrace(writer);
- if (exception != null) {
- writer.println(EXCEPTION_SEPARATOR);
- exception.printStackTrace(writer);
+ if (this.exception != null) {
+ writer.println(FOrayException.EXCEPTION_SEPARATOR);
+ this.exception.printStackTrace(writer);
}
if (getRootException() != null) {
- writer.println(EXCEPTION_SEPARATOR);
+ writer.println(FOrayException.EXCEPTION_SEPARATOR);
getRootException().printStackTrace(writer);
}
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -144,7 +144,7 @@
throw new FOrayException("Logger required for FOraySession.");
}
this.log = logger;
- log.info(Application.getApplicationNameShort() + " "
+ this.log.info(Application.getApplicationNameShort() + " "
+ Application.getVersion());
/* Validate Configuration. */
@@ -214,7 +214,7 @@
* @return The logger.
*/
public Log getLogger() {
- return log;
+ return this.log;
}
/**
@@ -232,20 +232,21 @@
* Sets up a FontServer instance if there is not one already.
*/
private void setupFontServer() {
- if (log.isDebugEnabled()) {
+ if (this.log.isDebugEnabled()) {
final String[] systemFontFamilies =
- fontServer.getSystemFontFamilyList();
+ this.fontServer.getSystemFontFamilyList();
if (systemFontFamilies != null) {
- log.debug("Java font family names:");
+ this.log.debug("Java font family names:");
for (int i = 0; i < systemFontFamilies.length; i++) {
- log.debug(" " + systemFontFamilies[i]);
+ this.log.debug(" " + systemFontFamilies[i]);
}
}
- final java.awt.Font[] systemFonts = fontServer.getSystemFontList();
+ final java.awt.Font[] systemFonts =
+ this.fontServer.getSystemFontList();
if (systemFonts != null) {
- log.debug("Java font names:");
+ this.log.debug("Java font names:");
for (int i = 0; i < systemFonts.length; i++) {
- log.debug(" " + systemFonts[i].getFontName());
+ this.log.debug(" " + systemFonts[i].getFontName());
}
}
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -182,16 +182,17 @@
* @throws FOrayException For errors during processing.
*/
public void startRenderer() throws FOrayException {
- pageCount = 0;
+ this.pageCount = 0;
- if (MEM_PROFILE_WITH_GC) {
+ if (FOrayTarget.MEM_PROFILE_WITH_GC) {
System.gc(); // This takes time but gives better results
}
- initialMemory = runtime.totalMemory() - runtime.freeMemory();
- startTime = System.currentTimeMillis();
+ this.initialMemory = this.runtime.totalMemory()
+ - this.runtime.freeMemory();
+ this.startTime = System.currentTimeMillis();
try {
- outputTarget.startOutput();
+ this.outputTarget.startOutput();
} catch (final OutputException e) {
throw new FOrayException(e);
}
@@ -203,38 +204,39 @@
*/
public void stopRenderer() throws SAXException {
try {
- outputTarget.stopOutput();
+ this.outputTarget.stopOutput();
} catch (final OutputException e) {
throw new SAXException(e);
}
- if (MEM_PROFILE_WITH_GC) {
+ if (FOrayTarget.MEM_PROFILE_WITH_GC) {
System.gc(); // This takes time but gives better results
}
- final long memoryNow = runtime.totalMemory() - runtime.freeMemory();
- final long memoryUsed = (memoryNow - initialMemory) /
+ final long memoryNow = this.runtime.totalMemory()
+ - this.runtime.freeMemory();
+ final long memoryUsed = (memoryNow - this.initialMemory) /
WKConstants.BYTES_PER_KILOBYTE;
- getLogger().debug("Initial heap size: " + (initialMemory /
+ getLogger().debug("Initial heap size: " + (this.initialMemory /
WKConstants.BYTES_PER_KILOBYTE) + "Kb");
getLogger().debug("Current heap size: "
+ (memoryNow / WKConstants.BYTES_PER_KILOBYTE) + "Kb");
getLogger().debug("Total memory used: " + memoryUsed + "Kb");
- if (!MEM_PROFILE_WITH_GC) {
+ if (! FOrayTarget.MEM_PROFILE_WITH_GC) {
getLogger().debug(" Memory use is indicative; no GC was "
+ "performed");
getLogger().debug(" These figures should not be used "
+ "comparatively");
}
- final long timeUsed = System.currentTimeMillis() - startTime;
+ final long timeUsed = System.currentTimeMillis() - this.startTime;
getLogger().debug("Total time used: " + timeUsed + "ms");
- getLogger().debug("Pages rendered: " + pageCount);
- if (pageCount != 0) {
- getLogger().debug("Avg render time: " + (timeUsed / pageCount)
+ getLogger().debug("Pages rendered: " + this.pageCount);
+ if (this.pageCount != 0) {
+ getLogger().debug("Avg render time: " + (timeUsed / this.pageCount)
+ "ms/page");
}
}
@@ -245,24 +247,24 @@
* @throws FOrayException For errors during processing.
*/
public void render(final PageSequence pageSequence) throws FOrayException {
- pageSequenceCount ++;
+ this.pageSequenceCount ++;
if (this.outputTarget instanceof Renderer) {
getLogger().info("Starting layout of page-sequence "
- + pageSequenceCount + ".");
+ + this.pageSequenceCount + ".");
final Renderer renderer = (Renderer) this.outputTarget;
final org.axsl.galley.Galley areaTreeR = getRenderedAreaTree();
renderer.setGalley(areaTreeR);
final org.axsl.area.PageCollection pageCollection;
try {
- pageCollection = areaTree.makePageCollection(pageSequence);
- layout.formatPageSequence(pageCollection);
+ pageCollection = this.areaTree.makePageCollection(pageSequence);
+ this.layout.formatPageSequence(pageCollection);
} catch (final AreaTreeException e) {
throw new FOrayException(e);
} catch (final LayoutException e) {
throw new FOrayException(e);
}
getLogger().info("Ending layout of page-sequence "
- + pageSequenceCount + ": "
+ + this.pageSequenceCount + ": "
+ pageCollection.getPageCount() + " pages produced.");
}
}
@@ -305,7 +307,7 @@
} catch (final OutputException e) {
this.getLogger().error("Rendering error", e);
}
- pageCount++;
+ this.pageCount++;
}
/**
@@ -313,7 +315,7 @@
* @return The logger.
*/
public Log getLogger() {
- return document.getLogger();
+ return this.document.getLogger();
}
/**
@@ -384,7 +386,7 @@
* @return The TextConsumer for this target.
*/
public TextServer getTextServer() {
- return document.getTextServer();
+ return this.document.getTextServer();
}
/**
@@ -408,7 +410,7 @@
* @return The SessionConfig for this target.
*/
public SessionConfig getSessionConfig() {
- return document.getSessionConfig();
+ return this.document.getSessionConfig();
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -573,7 +573,7 @@
/* TODO: Where possible, replace this heuristic with data from the
* font itself. */
final int ascender = getAscender(fontSize);
- return Math.round(ascender * SUBSCRIPT_SHIFT_FACTOR);
+ return Math.round(ascender * FOrayFont.SUBSCRIPT_SHIFT_FACTOR);
}
/**
@@ -583,7 +583,7 @@
/* TODO: Where possible, replace this heuristic with data from the
* font itself. */
final int ascender = getAscender(fontSize);
- return Math.round(ascender * -1 * SUPERSCRIPT_SHIFT_FACTOR);
+ return Math.round(ascender * -1 * FOrayFont.SUPERSCRIPT_SHIFT_FACTOR);
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -623,7 +623,7 @@
weight,
org.axsl.font.Font.Variant.NORMAL,
org.axsl.font.Font.Stretch.NORMAL,
- DEFAULT_SMALL_CAPS_SIZE,
+ FOrayFontServer.DEFAULT_SMALL_CAPS_SIZE,
Float.NaN,
Float.NaN,
new float[0]);
Modified: trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-font/src/java/org/foray/font/RegisteredFontDesc.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -744,14 +744,22 @@
*/
private static int stretchSimulationIndex(final Font.Stretch stretch) {
switch(stretch) {
- case ULTRA_CONDENSED: return SIMULATE_ULTRA_CONDENSED_INDEX;
- case EXTRA_CONDENSED: return SIMULATE_EXTRA_CONDENSED_INDEX;
- case CONDENSED: return SIMULATE_CONDENSED_INDEX;
- case SEMI_CONDENSED: return SIMULATE_SEMI_CONDENSED_INDEX;
- case SEMI_EXPANDED: return SIMULATE_SEMI_EXPANDED_INDEX;
- case EXPANDED: return SIMULATE_EXPANDED_INDEX;
- case EXTRA_EXPANDED: return SIMULATE_EXTRA_EXPANDED_INDEX;
- case ULTRA_EXPANDED: return SIMULATE_ULTRA_EXPANDED_INDEX;
+ case ULTRA_CONDENSED:
+ return RegisteredFontDesc.SIMULATE_ULTRA_CONDENSED_INDEX;
+ case EXTRA_CONDENSED:
+ return RegisteredFontDesc.SIMULATE_EXTRA_CONDENSED_INDEX;
+ case CONDENSED:
+ return RegisteredFontDesc.SIMULATE_CONDENSED_INDEX;
+ case SEMI_CONDENSED:
+ return RegisteredFontDesc.SIMULATE_SEMI_CONDENSED_INDEX;
+ case SEMI_EXPANDED:
+ return RegisteredFontDesc.SIMULATE_SEMI_EXPANDED_INDEX;
+ case EXPANDED:
+ return RegisteredFontDesc.SIMULATE_EXPANDED_INDEX;
+ case EXTRA_EXPANDED:
+ return RegisteredFontDesc.SIMULATE_EXTRA_EXPANDED_INDEX;
+ case ULTRA_EXPANDED:
+ return RegisteredFontDesc.SIMULATE_ULTRA_EXPANDED_INDEX;
default: return -1;
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java 2007-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -64,7 +64,7 @@
* Main method, which is called by ant.
*/
public void execute() {
- final DirectoryScanner ds = this.getDirectoryScanner(sourceDir);
+ final DirectoryScanner ds = this.getDirectoryScanner(this.sourceDir);
final String[] files = ds.getIncludedFiles();
for (int i = 0; i < files.length; i++) {
final String baseFileName = IOUtil.baseFileName(files[i]);
@@ -102,8 +102,8 @@
* @param filename The input file to be processed.
*/
private void processFile(final String filename) {
- final File infile = new File(sourceDir, filename + ".afm");
- final File outfile = new File(targetDir, filename + "."
+ final File infile = new File(this.sourceDir, filename + ".afm");
+ final File outfile = new File(this.targetDir, filename + "."
+ FOrayConstants.BINARY_SERIALIZATION_EXTENSION);
boolean startProcess = true;
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-07-24 20:20:49 UTC (rev 10096)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/FontFileReader.java 2007-07-24 21:05:09 UTC (rev 10097)
@@ -145,9 +145,10 @@
// Type1 Font (Hex or PFA Format)
seek(0);
- tag = readString(TYPE_1_HEADER_1.length(), CHAR_ENCODE_US_ASCII);
- if (tag.startsWith(TYPE_1_HEADER_2)
- || tag.equals(TYPE_1_HEADER_1)) {
+ tag = readString(FontFileReader.TYPE_1_HEADER_1.length(),
+ CHAR_ENCODE_US_ASCII);
+ if (tag.startsWith(FontFileReader.TYPE_1_HEADER_2)
+ || tag.equals(FontFileReader.TYPE_1_HEADER_1)) {
this.fontFormat = Font.Format.TYPE1;
this.fileFormat = FontFileReader.FILEFORMAT_TYPE1_PFA;
return;
@@ -157,9 +158,10 @@
unsignedByte = readUnsignedByte();
if (unsignedByte == Type1PFBFile.START_OF_SEGMENT_MARKER) {
seek(Type1PFBFile.SIZE_SEGMENT_HEADER);
- tag = readString(TYPE_1_HEADER_1.length(), CHAR_ENCODE_US_ASCII);
- if (tag.startsWith(TYPE_1_HEADER_2)
- || tag.equals(TYPE_1_HEADER_1)) {
+ tag = readString(FontFileReader.TYPE_1_HEADER_1.length(),
+ CHAR_ENCODE_US_ASCII);
+ if (tag.startsWith(FontFileReader.TYPE_1_HEADER_2)
+ || tag.equals(FontFileReader.TYPE_1_HEADER_1)) {
this.fontFormat = Font.Format.TYPE1;
this.fileFormat = FontFileReader.FILEFORMAT_TYPE1_PFB;
return;
@@ -175,16 +177,18 @@
}
// TrueType Collection (multiple fonts)
seek(0);
- tag = readString(TTF_HEADER.length(), CHAR_ENCODE_US_ASCII);
- if (tag.equals(TTF_HEADER)) {
+ tag = readString(FontFileReader.TTF_H...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-24 21:52:41
|
Revision: 10098
http://svn.sourceforge.net/foray/?rev=10098&view=rev
Author: victormote
Date: 2007-07-24 14:52:43 -0700 (Tue, 24 Jul 2007)
Log Message:
-----------
Implement new checkstyle requirement for "this" references for instance variables.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectMember.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeam.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamInputSource.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java
trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.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/RegionRABody.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/TableRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderArray.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReaderRAFile.java
trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
trunk/foray/foray-common/src/java/org/foray/common/UnicodeChar.java
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-common/src/java/org/foray/common/XMLCharacter.java
trunk/foray/foray-common/src/java/org/foray/common/ps/PsUtil.java
trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
trunk/foray/foray-common/src/java/org/foray/common/url/URLFactory.java
trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java
trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2007-07-24 21:05:09 UTC (rev 10097)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2007-07-24 21:52:43 UTC (rev 10098)
@@ -117,9 +117,11 @@
// if this is running in a secure place
}
}
- this.resource = getResourceBundle(TRANSLATION_PATH + "resources."
+ this.resource = getResourceBundle(AWTStarter.TRANSLATION_PATH
+ + "resources."
+ language);
- userMessage.setTranslator(getResourceBundle(TRANSLATION_PATH
+ this.userMessage.setTranslator(getResourceBundle(
+ AWTStarter.TRANSLATION_PATH
+ "messages." + language));
final SessionConfig configuration = getOptions().getSessionConfig();
@@ -131,9 +133,9 @@
final OutputConfig renderOptions =
getCommandLineOptions().getRendererOptions();
this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
- frame = createPreviewDialog(renderer, resource);
- renderer.setComponent(frame);
- frame.progress(resource.getString("Init parser") + " ...");
+ this.frame = createPreviewDialog(this.renderer, this.resource);
+ this.renderer.setComponent(this.frame);
+ this.frame.progress(this.resource.getString("Init parser") + " ...");
}
/**
@@ -141,18 +143,18 @@
*/
public void run() throws FOrayException {
// build FO tree: time
- frame.progress(resource.getString("Build FO tree") + " ...");
+ this.frame.progress(this.resource.getString("Build FO tree") + " ...");
try {
- document.process();
+ this.document.process();
} catch (final Exception e) {
- frame.reportException(e);
+ this.frame.reportException(e);
if (e instanceof FOrayException) {
throw (FOrayException) e;
}
throw new FOrayException(e);
}
- frame.progress(resource.getString("Show"));
- frame.showPage();
+ this.frame.progress(this.resource.getString("Show"));
+ this.frame.showPage();
}
/**
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2007-07-24 21:05:09 UTC (rev 10097)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2007-07-24 21:52:43 UTC (rev 10098)
@@ -79,7 +79,7 @@
private File outfile = null;
/** The input mode. */
- private int inputmode = INPUT_NOT_SET;
+ private int inputmode = CommandLineOptions.INPUT_NOT_SET;
/** The output mode. */
private OutputTargetType outputmode;
@@ -111,8 +111,8 @@
this.log = logger;
boolean optionsParsed = true;
- sessionConfig = new SessionConfig(log);
- rendererOptions = new OutputConfig(log);
+ this.sessionConfig = new SessionConfig(this.log);
+ this.rendererOptions = new OutputConfig(this.log);
try {
optionsParsed = parseOptions(args);
if (optionsParsed) {
@@ -121,10 +121,10 @@
debug();
}
} catch (final FOrayException e) {
- printUsage(log);
+ printUsage(this.log);
throw e;
} catch (final FileNotFoundException e) {
- printUsage(log);
+ printUsage(this.log);
throw e;
}
}
@@ -151,13 +151,13 @@
*/
private boolean parseOptions(final String args[]) throws FOrayException {
this.currentArgument = 0;
- while (currentArgument < args.length) {
+ while (this.currentArgument < args.length) {
final boolean optionParsedSuccessfully = parseOneOption(args);
if (! optionParsedSuccessfully) {
- printUsage(log);
+ printUsage(this.log);
return false;
}
- currentArgument ++;
+ this.currentArgument ++;
}
return true;
}
@@ -169,189 +169,190 @@
* @throws FOrayException For errors in the options.
*/
private boolean parseOneOption(final String[] args) throws FOrayException {
- if (args[currentArgument].equals("-c")) {
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if (args[this.currentArgument].equals("-c")) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("if you use '-c', you must "
+ "specify the name of the configuration file");
}
try {
this.userConfig = URLFactory.createURL(
- args[currentArgument + 1]);
+ args[this.currentArgument + 1]);
} catch (final MalformedURLException e) {
throw new FOrayException(e);
}
- currentArgument++;
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-so")) {
+ if (args[this.currentArgument].equals("-so")) {
final boolean success = parseConfigurationOption(args);
if (success) {
- currentArgument += 2;
+ this.currentArgument += 2;
}
return success;
}
- if (args[currentArgument].equals("-fo")) {
- inputmode = INPUT_FO;
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if (args[this.currentArgument].equals("-fo")) {
+ this.inputmode = CommandLineOptions.INPUT_FO;
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the fo file "
+ "for the '-fo' option");
}
- final String foString = args[currentArgument + 1];
+ final String foString = args[this.currentArgument + 1];
try {
this.foInput = URLFactory.createURL(foString);
} catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + foString);
}
this.sessionConfig.setBaseDocument(this.foInput);
- currentArgument++;
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-xsl")) {
- inputmode = INPUT_XSLT;
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if (args[this.currentArgument].equals("-xsl")) {
+ this.inputmode = CommandLineOptions.INPUT_XSLT;
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the stylesheet "
+ "file for the '-xsl' option");
}
- final String xsltString = args[currentArgument + 1];
+ final String xsltString = args[this.currentArgument + 1];
try {
- xsltInput = URLFactory.createURL(xsltString);
+ this.xsltInput = URLFactory.createURL(xsltString);
} catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + xsltString);
}
- currentArgument++;
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-xml")) {
- inputmode = INPUT_XSLT;
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if (args[this.currentArgument].equals("-xml")) {
+ this.inputmode = CommandLineOptions.INPUT_XSLT;
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the input file "
+ "for the '-xml' option");
}
- final String xmlString = args[currentArgument + 1];
+ final String xmlString = args[this.currentArgument + 1];
try {
this.xmlInput = URLFactory.createURL(xmlString);
} catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + xmlString);
}
- this.sessionConfig.setBaseDocument(xmlInput);
- currentArgument++;
+ this.sessionConfig.setBaseDocument(this.xmlInput);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-awt")) {
+ if (args[this.currentArgument].equals("-awt")) {
setOutputMode(OutputTargetType.AWT);
return true;
}
- if (args[currentArgument].equals("-pdf")) {
+ if (args[this.currentArgument].equals("-pdf")) {
setOutputMode(OutputTargetType.PDF);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the pdf output "
+ "file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-mif")) {
+ if (args[this.currentArgument].equals("-mif")) {
setOutputMode(OutputTargetType.MIF);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the mif output "
+ "file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-print")) {
+ if (args[this.currentArgument].equals("-print")) {
setOutputMode(OutputTargetType.PRINT);
// show print help
- if (currentArgument + 1 < args.length) {
- if (args[currentArgument + 1].equals("help")) {
+ if (this.currentArgument + 1 < args.length) {
+ if (args[this.currentArgument + 1].equals("help")) {
printUsagePrintOutput();
return false;
}
}
return true;
}
- if (args[currentArgument].equals("-pcl")) {
+ if (args[this.currentArgument].equals("-pcl")) {
setOutputMode(OutputTargetType.PCL);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the pdf output "
+ "file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-ps")) {
+ if (args[this.currentArgument].equals("-ps")) {
setOutputMode(OutputTargetType.PS);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the PostScript "
+ "output file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-txt")) {
+ if (args[this.currentArgument].equals("-txt")) {
setOutputMode(OutputTargetType.TXT);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the text output "
+ "file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].equals("-svg")) {
+ if (args[this.currentArgument].equals("-svg")) {
setOutputMode(OutputTargetType.SVG);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the svg output "
+ "file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
- if (args[currentArgument].charAt(0) != '-') {
- if (inputmode == INPUT_NOT_SET) {
- inputmode = INPUT_FO;
+ if (args[this.currentArgument].charAt(0) != '-') {
+ if (this.inputmode == CommandLineOptions.INPUT_NOT_SET) {
+ this.inputmode = CommandLineOptions.INPUT_FO;
try {
- foInput = URLFactory.createURL(args[currentArgument]);
+ this.foInput = URLFactory.createURL(
+ args[this.currentArgument]);
} catch (final MalformedURLException e) {
throw new FOrayException(e);
}
- } else if (outputmode == null) {
- outputmode = OutputTargetType.PDF;
- outfile = new File(args[currentArgument]);
+ } else if (this.outputmode == null) {
+ this.outputmode = OutputTargetType.PDF;
+ this.outfile = new File(args[this.currentArgument]);
} else {
throw new FOrayException("Don't know what to do with "
- + args[currentArgument]);
+ + args[this.currentArgument]);
}
return true;
}
- if (args[currentArgument].equals("-at")) {
+ if (args[this.currentArgument].equals("-at")) {
setOutputMode(OutputTargetType.XML);
- if ((currentArgument + 1 == args.length)
- || (args[currentArgument + 1].charAt(0) == '-')) {
+ if ((this.currentArgument + 1 == args.length)
+ || (args[this.currentArgument + 1].charAt(0) == '-')) {
throw new FOrayException("you must specify the area-tree "
+ "output file");
}
- outfile = new File(args[currentArgument + 1]);
- currentArgument++;
+ this.outfile = new File(args[this.currentArgument + 1]);
+ this.currentArgument++;
return true;
}
throw new FOrayException("Invalid command-line option: \""
- + args[currentArgument] + "\"");
+ + args[this.currentArgument] + "\"");
}
/**
@@ -368,12 +369,14 @@
* a total of 3 arguments for each, the current one "-so", indicating
* that it is a configuration option, followed by the key and the value.
*/
- if (currentArgument + STANDARD_OPTIONS_QTY_ARGUMENTS > args.length) {
- throw new FOrayException("Argument " + currentArgument
+ if (this.currentArgument
+ + CommandLineOptions.STANDARD_OPTIONS_QTY_ARGUMENTS
+ > args.length) {
+ throw new FOrayException("Argument " + this.currentArgument
+ " must be followed by key and value.");
}
- final String key = args[currentArgument + 1];
- final String value = args[currentArgument + 2];
+ final String key = args[this.currentArgument + 1];
+ final String value = args[this.currentArgument + 2];
if (this.sessionConfig.parseOption(key, value,
SessionConfig.PRECEDENCE_COMMAND_LINE)) {
return true;
@@ -389,8 +392,8 @@
*/
private void setOutputMode(final OutputTargetType mode)
throws FOrayException {
- if (outputmode == null) {
- outputmode = mode;
+ if (this.outputmode == null) {
+ this.outputmode = mode;
} else {
throw new FOrayException("you can only set one output method");
}
@@ -403,51 +406,55 @@
* @throws FileNotFoundException For specified files that do not exist.
*/
private void checkSettings() throws FOrayException, FileNotFoundException {
- if (inputmode == INPUT_NOT_SET) {
+ if (this.inputmode == CommandLineOptions.INPUT_NOT_SET) {
throw new FOrayException("No input file specified");
}
- if (outputmode == null) {
+ if (this.outputmode == null) {
throw new FOrayException("No output file specified");
}
- if (inputmode == INPUT_XSLT) {
+ if (this.inputmode == CommandLineOptions.INPUT_XSLT) {
// check whether xml *and* xslt file have been set
- if (xmlInput == null) {
+ if (this.xmlInput == null) {
throw new FOrayException("XML file must be specified for the "
+ "transform mode");
}
- if (xsltInput == null) {
+ if (this.xsltInput == null) {
throw new FOrayException("XSLT file must be specified for the "
+ "transform mode");
}
// warning if fofile has been set in xslt mode
- if (foInput != null) {
- log.warn("Can't use fo file with transform mode! Ignoring.\n"
+ if (this.foInput != null) {
+ this.log.warn("Can't use fo file with transform mode! "
+ + "Ignoring.\n"
+ "Your input is:\n"
- + " xmlfile: " + xmlInput.toExternalForm() + "\n"
- + " xsltfile: " + xsltInput.toExternalForm() + "\n"
- + " fofile: " + foInput.toExternalForm());
+ + " xmlfile: " + this.xmlInput.toExternalForm() + "\n"
+ + " xsltfile: " + this.xsltInput.toExternalForm()
+ + "\n"
+ + " fofile: " + this.foInput.toExternalForm());
}
- if (! URLUtil.exists(xmlInput)) {
+ if (! URLUtil.exists(this.xmlInput)) {
throw new FileNotFoundException("XML file not found: "
- + xmlInput.toExternalForm());
+ + this.xmlInput.toExternalForm());
}
- if (! URLUtil.exists(xsltInput)) {
+ if (! URLUtil.exists(this.xsltInput)) {
throw new FileNotFoundException("XSLT file not found: "
- + xsltInput.toExternalForm());
+ + this.xsltInput.toExternalForm());
}
- } else if (inputmode == INPUT_FO) {
- if (xmlInput != null || xsltInput != null) {
- log.warn("fo input mode, but xmlfile or xslt file are set:");
- log.error("xml file: " + xmlInput.toString());
- log.error("xslt file: " + xsltInput.toString());
+ } else if (this.inputmode == CommandLineOptions.INPUT_FO) {
+ if (this.xmlInput != null
+ || this.xsltInput != null) {
+ this.log.warn("fo input mode, but xmlfile or xslt file are "
+ + "set:");
+ this.log.error("xml file: " + this.xmlInput.toString());
+ this.log.error("xslt file: " + this.xsltInput.toString());
}
- if (! URLUtil.exists(foInput)) {
+ if (! URLUtil.exists(this.foInput)) {
throw new FileNotFoundException("FO input not found: "
- + foInput.toExternalForm());
+ + this.foInput.toExternalForm());
}
}
@@ -464,7 +471,7 @@
* type.
*/
public OutputTargetType getOutputMode() throws FOrayException {
- return outputmode;
+ return this.outputmode;
}
/**
@@ -473,9 +480,9 @@
* @throws FOrayException For errors creaing the input source.
*/
public InputSource getInputSource() throws FOrayException {
- if (inputmode == INPUT_FO) {
+ if (this.inputmode == CommandLineOptions.INPUT_FO) {
try {
- return new InputSource(foInput.openStream());
+ return new InputSource(this.foInput.openStream());
} catch (final IOException e) {
throw new FOrayException(e);
}
@@ -506,10 +513,10 @@
*/
public Starter getStarter() throws FOrayException {
Starter starter = null;
- switch (outputmode) {
+ switch (this.outputmode) {
case AWT:
try {
- starter = new AWTStarter(log, getSessionConfig(),
+ starter = new AWTStarter(this.log, getSessionConfig(),
getRendererOptions(), this);
} catch (final Exception e) {
if (e instanceof FOrayException) {
@@ -520,7 +527,7 @@
break;
case PRINT:
try {
- starter = new PrintStarter(log, getSessionConfig(),
+ starter = new PrintStarter(this.log, getSessionConfig(),
getRendererOptions(), this);
} catch (final Exception e) {
if (e instanceof FOrayException) {
@@ -531,7 +538,7 @@
}
break;
default:
- starter = new CommandLineStarter(log, getSessionConfig(),
+ starter = new CommandLineStarter(this.log, getSessionConfig(),
getRendererOptions(), this);
}
return starter;
@@ -542,7 +549,7 @@
* @return The parsed inlput mode.
*/
public int getInputMode() {
- return inputmode;
+ return this.inputmode;
}
/**
@@ -550,7 +557,7 @@
* @return The parsed FO file location.
*/
public URL getFOFile() {
- return foInput;
+ return this.foInput;
}
/**
@@ -558,7 +565,7 @@
* @return The parsed XML file location.
*/
public URL getXMLFile() {
- return xmlInput;
+ return this.xmlInput;
}
/**
@@ -566,7 +573,7 @@
* @return The parsed XSLT stylesheet file location.
*/
public URL getXSLFile() {
- return xsltInput;
+ return this.xsltInput;
}
/**
@@ -574,7 +581,7 @@
* @return The parsed output file location.
*/
public File getOutputFile() {
- return outfile;
+ return this.outfile;
}
/**
@@ -582,7 +589,7 @@
* @return The parsed user configuration file location.
*/
public URL getUserConfigFile() {
- return userConfig;
+ return this.userConfig;
}
/**
@@ -590,7 +597,7 @@
* @return The parsed language.
*/
public String getLanguage() {
- return language;
+ return this.language;
}
// /**
@@ -665,7 +672,7 @@
* Shows the options for print output.
*/
public void printUsagePrintOutput() {
- log.error("USAGE: -print [-Dstart=i] [-Dend=i] [-Dcopies=i] "
+ this.log.error("USAGE: -print [-Dstart=i] [-Dend=i] [-Dcopies=i] "
+ "[-Deven=true|false] "
+ " org.foray.app.FOray (..) -print\n"
+ "Example:\n"
@@ -682,74 +689,74 @@
if (! verbosity.equals("debug")) {
return;
}
- log.debug("Input mode: ");
- switch (inputmode) {
- case INPUT_NOT_SET:
- log.debug("not set");
+ this.log.debug("Input mode: ");
+ switch (this.inputmode) {
+ case CommandLineOptions.INPUT_NOT_SET:
+ this.log.debug("not set");
break;
- case INPUT_FO:
- log.debug("FO ");
- log.debug("fo input file: " + foInput.toString());
+ case CommandLineOptions.INPUT_FO:
+ this.log.debug("FO ");
+ this.log.debug("fo input file: " + this.foInput.toString());
break;
- case INPUT_XSLT:
- log.debug("xslt transformation");
- log.debug("xml input file: " + xmlInput.toString());
- log.debug("xslt stylesheet: " + xsltInput.toString());
+ case CommandLineOpti...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-25 19:47:26
|
Revision: 10103
http://foray.svn.sourceforge.net/foray/?rev=10103&view=rev
Author: victormote
Date: 2007-07-25 12:47:12 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing the continued-label object from the axsl namespace.
Modified Paths:
--------------
trunk/foray/doc/web/app/features/extensions.html
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerForay.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
Modified: trunk/foray/doc/web/app/features/extensions.html
===================================================================
--- trunk/foray/doc/web/app/features/extensions.html 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/doc/web/app/features/extensions.html 2007-07-25 19:47:12 UTC (rev 10103)
@@ -20,11 +20,7 @@
<ul>
<li><a href="#svg">SVG</a></li>
<li><a href="#axsl-extensions">Extensions in the "axsl:" Namespace</a></li>
- <li><a href="#foray-extensions">Extensions in the "foray:" Namespace</a>
- <ul>
- <li><a href="#table-continue-label">Table Continuation Label</a></li>
- </ul>
- </li>
+ <li><a href="#foray-extensions">Extensions in the "foray:" Namespace</a></li>
</ul>
<p>By "extension", we mean any data that can be placed in the input XML
@@ -70,31 +66,9 @@
<pre class="code"><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:foray="http://org.foray/fo-extensions/2004"></pre>
+<p>There are currently no supported extensions in the "foray" namespace.</p>
-<h3><a name="table-continue-label">Table Continuation Label</a></h3>
-<p>Use the foray:continued-label element to create content in table-header and
-table-footer cells that will appear only on pages after the first page that the
-table appears. foray:continued-label is itself inline content, and is a
-container of fo:inline content. This content will be laid out only if the table
-does not fit on a single page and flows to following pages. Here is an example
-of FO code creating such a table-header:</p>
-<pre class="code"><fo:table-header>
- <fo:table-row>
- <fo:table-cell>
- <fo:block>Header column 1 with continued label
- <foray:continued-label>
- <fo:inline> (cont.)</fo:inline>
- </foray:continued-label>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block>Header column 2 with no continued label</fo:block>
- </fo:table-cell>
- </fo:table-row>
-</fo:table-header></pre>
-
-
<!--#include virtual="/00-rsrc/include/leftmenu-end.html" -->
</body>
</html>
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/doc/web/app/using/release.html 2007-07-25 19:47:12 UTC (rev 10103)
@@ -54,6 +54,10 @@
<li>FOray now has limited support for embedding EPS (encapsulated PostScript)
files in PDF output. See <a href="../features/graphics.html#eps">EPS
Graphics</a> for more details.</li>
+ <li>Support has been discontinued for the "continued-label" object in the
+ "foray" namespace. This general capability has been replaced by new features
+ in XSL-FO 1.1, which will be implemented in FOray as user needs are expressed
+ and as developer resources are available.</li>
</ul>
<h3>Unreleased changes of interest to Developers</h3>
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerForay.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerForay.java 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerForay.java 2007-07-25 19:47:12 UTC (rev 10103)
@@ -30,7 +30,6 @@
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyList;
-import org.foray.fotree.foray.obj.ContinuedLabel;
/**
* Factory class for creating formatting objects in the "foray" namespace.
@@ -56,9 +55,6 @@
final ForayObject enumeration = ForayObject.extensionValueOf(
objectName);
switch (enumeration) {
- case CONTINUED_LABEL: {
- return new ContinuedLabel(parent, propertyList);
- }
default: {
return null;
}
Deleted: trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java 2007-07-25 19:47:12 UTC (rev 10103)
@@ -1,173 +0,0 @@
-/*
- * Copyright 2004 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.fotree.foray.obj;
-
-import org.foray.fotree.FObj;
-import org.foray.fotree.Namespace;
-import org.foray.fotree.PropertyList;
-
-import org.axsl.fo.FoTreeException;
-import org.axsl.fo.ProxyFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implement continued labels for table header/footer.
- * Content of this element must be an fo:inline.
- */
-public class ContinuedLabel extends FObj
- implements org.axsl.fo.extension.ContinuedLabel {
-
- /** The parent of this node. */
- private FObj parent;
-
- /** The children of this object. */
- private List<FObj> children = new ArrayList<FObj>();
-
- /** The property list for this object. */
- private PropertyList propertyList;
-
- /**
- * Constructor.
- * @param parent The parent FObj.
- * @param propertyList The property list for this FObj.
- */
- public ContinuedLabel(final FObj parent, final PropertyList propertyList) {
- super(parent);
- this.parent = parent;
- this.propertyList = propertyList;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void validateAncestry() throws FoTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void validateProperties() throws FoTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void setup() throws FoTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void end() throws FoTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void validateDescendants() throws FoTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return "continued-label";
- }
-
- /**
- * {@inheritDoc}
- */
- public Namespace getNamespace() {
- return this.getFoTree().getForayNamespace();
- }
-
- /**
- * {@inheritDoc}
- */
- public Object acceptProxyFactory(final ProxyFactory factory) {
- return factory.makeProxy(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public FObj getParent() {
- return this.parent;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<FObj> getChildren() {
- return this.children;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addChild(final FObj child) throws FoTreeException {
- this.getChildren().add(child);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isContentInline() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isContentBlock() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isContentPcdata() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public PropertyList getPropertyList() {
- return this.propertyList;
- }
-
-}
Deleted: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-07-25 19:47:12 UTC (rev 10103)
@@ -1,96 +0,0 @@
-/*
- * Copyright 2004 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.pioneer;
-
-import org.axsl.area.AreaNode;
-import org.axsl.area.AreaTreeException;
-import org.axsl.area.TableArea;
-import org.axsl.fo.Fo;
-import org.axsl.fo.extension.ContinuedLabel;
-import org.axsl.fo.fo.GraftingPoint;
-
-/**
- * Pioneer Layout for {@link ContinuedLabel}.
- */
-public class ContinuedLabelPL extends FObjPL {
-
- /** The real FONode which this proxy represents. */
- private ContinuedLabel label;
-
- /**
- * Constructor.
- * @param inline The FO Tree object which is being laid out.
- * @param layout The ancestor layout system.
- */
- public ContinuedLabelPL(final ContinuedLabel inline,
- final PioneerLS layout) {
- super(inline, layout);
- this.label = inline;
- }
-
- /**
- * {@inheritDoc}
- * If we are within a cell in a table-header or table-footer object
- * and this is not the first generated area for the table, then generate
- * an inline area and put the content in it.
- * @param areaNode The parent area.
- * @return Value indicating where all, some or none of the content
- * was placed in the current parent area.
- */
- public Status layout(final AreaNode areaNode,
- final GraftingPoint graftingPoint) throws AreaTreeException {
- if (getProgress() == FONodePL.START) {
- setProgress(0);
- }
-
- // See if ancestor table has generated any areas yet.
- final TableArea tableArea = areaNode.ancestorTableArea();
- if (tableArea != null && tableArea.siblingIndex() != 0) {
- final int numChildren = this.label.getChildCount();
- for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = this.label.getChildAt(i);
- final Status status = getLayoutProxy(fo).layout(areaNode,
- graftingPoint);
- if (status.isIncomplete()) {
- setProgress(i);
- return status;
- }
- }
- }
- return Status.OK;
- }
-
- /**
- * {@inheritDoc}
- */
- public ContinuedLabel getFONode() {
- return this.label;
- }
-
-}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-25 19:01:40 UTC (rev 10102)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-25 19:47:12 UTC (rev 10103)
@@ -40,7 +40,6 @@
import org.axsl.area.RegionRefArea;
import org.axsl.fo.Fo;
import org.axsl.fo.ProxyFactory;
-import org.axsl.fo.extension.ContinuedLabel;
import org.axsl.fo.fo.BasicLink;
import org.axsl.fo.fo.BidiOverride;
import org.axsl.fo.fo.Block;
@@ -358,13 +357,6 @@
/**
* {@inheritDoc}
*/
- public ContinuedLabelPL makeProxy(final ContinuedLabel node) {
- return new ContinuedLabelPL(node, this);
- }
-
- /**
- * {@inheritDoc}
- */
public NoLayoutPL makeProxy(final PageSequence node) {
return new NoLayoutPL(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-25 20:54:39
|
Revision: 10105
http://foray.svn.sourceforge.net/foray/?rev=10105&view=rev
Author: victormote
Date: 2007-07-25 13:54:40 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing extraneous interfaces Character and CharacterSequence.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.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/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Removed Paths:
-------------
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -31,9 +31,9 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.BorderStyle;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -220,7 +220,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final CharacterSequence foText,
+ public TextArea makeTextArea(final CharacterContent foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -32,7 +32,7 @@
import org.axsl.common.value.LeaderAlignment;
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
-import org.axsl.fo.fo.CharacterSequence;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Inline;
@@ -514,7 +514,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final CharacterSequence foText,
+ public TextArea makeTextArea(final CharacterContent foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -43,7 +43,6 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.CharacterContent;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Inline;
@@ -1075,7 +1074,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final CharacterSequence foText,
+ public TextArea makeTextArea(final CharacterContent foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -830,9 +830,8 @@
public int traitHyphenationCharacter() {
/* TODO: Clean this method up after we clean up the construction. */
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof org.axsl.fo.fo.Character) {
- final org.axsl.fo.fo.Character character =
- (org.axsl.fo.fo.Character) generatedBy;
+ if (generatedBy instanceof CharacterContent) {
+ final CharacterContent character = (CharacterContent) generatedBy;
return character.traitHyphenationCharacter(this);
} else {
final NormalBlockArea blockArea = this.ancestorNormalBlockArea();
@@ -847,10 +846,10 @@
* @return The "generated-by" Character, or null if this area was not
* generated by an fo:character.
*/
- private org.axsl.fo.fo.Character generatedByCharacter() {
+ private CharacterContent generatedByCharacter() {
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof org.axsl.fo.fo.Character) {
- return (org.axsl.fo.fo.Character) generatedBy;
+ if (generatedBy instanceof CharacterContent) {
+ return (CharacterContent) generatedBy;
}
return null;
}
@@ -859,7 +858,7 @@
* {@inheritDoc}
*/
public int traitSpaceStartOptimum() {
- final org.axsl.fo.fo.Character character = this.generatedByCharacter();
+ final CharacterContent character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
@@ -871,7 +870,7 @@
* {@inheritDoc}
*/
public int traitSpaceEndOptimum() {
- final org.axsl.fo.fo.Character character = this.generatedByCharacter();
+ final CharacterContent character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -49,7 +49,7 @@
/**
* A "character" object in XSL-FO.
*/
-public class Character extends FObj implements org.axsl.fo.fo.Character {
+public class Character extends FObj implements org.axsl.fo.fo.CharacterContent {
/** The parent of this node. */
private FObj parent;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -43,7 +43,7 @@
import org.axsl.common.value.WrapOption;
import org.axsl.fo.FoContext;
import org.axsl.fo.ProxyFactory;
-import org.axsl.fo.fo.CharacterSequence;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.font.Font;
@@ -55,7 +55,7 @@
/**
* A text node in the formatting object tree.
*/
-public class CharacterSequence4a extends FObj implements CharacterSequence {
+public class CharacterSequence4a extends FObj implements CharacterContent {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -29,17 +29,17 @@
package org.foray.layout;
import org.axsl.area.AreaTree;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
import org.axsl.area.LineContentFactory;
import org.axsl.area.PageArea;
import org.axsl.area.PageCollection;
import org.axsl.area.RegionRefArea;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.FoLineNonText;
import org.axsl.fo.FoLineText;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.InstreamForeignObject;
import org.axsl.fo.fo.Leader;
import org.axsl.fo.fo.PageNumber;
@@ -149,8 +149,8 @@
if (this.areaStack.size() > 0) {
factory = this.areaStack.peek();
}
- if (textToUse instanceof CharacterSequence) {
- final CharacterSequence foText = (CharacterSequence) textToUse;
+ if (textToUse instanceof CharacterContent) {
+ final CharacterContent foText = (CharacterContent) textToUse;
factory.makeTextArea(foText, sizeInline, startOffset, sizeInChars,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
graftingPoint);
Deleted: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/CharacterPL.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -1,70 +0,0 @@
-/*
- * Copyright 2004 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.pioneer;
-
-import org.axsl.area.AreaNode;
-import org.axsl.area.AreaTreeException;
-
-import org.axsl.fo.fo.Character;
-import org.axsl.fo.fo.GraftingPoint;
-
-/**
- * Concrete class for FObj instances that do not need layout.
- */
-public class CharacterPL extends FObjPL {
-
- /** The real FONode which this proxy represents. */
- private Character realFONode;
-
- /**
- * Constructor.
- * @param realFObj The FO Tree object which is being laid out.
- * @param layout The ancestor layout system.
- */
- public CharacterPL(final Character realFObj, final PioneerLS layout) {
- super(realFObj, layout);
- this.realFONode = realFObj;
- }
-
- /**
- * {@inheritDoc}
- */
- public Status layout(final AreaNode areaNode,
- final GraftingPoint graftingPoint) throws AreaTreeException {
- return layoutChildren(areaNode, graftingPoint);
- }
-
- /**
- * {@inheritDoc}
- */
- public Character getFONode() {
- return this.realFONode;
- }
-
-}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -29,26 +29,26 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.FoLineText;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.CharacterSequence;
/**
- * Pioneer Layout for {@link CharacterSequence}.
+ * Pioneer Layout for {@link CharacterContent}.
*/
public class FOTextPL extends FONodePL {
/** The real FONode which this proxy represents. */
- private CharacterSequence node;
+ private CharacterContent node;
/**
* Constructor.
* @param text The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public FOTextPL(final CharacterSequence text, final PioneerLS layout) {
+ public FOTextPL(final CharacterContent text, final PioneerLS layout) {
super(text, layout);
this.node = text;
}
@@ -103,7 +103,7 @@
/**
* {@inheritDoc}
*/
- public CharacterSequence getFONode() {
+ public CharacterContent getFONode() {
return this.node;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-25 19:50:15 UTC (rev 10104)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-25 20:54:40 UTC (rev 10105)
@@ -46,8 +46,7 @@
import org.axsl.fo.fo.BlockContainer;
import org.axsl.fo.fo.Bookmark;
import org.axsl.fo.fo.BookmarkTitle;
-import org.axsl.fo.fo.Character;
-import org.axsl.fo.fo.CharacterSequence;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.ColorProfile;
import org.axsl.fo.fo.Declarations;
import org.axsl.fo.fo.ExternalGraphic;
@@ -392,7 +391,7 @@
/**
* {@inheritDoc}
*/
- public FOTextPL makeProxy(final CharacterSequence node) {
+ public FOTextPL makeProxy(final CharacterContent node) {
return new FOTextPL(node, this);
}
@@ -427,13 +426,6 @@
/**
* {@inheritDoc}
*/
- public CharacterPL makeProxy(final Character node) {
- return new CharacterPL(node, this);
- }
-
- /**
- * {@inheritDoc}
- */
public ExternalGraphicPL makeProxy(final ExternalGraphic node) {
return new ExternalGraphicPL(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-26 00:14:03
|
Revision: 10108
http://foray.svn.sourceforge.net/foray/?rev=10108&view=rev
Author: victormote
Date: 2007-07-25 17:14:04 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Conform to axsl changes normalizing the information returned by internal-destination and external-destination.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-07-25 22:49:46 UTC (rev 10107)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-07-26 00:14:04 UTC (rev 10108)
@@ -136,7 +136,7 @@
* {@inheritDoc}
*/
public String getDestination() {
- return traitGeneratedBy().traitInternalDestination();
+ return traitGeneratedBy().getDestination();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-25 22:49:46 UTC (rev 10107)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-26 00:14:04 UTC (rev 10108)
@@ -82,6 +82,7 @@
import org.axsl.common.value.LineHeightShiftAdjustment;
import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.LinefeedTreatment;
+import org.axsl.common.value.LinkType;
import org.axsl.common.value.MediaUsage;
import org.axsl.common.value.Overflow;
import org.axsl.common.value.PageCitationStrategy;
@@ -160,13 +161,13 @@
import org.axsl.fo.fo.prop.CommonMarginInlinePa;
import org.axsl.fo.fo.prop.CommonRelativePositionPa;
import org.axsl.fo.fo.prop.ContentTypePa;
+import org.axsl.fo.fo.prop.DestinationPa;
import org.axsl.fo.fo.prop.DestinationPlacementOffsetPa;
import org.axsl.fo.fo.prop.DirectionPa;
import org.axsl.fo.fo.prop.DisplayAlignPa;
import org.axsl.fo.fo.prop.DominantBaselinePa;
import org.axsl.fo.fo.prop.EmptyCellsPa;
import org.axsl.fo.fo.prop.ExtentPa;
-import org.axsl.fo.fo.prop.ExternalDestinationPa;
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
import org.axsl.fo.fo.prop.ForcePageCountPa;
@@ -180,7 +181,6 @@
import org.axsl.fo.fo.prop.IndicateDestinationPa;
import org.axsl.fo.fo.prop.InitialPageNumberPa;
import org.axsl.fo.fo.prop.InlineProgressionDimensionPa;
-import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.IntrusionDisplacePa;
import org.axsl.fo.fo.prop.KeepTogetherPa;
import org.axsl.fo.fo.prop.KeepWithNextPa;
@@ -317,13 +317,13 @@
ColumnCountPa,
ColumnGapPa,
ContentTypePa,
+ DestinationPa,
DestinationPlacementOffsetPa,
DirectionPa,
DisplayAlignPa,
DominantBaselinePa,
EmptyCellsPa,
ExtentPa,
- ExternalDestinationPa,
FloatPa,
FlowNamePa,
ForcePageCountPa,
@@ -337,7 +337,6 @@
IndicateDestinationPa,
InitialPageNumberPa,
InlineProgressionDimensionPa,
- InternalDestinationPa,
IntrusionDisplacePa,
KeepTogetherPa,
KeepWithNextPa,
@@ -1172,14 +1171,18 @@
}
/**
- * {@inheritDoc}
+ * Returns the "internal-destination" trait for this FO.
+ * @return The "internal-destination" for this FO, or null if it has none.
+ * @see "XSL-FO Standard 1.0, Section 7.22.8"
*/
public String traitInternalDestination() {
return this.getPropertyList().getInternalDestination();
}
/**
- * {@inheritDoc}
+ * Returns the "external-destination" trait for this FO.
+ * @return The "external-destination" for this FO, or null if it has none.
+ * @see "XSL-FO Standard 1.0, Section 7.22.6"
*/
public String traitExternalDestination() {
return this.getPropertyList().getExternalDestination();
@@ -4643,4 +4646,53 @@
return RetrievePositionWithinTable.FIRST_STARTING;
}
+ /**
+ * {@inheritDoc}
+ */
+ public LinkType getLinkType() {
+ if (! traitInternalDestination().equals("")) {
+ return LinkType.INTERNAL;
+ }
+ if (! traitExternalDestination().equals("")) {
+ return LinkType.EXTERNAL;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getDestination() {
+ final LinkType linkType = getLinkType();
+ if (linkType == LinkType.INTERNAL) {
+ return this.traitInternalDestination();
+ }
+ if (linkType == LinkType.EXTERNAL) {
+ return this.getCookedExternalDestination();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the external destination stripped of the "url()" wrapping,
+ * leading and trailing spaces, and leading and trailing quotation marks.
+ * @return The normalized external destination.
+ */
+ public String getCookedExternalDestination() {
+ String destination = traitExternalDestination();
+ if (destination.startsWith("url(") && destination.endsWith(")")) {
+ destination = destination.substring("url(".length(),
+ destination.length() - 1).trim();
+ if (destination.startsWith("\"") && destination.endsWith("\"")) {
+ destination
+ = destination.substring(1, destination.length() - 1);
+ } else if (destination.startsWith("'")
+ && destination.endsWith("'")) {
+ destination
+ = destination.substring(1, destination.length() - 1);
+ }
+ }
+ return destination;
+ }
+
}
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-07-25 22:49:46 UTC (rev 10107)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-07-26 00:14:04 UTC (rev 10108)
@@ -33,7 +33,6 @@
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
-import org.axsl.common.value.LinkType;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
@@ -123,41 +122,6 @@
/**
* {@inheritDoc}
*/
- public LinkType getLinkType() {
- if (! traitInternalDestination().equals("")) {
- return LinkType.INTERNAL;
- }
- if (! traitExternalDestination().equals("")) {
- return LinkType.EXTERNAL;
- }
- return null;
- }
-
- /**
- * Returns the external destination stripped of the "url()" wrapping,
- * leading and trailing spaces, and leading and trailing quotation marks.
- * @return The normalized external destination.
- */
- public String getCookedExternalDestination() {
- String destination = traitExternalDestination();
- if (destination.startsWith("url(") && destination.endsWith(")")) {
- destination = destination.substring("url(".length(),
- destination.length() - 1).trim();
- if (destination.startsWith("\"") && destination.endsWith("\"")) {
- destination
- = destination.substring(1, destination.length() - 1);
- } else if (destination.startsWith("'")
- && destination.endsWith("'")) {
- destination
- = destination.substring(1, destination.length() - 1);
- }
- }
- return destination;
- }
-
- /**
- * {@inheritDoc}
- */
public boolean isContentInline() {
return true;
}
@@ -165,20 +129,6 @@
/**
* {@inheritDoc}
*/
- public String getDestination() {
- final LinkType linkType = getLinkType();
- if (linkType == LinkType.INTERNAL) {
- return this.traitInternalDestination();
- }
- if (linkType == LinkType.EXTERNAL) {
- return this.getCookedExternalDestination();
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
public Namespace getNamespace() {
return this.getFoTree().getFONamespace();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-26 16:19:54
|
Revision: 10111
http://foray.svn.sourceforge.net/foray/?rev=10111&view=rev
Author: victormote
Date: 2007-07-26 09:19:54 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
Don't let sequences of fo:character objects created from #PCDATA inherit the "id" property.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-26 15:26:09 UTC (rev 10110)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-26 16:19:54 UTC (rev 10111)
@@ -1260,4 +1260,17 @@
return this.resolvedFont;
}
+ /**
+ * {@inheritDoc}
+ * Overrides standard logic, because, although property "id" applies to
+ * fo:character, there is no way to set such a property on a sequence of
+ * fo:character objects that are inferred from #PCDATA. Any "id" for such
+ * data was designated on the parent, and, since "id" does not inherit,
+ * it cannot apply to this object.
+ */
+ @Override
+ public String traitId() {
+ return null;
+ }
+
}
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-07-26 15:26:09 UTC (rev 10110)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-07-26 16:19:54 UTC (rev 10111)
@@ -444,13 +444,14 @@
* @throws OutputException If a destination already exists.
*/
private void renderDestinations(final Area area) throws OutputException {
- if (area.destinationName() != null) {
+ final String destinationName = area.destinationName();
+ if (destinationName != null) {
final PdfDestination explicitDest =
this.currentPage.createDestination(
toPoints(area.crOriginX()),
toPoints(area.crOriginY()));
try {
- explicitDest.registerName(area.destinationName());
+ explicitDest.registerName(destinationName);
} catch (final PdfException e) {
throw new OutputException(e);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-26 20:23:32
|
Revision: 10114
http://foray.svn.sourceforge.net/foray/?rev=10114&view=rev
Author: victormote
Date: 2007-07-26 13:23:29 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing unnecessary convenience method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java 2007-07-26 19:44:15 UTC (rev 10113)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkTitleArea.java 2007-07-26 20:23:29 UTC (rev 10114)
@@ -71,9 +71,9 @@
* @return The text for this bookmark title.
*/
public String getTitleText() {
- // Cast verified at construction.
final BookmarkTitle generatedBy = traitGeneratedBy();
- return new String(generatedBy.getContent());
+ final char[] text = generatedBy.getChildAt(0).getAreaTreeText(null);
+ return new String(text);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2007-07-26 19:44:15 UTC (rev 10113)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java 2007-07-26 20:23:29 UTC (rev 10114)
@@ -53,7 +53,8 @@
private FObj parent;
/** The children of this object. */
- private List<FObj> children = new ArrayList<FObj>();
+ private List<CharacterSequence4a> children =
+ new ArrayList<CharacterSequence4a>(1);
/**
* Constructor.
@@ -96,30 +97,12 @@
throwException(this.getFullName() + " must have exactly one "
+ "child.");
}
- if (! (this.getChildren().get(0) instanceof CharacterSequence4a)) {
- throwException(this.getFullName() + " child must be #PCDATA.");
- }
}
/**
- * Returns the text of this bookmark title.
- * @return The text of this title.
- */
- public CharacterSequence4a getText() {
- /* Existence and cast verified in end(). */
- return (CharacterSequence4a) this.getChildren().get(0);
- }
-
/**
* {@inheritDoc}
*/
- public char[] getContent() {
- return getText().getAreaTreeText(null);
- }
-
- /**
- * {@inheritDoc}
- */
public String getName() {
return "bookmark-title";
}
@@ -195,22 +178,28 @@
/**
* {@inheritDoc}
*/
- public List<FObj> getChildren() {
+ public List<CharacterSequence4a> getChildren() {
return this.children;
}
/**
* {@inheritDoc}
*/
- public void addTextNode(final CharacterSequence4a textNode) {
+ public void addTextNode(final CharacterSequence4a textNode)
+ throws FoTreeException {
+ if (this.children.size() > 0) {
+ textNode.throwException("BookmarkTitle should have exactly one "
+ + "child.");
+ }
this.children.add(textNode);
}
/**
* {@inheritDoc}
*/
- public void addNonTextNode(final FObj nonTextNode) {
- this.children.add(nonTextNode);
+ public void addNonTextNode(final FObj nonTextNode) throws FoTreeException {
+ nonTextNode.throwException("Violates BookmarkTitle content model: "
+ + "(#PCDATA)");
}
/**
@@ -241,4 +230,11 @@
return this.getParent().getPrimaryFont(context);
}
+ /**
+ * {@inheritDoc}
+ */
+ public CharacterSequence4a getChildAt(final int index) {
+ return this.children.get(index);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-27 19:35:15
|
Revision: 10120
http://foray.svn.sourceforge.net/foray/?rev=10120&view=rev
Author: victormote
Date: 2007-07-27 12:35:18 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
Conform to axsl changes replacing some AreaTree interfaces with more generic interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -43,7 +43,7 @@
*/
public final class ExternalGraphicArea extends AbstractInlineArea
implements org.axsl.galley.ExternalGraphicArea,
- org.axsl.area.ExternalGraphicArea {
+ org.axsl.area.NormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -45,7 +45,7 @@
*/
public final class ForeignObjectArea extends AbstractInlineArea
implements org.axsl.galley.ForeignObjectArea,
- org.axsl.area.ForeignObjectArea {
+ org.axsl.area.NormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -52,7 +52,7 @@
*/
public final class InlineArea extends AbstractInlineArea
implements org.axsl.galley.InlineArea,
- org.axsl.area.InlineArea {
+ org.axsl.area.AncestralNormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -77,7 +77,7 @@
*/
public final class LeaderArea extends AbstractInlineArea
implements org.axsl.galley.LeaderArea,
- org.axsl.area.LeaderArea {
+ org.axsl.area.AncestralNormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -45,7 +45,7 @@
*/
public final class PageNumberArea extends AbstractInlineArea
implements org.axsl.galley.TextArea,
- org.axsl.area.PageNumberArea {
+ org.axsl.area.NormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -45,7 +45,7 @@
*/
public final class PageNumberCitationArea extends AbstractInlineArea
implements org.axsl.galley.TextArea,
- org.axsl.area.PageNumberCitationArea {
+ org.axsl.area.NormalInlineArea {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java 2007-07-27 16:22:56 UTC (rev 10119)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/InlinePL.java 2007-07-27 19:35:18 UTC (rev 10120)
@@ -28,10 +28,10 @@
package org.foray.pioneer;
+import org.axsl.area.AncestralNormalInlineArea;
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
import org.axsl.area.BlockContentFactory;
-import org.axsl.area.InlineArea;
import org.axsl.area.LineArea;
import org.axsl.area.LineContentFactory;
import org.axsl.area.NormalBlockArea;
@@ -97,7 +97,7 @@
/* Not enough room on the page for this. */
return Status.AREA_FULL_NONE;
}
- final InlineArea inlineArea =
+ final AncestralNormalInlineArea inlineArea =
lineContentFactory.makeInlineArea(this.realFONode,
graftingPoint);
this.getLayout().pushInlineStack(inlineArea);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-27 20:58:49
|
Revision: 10121
http://foray.svn.sourceforge.net/foray/?rev=10121&view=rev
Author: victormote
Date: 2007-07-27 13:58:47 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving getters for high-level servers and factories from AreaNode to AreaTree and Galley.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.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
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-27 19:35:18 UTC (rev 10120)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-27 20:58:47 UTC (rev 10121)
@@ -37,8 +37,7 @@
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Table;
import org.axsl.fo.fo.prop.ColorPa;
-import org.axsl.font.FontConsumer;
-import org.axsl.text.TextServer;
+import org.axsl.galley.Galley;
import org.apache.commons.logging.Log;
@@ -250,6 +249,14 @@
}
/**
+ * Returns the ancestor Galley for this area.
+ * @return The ancestor Galley for this area.
+ */
+ public Galley getGalley() {
+ return getParent().getGalley();
+ }
+
+ /**
* {@inheritDoc}
*/
public Area ancestorArea() {
@@ -380,20 +387,6 @@
}
/**
- * {@inheritDoc}
- */
- public FontConsumer getFontConsumer() {
- return getParent().getFontConsumer();
- }
-
- /**
- * {@inheritDoc}
- */
- public TextServer getTextServer() {
- return getParent().getTextServer();
- }
-
- /**
* Return the logger.
* @return The logger.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-27 19:35:18 UTC (rev 10120)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-27 20:58:47 UTC (rev 10121)
@@ -39,6 +39,7 @@
import org.axsl.fo.fo.PageSequence;
import org.axsl.fo.fo.Root;
import org.axsl.font.FontConsumer;
+import org.axsl.galley.Galley;
import org.axsl.galley.RenderVisitor;
import org.axsl.text.TextServer;
@@ -230,13 +231,21 @@
/**
* {@inheritDoc}
- * Overrides the method in Area, because this is the object being sought.
+ * Overrides the superclass method, because this is the object being sought.
*/
public AreaTree getAreaTree() {
return this;
}
/**
+ * {@inheritDoc}
+ * Overrides the superclass method, because this is the object being sought.
+ */
+ public Galley getGalley() {
+ return this;
+ }
+
+ /**
* Retrieves the FObj instance that is associated with id.
* @param id The id whose FObj instance is sought.
* @return The FObj instance that is associated with id.
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-27 19:35:18 UTC (rev 10120)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-27 20:58:47 UTC (rev 10121)
@@ -29,6 +29,7 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTree;
import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
import org.axsl.area.NormalBlockArea;
@@ -40,7 +41,9 @@
import org.axsl.fo.FoLineText;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.TableCell;
+import org.axsl.font.FontConsumer;
import org.axsl.text.TextException;
+import org.axsl.text.TextServer;
import org.axsl.text.line.EagerLineBreaker;
import org.apache.commons.logging.Log;
@@ -220,8 +223,11 @@
}
EagerLineBreaker lb = this.layout.getLineBreaker();
if (lb == null) {
- lb = lineArea.getTextServer().provideEagerLineBreaker(null,
- this.layout, lineArea.getFontConsumer());
+ final AreaTree areaTree = lineArea.getAreaTree();
+ final TextServer textServer = areaTree.getTextServer();
+ final FontConsumer fontConsumer = areaTree.getFontConsumer();
+ lb = textServer.provideEagerLineBreaker(null, this.layout,
+ fontConsumer);
}
int status = 0;
final FoLineText contextAware = lineText.getContextWrapper(
@@ -255,8 +261,11 @@
throws AreaTreeException {
EagerLineBreaker lb = this.layout.getLineBreaker();
if (lb == null) {
- lb = lineArea.getTextServer().provideEagerLineBreaker(null,
- this.layout, lineArea.getFontConsumer());
+ final AreaTree areaTree = lineArea.getAreaTree();
+ final TextServer textServer = areaTree.getTextServer();
+ final FontConsumer fontConsumer = areaTree.getFontConsumer();
+ lb = textServer.provideEagerLineBreaker(null,
+ this.layout, fontConsumer);
}
int status = 0;
final FoLineNonText contextAware = nonText.getContextWrapper(
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-07-27 19:35:18 UTC (rev 10120)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-07-27 20:58:47 UTC (rev 10121)
@@ -259,7 +259,7 @@
final Rectangle2D.Float pdfClipRectangle = convertMillipointRectangle(
clipRectangle);
getContentStream().drawGraphic(image, pdfContentRectangle,
- pdfClipRectangle, area.getFontConsumer(), getStrokeSVGText());
+ pdfClipRectangle, this.getFontConsumer(), getStrokeSVGText());
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-07-27 19:35:18 UTC (rev 10120)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-07-27 20:58:47 UTC (rev 10121)
@@ -552,7 +552,7 @@
+ " translate");
this.write(sx * at.getScaleX() + " " + sy * at.getScaleY()
+ " scale");
- svgGraphic.drawPs(this.getOutputStream(), area.getFontConsumer(), false,
+ svgGraphic.drawPs(this.getOutputStream(), this.getFontConsumer(), false,
this.enableComments);
this.write("grestore");
this.comment("% --- SVG Area end");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-28 17:59:13
|
Revision: 10126
http://foray.svn.sourceforge.net/foray/?rev=10126&view=rev
Author: victormote
Date: 2007-07-28 10:59:14 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
Conform to axsl changes renaming an interface and method, and reordering the parameters of that method.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java 2007-07-28 00:19:46 UTC (rev 10125)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java 2007-07-28 17:59:14 UTC (rev 10126)
@@ -80,8 +80,8 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final CharacterContent foText,
- final int ipd, final int startOffset, final int sizeInChars,
+ public TextArea makeGlyphAreaSequence(final CharacterContent foText,
+ final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
final GraftingPoint graftingPoint) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-28 00:19:46 UTC (rev 10125)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-28 17:59:14 UTC (rev 10126)
@@ -1005,8 +1005,8 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final CharacterContent foText,
- final int ipd, final int startOffset, final int sizeInChars,
+ public TextArea makeGlyphAreaSequence(final CharacterContent foText,
+ final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
final GraftingPoint graftingPoint) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-28 00:19:46 UTC (rev 10125)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-28 17:59:14 UTC (rev 10126)
@@ -64,7 +64,7 @@
* However , a TextSegment always springs from exactly one FOText node.
*/
public final class TextArea extends AbstractInlineArea
- implements org.axsl.galley.TextArea, org.axsl.area.TextArea {
+ implements org.axsl.galley.TextArea, org.axsl.area.GlyphAreaSequence {
/** The parent of this node. The parent can be either a {@link LineArea}
* or another {@link AbstractInlineArea}. */
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-28 00:19:46 UTC (rev 10125)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-28 17:59:14 UTC (rev 10126)
@@ -151,7 +151,8 @@
}
if (textToUse instanceof CharacterContent) {
final CharacterContent foText = (CharacterContent) textToUse;
- factory.makeTextArea(foText, sizeInline, startOffset, sizeInChars,
+ factory.makeGlyphAreaSequence(foText, startOffset, sizeInChars,
+ sizeInline,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
graftingPoint);
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-28 18:07:00
|
Revision: 10127
http://foray.svn.sourceforge.net/foray/?rev=10127&view=rev
Author: victormote
Date: 2007-07-28 11:07:02 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
Conform to axsl change renaming interface.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractAncestralInlineArea.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -31,7 +31,7 @@
import org.axsl.area.AreaTreeException;
import org.axsl.fo.fo.BasicLink;
import org.axsl.fo.fo.BidiOverride;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.IndexPageCitationList;
@@ -80,7 +80,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeGlyphAreaSequence(final CharacterContent foText,
+ public TextArea makeGlyphAreaSequence(final CharacterSequence foText,
final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -44,7 +44,7 @@
import org.axsl.fo.fo.BasicLink;
import org.axsl.fo.fo.BidiOverride;
import org.axsl.fo.fo.Block;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.IndexPageCitationList;
@@ -966,7 +966,7 @@
* @param context An object that knows how to resolve FO context issues.
* @return True iff a text area should be created for the text item.
*/
- static boolean shouldCreateTextArea(final CharacterContent foText,
+ static boolean shouldCreateTextArea(final CharacterSequence foText,
final Area parentArea, final int startOffset, final int sizeInChars,
final boolean isLastItemOnLine, final FoContext context) {
/* If the raw text is empty, don't create the TextArea. */
@@ -1005,7 +1005,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeGlyphAreaSequence(final CharacterContent foText,
+ public TextArea makeGlyphAreaSequence(final CharacterSequence foText,
final int startOffset, final int sizeInChars, final int ipd,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -35,7 +35,7 @@
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fo.Fo;
import org.axsl.fo.fo.Block;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
@@ -158,7 +158,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final CharacterContent generatedBy,
+ static TextArea makeTextArea(final CharacterSequence generatedBy,
final LineArea parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -203,7 +203,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final CharacterContent generatedBy,
+ static TextArea makeTextArea(final CharacterSequence generatedBy,
final AbstractInlineArea parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -329,12 +329,12 @@
* Returns the raw value of the text content backing this area.
* @return The text content backing this area.
*/
- public CharacterContent getTextContent() {
+ public CharacterSequence getTextContent() {
/* Do NOT use the traitGeneratedBy() method here, because we need the
* raw value, and this class overrides that method. */
final Fo foNode = this.getLinkage().getFONode();
/* Cast verified at construction. */
- return (CharacterContent) foNode;
+ return (CharacterSequence) foNode;
}
/**
@@ -736,7 +736,7 @@
* Overrides the Area method because it needs to handle faux-small-caps.
*/
public int traitFontSize() {
- final CharacterContent generatedBy = this.traitGeneratedBy();
+ final CharacterSequence generatedBy = this.traitGeneratedBy();
final int nominalFontSize = generatedBy.traitFontSize(this);
if (this.hasFauxSmallCaps) {
final FontUse fontUse = getPrimaryFont();
@@ -755,8 +755,8 @@
/**
* {@inheritDoc}
*/
- public CharacterContent traitGeneratedBy() {
- return (CharacterContent) this.getLinkage().getFONode();
+ public CharacterSequence traitGeneratedBy() {
+ return (CharacterSequence) this.getLinkage().getFONode();
}
/**
@@ -830,8 +830,8 @@
public int traitHyphenationCharacter() {
/* TODO: Clean this method up after we clean up the construction. */
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof CharacterContent) {
- final CharacterContent character = (CharacterContent) generatedBy;
+ if (generatedBy instanceof CharacterSequence) {
+ final CharacterSequence character = (CharacterSequence) generatedBy;
return character.traitHyphenationCharacter(this);
} else {
final NormalBlockArea blockArea = this.ancestorNormalBlockArea();
@@ -846,10 +846,10 @@
* @return The "generated-by" Character, or null if this area was not
* generated by an fo:character.
*/
- private CharacterContent generatedByCharacter() {
+ private CharacterSequence generatedByCharacter() {
final Fo generatedBy = this.traitGeneratedBy();
- if (generatedBy instanceof CharacterContent) {
- return (CharacterContent) generatedBy;
+ if (generatedBy instanceof CharacterSequence) {
+ return (CharacterSequence) generatedBy;
}
return null;
}
@@ -858,7 +858,7 @@
* {@inheritDoc}
*/
public int traitSpaceStartOptimum() {
- final CharacterContent character = this.generatedByCharacter();
+ final CharacterSequence character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
@@ -870,7 +870,7 @@
* {@inheritDoc}
*/
public int traitSpaceEndOptimum() {
- final CharacterContent character = this.generatedByCharacter();
+ final CharacterSequence character = this.generatedByCharacter();
if (character == null) {
return 0;
} else {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -48,7 +48,8 @@
/**
* A "character" object in XSL-FO.
*/
-public class Character extends FObj implements org.axsl.fo.fo.CharacterContent {
+public class Character extends FObj
+ implements org.axsl.fo.fo.CharacterSequence {
/** The parent of this node. */
private FObj parent;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -44,7 +44,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.font.Font;
@@ -56,7 +56,7 @@
/**
* A text node in the formatting object tree.
*/
-public class CharacterSequence4a extends FObj implements CharacterContent {
+public class CharacterSequence4a extends FObj implements CharacterSequence {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -37,7 +37,7 @@
import org.axsl.area.RegionRefArea;
import org.axsl.fo.FoLineNonText;
import org.axsl.fo.FoLineText;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -149,8 +149,8 @@
if (this.areaStack.size() > 0) {
factory = this.areaStack.peek();
}
- if (textToUse instanceof CharacterContent) {
- final CharacterContent foText = (CharacterContent) textToUse;
+ if (textToUse instanceof CharacterSequence) {
+ final CharacterSequence foText = (CharacterSequence) textToUse;
factory.makeGlyphAreaSequence(foText, startOffset, sizeInChars,
sizeInline,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -32,23 +32,23 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
import org.axsl.fo.FoLineText;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.GraftingPoint;
/**
- * Pioneer Layout for {@link CharacterContent}.
+ * Pioneer Layout for {@link CharacterSequence}.
*/
public class FOTextPL extends FONodePL {
/** The real FONode which this proxy represents. */
- private CharacterContent node;
+ private CharacterSequence node;
/**
* Constructor.
* @param text The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public FOTextPL(final CharacterContent text, final PioneerLS layout) {
+ public FOTextPL(final CharacterSequence text, final PioneerLS layout) {
super(text, layout);
this.node = text;
}
@@ -103,7 +103,7 @@
/**
* {@inheritDoc}
*/
- public CharacterContent getFONode() {
+ public CharacterSequence getFONode() {
return this.node;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-28 17:59:14 UTC (rev 10126)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-28 18:07:02 UTC (rev 10127)
@@ -46,7 +46,7 @@
import org.axsl.fo.fo.BlockContainer;
import org.axsl.fo.fo.Bookmark;
import org.axsl.fo.fo.BookmarkTitle;
-import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ColorProfile;
import org.axsl.fo.fo.Declarations;
import org.axsl.fo.fo.ExternalGraphic;
@@ -391,7 +391,7 @@
/**
* {@inheritDoc}
*/
- public FOTextPL makeProxy(final CharacterContent node) {
+ public FOTextPL makeProxy(final CharacterSequence node) {
return new FOTextPL(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-30 14:01:32
|
Revision: 10135
http://foray.svn.sourceforge.net/foray/?rev=10135&view=rev
Author: victormote
Date: 2007-07-30 07:01:32 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
1. Add test for font-size-adjust.
2. Add test for resolved font-family.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/resource/test/fo/font-family-001.fo
trunk/foray/resource/test/fo/font-size-001.fo
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java 2007-07-29 00:58:20 UTC (rev 10134)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java 2007-07-30 14:01:32 UTC (rev 10135)
@@ -34,6 +34,8 @@
import org.foray.fotree.fo.obj.Block;
import org.foray.fotree.fo.obj.Flow;
+import org.axsl.font.Font;
+
/**
* Tests of various font properties at the FO Tree level.
*/
@@ -62,7 +64,10 @@
block = (Block) node;
fontFamilies = block.traitFontFamily(null);
assertEquals(1, fontFamilies.length);
- assertEquals("Courier", fontFamilies[0]);
+ assertEquals("Base14-Courier", fontFamilies[0]);
+
+ final Font font = block.getPrimaryFont(null).getFont();
+ assertEquals("Courier", font.getFontName());
}
/**
@@ -86,6 +91,23 @@
block = (Block) node;
fontSize = block.traitFontSize(null);
assertEquals(8000, fontSize);
+
+ node = flow.getChildAt(2);
+ assertTrue(node instanceof Block);
+ block = (Block) node;
+ final Font font = node.getPrimaryFont(null).getFont();
+ assertEquals("Courier", font.getFamilyName());
+ assertEquals(426, font.getXHeight(1000));
+ final int nominalFontSize = block.traitFontSize(null);
+ /* The nominal font-size is 10 pts. */
+ assertEquals(10000, nominalFontSize);
+ /* The font-size-adjust is .6. */
+ final double fontSizeAdjust = block.traitFontSizeAdjust(null);
+ assertEquals(.6, fontSizeAdjust, .001);
+ /* Actual font size computation, using a basis factor of 1000.
+ * 600 / 426 * 10000 = 14085. */
+ fontSize = block.traitFontSizeActual(null, font);
+ assertEquals(14085, fontSize);
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-29 00:58:20 UTC (rev 10134)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-30 14:01:32 UTC (rev 10135)
@@ -3762,7 +3762,8 @@
return nominalFontSize;
}
final int xHeight = font.getXHeight(nominalFontSize);
- final double fontAspectRatio = xHeight / nominalFontSize;
+ final double fontAspectRatio = (float) xHeight
+ / (float) nominalFontSize;
return (int) Math.round(fontSizeAdjust / fontAspectRatio
* nominalFontSize);
}
Modified: trunk/foray/resource/test/fo/font-family-001.fo
===================================================================
--- trunk/foray/resource/test/fo/font-family-001.fo 2007-07-29 00:58:20 UTC (rev 10134)
+++ trunk/foray/resource/test/fo/font-family-001.fo 2007-07-30 14:01:32 UTC (rev 10135)
@@ -20,7 +20,7 @@
<fo:block>The default font.</fo:block>
<fo:block
- font-family="Courier">font-family: Courier.</fo:block>
+ font-family="Base14-Courier">font-family: Base14-Courier.</fo:block>
</fo:flow>
Modified: trunk/foray/resource/test/fo/font-size-001.fo
===================================================================
--- trunk/foray/resource/test/fo/font-size-001.fo 2007-07-29 00:58:20 UTC (rev 10134)
+++ trunk/foray/resource/test/fo/font-size-001.fo 2007-07-30 14:01:32 UTC (rev 10135)
@@ -22,10 +22,17 @@
flow-name="xsl-region-body">
<fo:block>This block is the default font size and default font.</fo:block>
+
<fo:block
font-family="Courier"
font-size="8pt">This block is Courier, 8 points.</fo:block>
+<fo:block font-family="Base14-Courier" font-size="10pt"
+ font-size-adjust=".6">This block is Base14-Courier, font-size="10 points",
+and font-size-adjust=".6". Since the x-height for Courier is 426, the actual
+font-size for this block should be</fo:block>
+
+
</fo:flow>
</fo:page-sequence>
</fo:root>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-08-03 22:10:45
|
Revision: 10139
http://foray.svn.sourceforge.net/foray/?rev=10139&view=rev
Author: victormote
Date: 2007-08-03 15:10:41 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
Fix build scripts for change in name of hyphenation directory.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2007-08-03 19:37:59 UTC (rev 10138)
+++ trunk/foray/foray-app/scripts/build.xml 2007-08-03 22:10:41 UTC (rev 10139)
@@ -53,7 +53,7 @@
<fileset dir="${foray.sandbox}/foray-pdf/build/ant">
<include name="*.jar"/>
</fileset>
- <fileset dir="${foray.sandbox}/foray-hyphen-r/build/ant">
+ <fileset dir="${foray.sandbox}/foray-hyphen/build/ant">
<include name="*.jar"/>
</fileset>
<fileset dir="${foray.sandbox}/foray-text/build/ant">
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2007-08-03 19:37:59 UTC (rev 10138)
+++ trunk/foray/scripts/build.xml 2007-08-03 22:10:41 UTC (rev 10139)
@@ -32,8 +32,7 @@
<mkdir dir="${foray.sandbox}/foray-pdf/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-font/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-speech/build/ant/classes"/>
- <mkdir dir="${foray.sandbox}/foray-hyphen-r/build/ant/classes"/>
- <mkdir dir="${foray.sandbox}/foray-hyphen-r/build/ant"/>
+ <mkdir dir="${foray.sandbox}/foray-hyphen/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-text/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-fotree/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-areatree/build/ant/classes"/>
@@ -106,7 +105,7 @@
<include name="**"/>
</fileset>
<fileset id="foray-hyphen-classes"
- dir="${foray.sandbox}/foray-hyphen-r/build/ant/classes">
+ dir="${foray.sandbox}/foray-hyphen/build/ant/classes">
<include name="**"/>
</fileset>
<fileset id="foray-text-classes"
@@ -268,7 +267,7 @@
<fileset dir="${foray.sandbox}/foray-font/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-fotree/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-graphic/build/ant" includes="foray*.jar"/>
- <fileset dir="${foray.sandbox}/foray-hyphen-r/build/ant" includes="foray*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-hyphen/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-layout/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-mif/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-output/build/ant" includes="foray*.jar"/>
@@ -387,7 +386,7 @@
<pathelement path="${foray.sandbox}/foray-graphic/src/java"/>
<pathelement path="${foray.sandbox}/foray-font/src/java"/>
<pathelement path="${foray.sandbox}/foray-speech/src/java"/>
- <pathelement path="${foray.sandbox}/foray-hyphen-r/src/java"/>
+ <pathelement path="${foray.sandbox}/foray-hyphen/src/java"/>
<pathelement path="${foray.sandbox}/foray-fotree/src/java"/>
<pathelement path="${foray.sandbox}/foray-areatree/src/java"/>
<pathelement path="${foray.sandbox}/foray-layout/src/java"/>
@@ -526,7 +525,7 @@
inheritall="false"
target="clean"/>
- <ant antfile="${foray.sandbox}/foray-hyphen-r/scripts/build.xml"
+ <ant antfile="${foray.sandbox}/foray-hyphen/scripts/build.xml"
inheritall="false"
target="clean"/>
@@ -596,7 +595,7 @@
<ant antfile="${foray.sandbox}/foray-speech/scripts/build.xml"
inheritall="false"
target="style"/>
- <ant antfile="${foray.sandbox}/foray-hyphen-r/scripts/build.xml"
+ <ant antfile="${foray.sandbox}/foray-hyphen/scripts/build.xml"
inheritall="false"
target="style"/>
<ant antfile="${foray.sandbox}/foray-text/scripts/build.xml"
@@ -727,7 +726,7 @@
<target name="hyphen" depends="common"
description="Compile the hyphen module">
<property name="module.hyphen" value=", hyphen"/>
- <ant antfile="${foray.sandbox}/foray-hyphen-r/scripts/build.xml"
+ <ant antfile="${foray.sandbox}/foray-hyphen/scripts/build.xml"
inheritall="false"
target="style">
<property name="foray.config" value="${foray.config}"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-08-04 02:19:54
|
Revision: 10144
http://foray.svn.sourceforge.net/foray/?rev=10144&view=rev
Author: victormote
Date: 2007-08-03 19:19:53 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
Point Eclipse projects to the lib-build version of Ant instead of a user-configured version.
Modified Paths:
--------------
trunk/foray/foray-app/.classpath
trunk/foray/foray-font/.classpath
trunk/foray/foray-hyphen/.classpath
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2007-08-04 01:34:13 UTC (rev 10143)
+++ trunk/foray/foray-app/.classpath 2007-08-04 02:19:53 UTC (rev 10144)
@@ -18,11 +18,8 @@
<classpathentry kind="src" path="/axslText"/>
<classpathentry kind="src" path="/FOrayText"/>
<classpathentry kind="src" path="/FOrayFOTree"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
<classpathentry kind="src" path="/axslPdf"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPDF"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant-launcher.jar"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant-trax.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayLayout"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslLayout"/>
@@ -42,5 +39,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOraySpeech"/>
<classpathentry kind="lib" path="/FOray Lib/foray-hyphen-0.3-rsrc.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-font/.classpath
===================================================================
--- trunk/foray/foray-font/.classpath 2007-08-04 01:34:13 UTC (rev 10143)
+++ trunk/foray/foray-font/.classpath 2007-08-04 02:19:53 UTC (rev 10144)
@@ -9,11 +9,11 @@
<classpathentry kind="src" path="/axslPs"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPretty"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/foray-font-0.3-rsrc.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-hyphen/.classpath
===================================================================
--- trunk/foray/foray-hyphen/.classpath 2007-08-04 01:34:13 UTC (rev 10143)
+++ trunk/foray/foray-hyphen/.classpath 2007-08-04 02:19:53 UTC (rev 10144)
@@ -4,12 +4,12 @@
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/icu4j_3_4_3.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-08-07 22:45:25
|
Revision: 10148
http://foray.svn.sourceforge.net/foray/?rev=10148&view=rev
Author: victormote
Date: 2007-08-07 15:45:27 -0700 (Tue, 07 Aug 2007)
Log Message:
-----------
Integrate more JUnit testing into the Ant build.
Modified Paths:
--------------
trunk/foray/foray-app/scripts/build.xml
trunk/foray/foray-areatree/scripts/build.xml
trunk/foray/foray-common/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-hyphen/scripts/build.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-app/scripts/build.xml
===================================================================
--- trunk/foray/foray-app/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-app/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,10 +12,14 @@
<property name="module" value="app"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -110,7 +114,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -120,8 +124,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -129,9 +132,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -164,7 +169,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -183,6 +188,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-areatree/scripts/build.xml
===================================================================
--- trunk/foray/foray-areatree/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-areatree/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,15 +12,22 @@
<property name="module" value="areatree"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<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="svg-*.jar"/>
<include name="axsl*.jar"/>
@@ -62,7 +69,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -72,8 +79,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -81,9 +87,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -121,7 +129,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -140,6 +148,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-common/scripts/build.xml
===================================================================
--- trunk/foray/foray-common/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-common/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,15 +12,22 @@
<property name="module" value="common"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<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="axsl*.jar"/>
<include name="commons-logging-*.jar"/>
@@ -59,7 +66,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -69,8 +76,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -78,9 +84,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -118,7 +126,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -137,6 +145,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-font/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,10 +12,14 @@
<property name="module" value="font"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<property name="resource.dir" value="${module.dir}/resource"/>
<property name="base14.source" value="${resource.dir}/base-14"/>
@@ -26,6 +30,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="xercesImpl*.jar"/>
<include name="axsl*.jar"/>
@@ -185,7 +192,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -204,6 +211,35 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-fotree/scripts/build.xml
===================================================================
--- trunk/foray/foray-fotree/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-fotree/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -188,4 +188,4 @@
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-graphic/scripts/build.xml
===================================================================
--- trunk/foray/foray-graphic/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-graphic/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,15 +12,22 @@
<property name="module" value="graphic"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<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="axsl*.jar"/>
<include name="batik*.jar"/>
@@ -67,7 +74,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -77,8 +84,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -86,9 +92,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -126,7 +134,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -145,6 +153,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
<!-- Last Line of $RCSfile$ -->
Modified: trunk/foray/foray-hyphen/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/foray-hyphen/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -12,10 +12,14 @@
<property name="module" value="hyphen"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<property name="resource.dir" value="${module.dir}/resource"/>
<property name="hyph.source" value="${resource.dir}/hyph-patterns"/>
@@ -26,6 +30,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="axsl*.jar"/>
<include name="commons-logging-*.jar"/>
@@ -109,7 +116,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -131,9 +138,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -171,7 +180,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -190,6 +199,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
<!-- Last Line of File. -->
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2007-08-07 21:49:56 UTC (rev 10147)
+++ trunk/foray/scripts/build.xml 2007-08-07 22:45:27 UTC (rev 10148)
@@ -36,6 +36,27 @@
<fileset dir="${foray.sandbox}/foray-text/build/ant" includes="foray*.jar"/>
</path>
+ <path id="test.jars">
+ <fileset dir="${foray.sandbox}/foray-app/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-areatree/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-common/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-core/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-font/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-fotree/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-graphic/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-hyphen/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-layout/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-mif/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-output/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-pdf/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-pioneer/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-pretty/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-ps/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-render/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-speech/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-text/build/ant" includes="test*.jar"/>
+ </path>
+
</target>
<!-- =================================================================== -->
@@ -916,15 +937,11 @@
<formatter type="brief" usefile="false"/>
<classpath>
<fileset refid="junit.jar"/>
- <fileset dir="${foray.sandbox}/foray-fotree/build/ant">
- <include name="test*.jar"/>
- </fileset>
+ <path refid="test.jars"/>
<path refid="distribution.jars"/>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
+ <fileset dir="${lib.dir}" includes="*.jar"/>
</classpath>
- <test name="org.foray.fotree.TestFOrayFOTree"/>
+ <test name="org.foray.app.TestFOrayAll"/>
</junit>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-08-07 23:19:08
|
Revision: 10150
http://foray.svn.sourceforge.net/foray/?rev=10150&view=rev
Author: victormote
Date: 2007-08-07 16:19:03 -0700 (Tue, 07 Aug 2007)
Log Message:
-----------
1. Add remaining JUnit logic to Ant build files.
2. Rename testing class for the hyphenation package.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java
trunk/foray/foray-hyphen/scripts/build.xml
trunk/foray/foray-ps/scripts/build.xml
trunk/foray/foray-render/scripts/build.xml
trunk/foray/scripts/build.xml
Added Paths:
-----------
trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphen.java
Removed Paths:
-------------
trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphenR.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-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/TestFOrayAll.java 2007-08-07 23:19:03 UTC (rev 10150)
@@ -33,7 +33,7 @@
import org.foray.font.TestFOrayFont;
import org.foray.fotree.TestFOrayFOTree;
import org.foray.graphic.TestFOrayGraphic;
-import org.foray.hyphen.TestFOrayHyphenR;
+import org.foray.hyphen.TestFOrayHyphen;
import org.foray.ps.TestFOrayPS;
import org.foray.render.TestFOrayRender;
@@ -55,7 +55,7 @@
testSuite.addTest(TestFOrayPS.suite());
testSuite.addTest(TestFOrayFont.suite());
testSuite.addTest(TestFOrayGraphic.suite());
- testSuite.addTest(TestFOrayHyphenR.suite());
+ testSuite.addTest(TestFOrayHyphen.suite());
testSuite.addTest(TestFOrayFOTree.suite());
testSuite.addTest(TestFOrayAreaTree.suite());
testSuite.addTest(TestFOrayRender.suite());
Modified: trunk/foray/foray-hyphen/scripts/build.xml
===================================================================
--- trunk/foray/foray-hyphen/scripts/build.xml 2007-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/foray-hyphen/scripts/build.xml 2007-08-07 23:19:03 UTC (rev 10150)
@@ -32,6 +32,7 @@
</fileset>
<fileset dir="${build.lib.dir}">
<include name="junit/*.jar"/>
+ <include name="axsl/axsl-dev*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="axsl*.jar"/>
Copied: trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphen.java (from rev 9960, trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphenR.java)
===================================================================
--- trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphen.java (rev 0)
+++ trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphen.java 2007-08-07 23:19:03 UTC (rev 10150)
@@ -0,0 +1,59 @@
+/*
+ * 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.hyphen;
+
+import org.foray.hyphen.util.TestNaturalLanguage;
+import org.foray.hyphen.util.TestWordList;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Handles testing for the FOrayHyphen module.
+ */
+public class TestFOrayHyphen 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);
+ testSuite.addTestSuite(TestFOrayHyphenationServer.class);
+
+ testSuite.addTestSuite(TestNaturalLanguage.class);
+ testSuite.addTestSuite(TestWordList.class);
+
+ return testSuite;
+ }
+
+}
Deleted: trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphenR.java
===================================================================
--- trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphenR.java 2007-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/foray-hyphen/src/javatest/org/foray/hyphen/TestFOrayHyphenR.java 2007-08-07 23:19:03 UTC (rev 10150)
@@ -1,59 +0,0 @@
-/*
- * 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.hyphen;
-
-import org.foray.hyphen.util.TestNaturalLanguage;
-import org.foray.hyphen.util.TestWordList;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Handles testing for the FOrayHyphen 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);
- testSuite.addTestSuite(TestFOrayHyphenationServer.class);
-
- testSuite.addTestSuite(TestNaturalLanguage.class);
- testSuite.addTestSuite(TestWordList.class);
-
- return testSuite;
- }
-
-}
Modified: trunk/foray/foray-ps/scripts/build.xml
===================================================================
--- trunk/foray/foray-ps/scripts/build.xml 2007-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/foray-ps/scripts/build.xml 2007-08-07 23:19:03 UTC (rev 10150)
@@ -12,10 +12,14 @@
<property name="module" value="ps"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
@@ -63,7 +67,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -73,8 +77,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -82,9 +85,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -122,7 +127,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -145,6 +150,35 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
</project>
-<!-- Last Line of $RCSfile$ -->
+<!-- Last Line of Script -->
Modified: trunk/foray/foray-render/scripts/build.xml
===================================================================
--- trunk/foray/foray-render/scripts/build.xml 2007-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/foray-render/scripts/build.xml 2007-08-07 23:19:03 UTC (rev 10150)
@@ -12,10 +12,15 @@
<property name="module" value="render"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
+ <property name="test-src.dir" value="${module.dir}/src/javatest"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
<property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="test-classes.dir" value="${build.dir}/test-classes"/>
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="test-jar.file"
+ location="${build.dir}/test-${name.lowercase}-${module}-${version}.jar"/>
+
<property name="viewer.resources.src.dir"
value="${src.dir}/org/foray/render/awt/viewer/resources"/>
<property name="viewer.images.src.dir"
@@ -29,6 +34,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="axsl*.jar"/>
<include name="commons-logging-*.jar"/>
@@ -87,7 +95,7 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the class package -->
+ <!-- Creates the jar file. -->
<!-- =================================================================== -->
<target name="package" depends="compile"
description="Generates the jar files (default target)">
@@ -97,8 +105,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${jar.file}"
- basedir="${classes.dir}"
- >
+ basedir="${classes.dir}">
<manifest>
<attribute name="Implementation-Title" value="${name}-${module}"/>
<attribute name="Implementation-Version" value="${version}"/>
@@ -106,9 +113,11 @@
value="${contact.info}"/>
</manifest>
</jar>
-
</target>
+ <!-- =================================================================== -->
+ <!-- Creates the API javadoc. -->
+ <!-- =================================================================== -->
<target name="javadoc-api" depends="init" description="Creates API
documentation">
<echo message="Producing the javadoc files "/>
@@ -146,7 +155,7 @@
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
- <target name="style" depends="package" description="Runs checkstyle"
+ <target name="style" depends="package-test" description="Runs checkstyle"
if="checkstyle.home">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
@@ -165,6 +174,36 @@
</checkstyle>
</target>
+ <!-- =================================================================== -->
+ <!-- Compiles the JUnit tests. -->
+ <!-- =================================================================== -->
+ <target name="compile-test" depends="package">
+ <echo message="Compiling the test classes."/>
+ <!-- create directories -->
+ <mkdir dir="${test-classes.dir}"/>
+ <javac destdir="${test-classes.dir}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="${source}">
+ <src path="${test-src.dir}"/>
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path location="${jar.file}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates a jar file for the JUnit test classes. -->
+ <!-- =================================================================== -->
+ <target name="package-test" depends="compile-test"
+ description="Generates the jar files (default target)">
+ <echo message="Creating the jar file ${test-jar.file}"/>
+ <jar jarfile="${test-jar.file}"
+ basedir="${test-classes.dir}"/>
+ </target>
+
</project>
<!-- Last Line of $RCSfile$ -->
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2007-08-07 22:49:33 UTC (rev 10149)
+++ trunk/foray/scripts/build.xml 2007-08-07 23:19:03 UTC (rev 10150)
@@ -940,6 +940,9 @@
<path refid="test.jars"/>
<path refid="distribution.jars"/>
<fileset dir="${lib.dir}" includes="*.jar"/>
+ <fileset dir="${build.lib.dir}">
+ <include name="axsl/axsl-dev*.jar"/>
+ </fileset>
</classpath>
<test name="org.foray.app.TestFOrayAll"/>
</junit>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|