aXSL: Release Notes, Release 0.2, Java
See Release Notes for other Release Notes.
Highlights
- Addition of typesafe enumerations for datatypes.
- Support for XSL-FO 1.1 constructs.
- New support for isolating SVG code inside the Graphics module.
- Extensive cleanup and simplification.
General
- aXSL-Java is now dependent on Java 5.0.
This change was made primarily because of the long-term benefits of using
typesafe enumerations in the API.
- The svg-1.1.jar file in the libs directory now contains the entire set of
the SVG 1.1 java bindings.
In order to do this, we must also compile the SMIL classes as part of the
build, but those classes are not currently included in the SVG jar file or
included in the build at all.
The jar file containing the SMIL bindings is an artifact of the "svg-lib"
build target, and can be found in build/ant if it is needed.
- In addition to the type name changes noted below, some types had case-only
changes made to their names. These changes were generally made to remove
contiguous capital letters, for readability. For example "SVG" was changed to
"Svg", and "PDF" was changed to "Pdf". These changes were made to conform to
Element 13 in "The Elements of Java Style", which states: "Capitalize only the
first letter in acronyms."
- Also, in addition to the method name changes noted below, some methods had
case-only changes made to their names for the same reason listed for type names
above.
- The locations in the source tree of many modules changed. Specifically, all
"-r" and "-w" extensions were removed, and the "area-r" (readable area tree) has
been renamed "galley". Similar changes were made to package names, that is "R"
and "W" suffixes were removed, and "areaR" was renamed "galley". These changes
were made to conform to Element 16 in "The Elements of Java Style", which
states: "Use a single, lowercase word as the root name of each package."
Common
- Constants: This class has been entirely removed, and generally replaced
by typesafe enumerations. Two constants were moved to org.axsl.foR.FObj.
The remaining items now exist in appropriately-named
enumeration classes in org.axsl.common or in the FOTree org.axsl.foR
package.
- OrderedTreeNode: Subclasses are now expected to store the parent node.
Some methods have been made abstract and genericized, so that subclasses can
minimize casting.
- OrderedTreeNode: The methods getChildren() and getSiblings() have been
removed.
- Moved the "value" enums from org.axsl.common to
org.axsl.common.value.
- ShadowEffect: Removed the font-size parameter from the three size methods.
Implementations should handle the provision of such context information
internally. Also renamed method getblurRadius to getBlurRadius for
readability.
PostScript
- Upgraded "maturity" from "experimental" to "partial".
Font
- Font: Added method:
byte[] getPanose();
- Font: Replaced integral constants with inner enumerations. For example,
the constants that started with "FONT_STYLE" are now enumerations in an inner
enum Font.Style.
- Font: The method baseline(String) has been changed to baseline(Iso15924),
using the new enumeration of ISO scripts.
- FontConsumer: Added method, providing for a new font-selection scheme
based on PANOSE:
FontUse selectFontPanose(short[] panose, int codePoint) throws
FontException;
- FontUtility: Return an empty array instead of null where possible.
- Font: Added methods to expose subscript and superscript placement
information that may be available in the font:
int subscriptShift(int fontSize);
int superscriptShift(int fontSize)
- FontUse: Added documentation to the glyphAvailable(int codePoint),
unavailableChars(CharSequence chars, int beginIndex), and
unavailableChar(CharSequence chars, int beginIndex) methods clarifying that
non-printable characters are treated as "available".
- FontPdf: Renamed method getFontBBox() to getFontBoundingBox(), to
conform to naming standards regarding abbreviations.
- Upgraded "maturity" from "experimental" to "partial".
Graphic
- The method Graphic.getBitsPerPixel() has been renamed to
getBitsPerComponent() to reflect its proper description.
- Graphic: Replaced integral constants with inner enumerations. For example,
the constants that started with "COMPRESSION" are now enumerations in an inner
enum Graphic.Compression.
- GraphicServer: Added method SVGGraphic
makeSvgGraphic(SVGDocument svgDocument), to allow the server to create a
Graphic wrapper around an already-parsed SVGDocument.
- GraphicServer: Added method SVGDocument makeSvgDocument(), so that clients
can obtain an SVG DOM document suitable for adding parsed SVG content.
- GraphicServer: Added method writeSvgDocument(SVGDocument, OutputStream)
so that the server can output externally-created SVG documents to an output
stream, perhaps with pretty-printing.
- SVGGraphic: Added method awtPaint(...) so that the Graphic system can
control the drawing of SVGs in AWT.
- SVGGraphic: Added methods drawPS(...), drawPdfStreamContent(...), and
drawPdfDocument(...) for the graphic to write its content to PostScript and
PDF output.
Some of these have dependencies on axslFont for font resolution and
tracking.
- Added interface GraphicLink to describe links that are embedded directly
in the graphic.
- Graphic: Added method getLinks() to return an array of links that are
associated with the graphic.
- EPSGraphic: Changed bounding box return type from int[] to float[].
- EpsGraphic: Changes name of method getBBox() to getBoundingBox, to
conform to naming standard regarding abbreviations.
Hyphenation
- [java] The documentation for all four HyphenBreak methods has been changed
to require implementations to return an empty String instead of "null" for
cases where no characters should be deleted or inserted. This was done to
prevent client applications from needing to test for "null".
- Added a JUnit black-box test class which can be subclassed by
implementations to test general hyphenation capabilities.
- The HyphenationServer methods taking int[] as parameters have been
removed.
Client applications maintaining textual data in int arrays will need to
convert that data to CharSequence or char[] instead.
- The Hyphenation method getPoints() has been changed to return a byte
array instead of an int array.
A Java byte can reference 128 items, which is sufficient to index characters
in a word.
This change will make it more likely that implementations can minimize memory
use and conversions.
- Methods requiring String language and country code parameters now require
Iso639 and Iso3166 parameters instead. This provides some pre-validation of
input as well as maximizing flexibility for implementations to use whatever
scheme they may wish to store the language- and country-related data.
Text
- LineOutput: Added convenience method int capacityRemaining().
Speech
- Added Speech module to handle integration of documents with speech
systems.
Created interface for SpeechServer and Voice, and classes SpeechException and
SpeechUtility.
FO Tree
- "Trait" methods that previously returned shorts for enumerated values
now return a typesafe enumeration instead.
- Removed the unneeded FObjMixed marker interface from FOTree.
- FONode: Method parentFO() has been renamed to getParent().
Method getFONodeChildAt(int childIndex) has been renamed to
getChildAt(int childIndex).
Method childrenFO() has been renamed to getChildren().
These methods were originally named more clearly, but were renamed to handle
the lack of generic capabilities.
Now that we are running Java 5.0, we can name them more sanely.
- FONode: Added method int getSequentialIndex(). This index is unique within
the FOTree, and is assigned sequentially from 0, allowing external
applications (like an Area Tree or Layout system) to efficiently index into
array-like structures containing virtual FONode fields. See the javadocs for
this method for a more complete explanation.
- The method FONode.getSequentialIndex() renders the FONodeResult interface
obsolete. It has been removed, as well as the getter and setter methods in
FONode that referenced it.
It also renders the FONodeProxy interface obsolete.
It has been removed, as well as the getter and setter methods in FONode that
referenced it.
The removal of these interfaces and methods makes the FOTree a "read-only"
structure.
Therefore the method FONode.reset() is rendered obsolete, and it has been
removed as well.
- FONode: Renamed method makeProxy(ProxyFactory) to
acceptProxyFactory(ProxyFactory) for clarity and consistency with the
Visitor pattern, which this method borrows from.
- Renamed interface AbstractTableBody to AbstractTablePart for clarity.
- Changed class names as follows: Classes starting with "FObj" were changed
to start with "Fo". Other classes starting with "FO" were changed to start
with "Fo". Renamed org.axsl.foR.svg.SVGElement to "SvgElement". These changes
were made to conform to standard naming conventions.
- Removed the "Keep" interface. The mnemonic values defined therein did not
add clarity to signatures, code, or documentation.
- Changed documentation on all Fo "traitKeep ..." methods to indicate that
the lower bound of the return value is Integer.MIN_VALUE, not zero as
previously documented.
- Removed the interface Shape entirely, using the java.awt.Shape instead
where needed.
- Moved the interfaces WritingMode and ShadowEffect to Common so that
they can be used by packages that have no knowledge of the FOTree.
- In Fo, as suggested by TO-DO items in the last release, the absolute
(top, bottom, left, right) versions of the traitBorder??Color,
traitBorder??Style, traitBorder??Width, and traitPadding?? methods have been
removed in favor of their relative equivalents.
- In Fo, combined the methods traitAlignmentAdjust and
traitAlignmentAdjustAmount into one method that returns an int value, that is,
the actual adjustment amount.
- Fo: Changed return type of method traitCountry from String to a new
typesafe enum. Also made a similar change for traitLanguage and
traitScript.
- Fo: Renamed method isRAGenerator to traitIsReferenceArea for clarity with
the standard.
- An extension element "metadata" has been added (in the axsl namespace),
and a corresponding interface at org.axsl.foR.extension.Metadata.
- Declarations: Methods have been added to return child ColorProfile
objects.
- Root: Methods have been added to return document metadata.
- Removed enumerations related to property types and property values that
are no longer needed in the interfaces, and are therefore considered
implementation-specific.
- Fo: Removed method traitScaling() and traitScalingMethod.
The usefulness of these methods should be internal to the FO Tree.
- Added interface for RetrieveTableMarker.
Also created interface GraftingPoint as a super-interface for both
RetrieveMarker and RetrieveTableMarker.
Changed methods throughout the module that formerly depended on RetrieveMarker
to depend on GraftingPoint instead.
- RetrieveMarker no longer implements FoContext.
- Added new methods to FoContext: ipdNearestBlockLevel() and
bpdNearestBlockLevel(). Removed parameters in several Fo and FoScaled methods
because these values are now available through FoContext.
- Table: Added method isFixedLayout() to indicate whether the table layout
algorithm is "fixed" or "automatic".
- Fo: Changed the return value for traitTextShadow(FoContext) to an array
of shadow effects instead of just one.
- To avoid exposing unnecessary details, FoNode now extends
javax.swing.tree.TreeNode directly instead of the OrderedTreeNode interface
(a subinterface of TreeNode).
- Removed the getChildren() method from FoNode 1) to avoid casting clashes
resulting from Generics erasure, 2) to avoid unnecessary exposure of the data
structure itself, and 3) to totally hide the data structure, allowing
implementations to use arrays or other collection types instead of Lists, if
they wish.
The children can still be iterated using the getChildCount() and
getChildAt(int) methods.
- FoNode: Now implements the Iterable interface so that client applications
can use the "foreach" looping construct if they wish.
- SvgElement: Method getSVGDocument(), which returned a DOM SVGDocument
instance, has been replaced by getSVGGraphic(), which returns an aXSL
SVGGraphic implementation.
Because of new methods in the graphics package, SvgElement implementations can
(and should) now wrap their SVGDocument instances inside an SVGGraphic
instance.
The SVGDocument instance is still accessible through the SVGGraphic method
getSVGDocument().
- Region: Renamed method getXPositionVPContent to crX, getYPositionVPContent
to crY, getWidthVPContent to crWidth, and getHeightVPContent to crHeight, for
simplicity and conformity with naming standards.
- TableColumn: Moved method traitColumnWidth(...) from Fo, as this is the
only class that uses it. Also removed the tableWidth parameter, and moved it
to the FoContext interface.
- Fo: Converted the "ipdAncestorBlockArea" parameter for the methods
traitSpaceStartMinimum, traitSpaceStartOptimum, traitSpaceStartMaximum,
traitSpaceEndMinimum, traitSpaceEndOptimum, and traitSpaceEndMaximum into a
new FoContext method ipdAncestorBlockArea().
- Fo: Converted the "widthContainingBlock" and "heightContainingBlock"
parameters for the traitTextIndent, traitTop, traitBottom, traitLeft, and
traitRight methods into new FoContext methods widthContainingBlock() and
heightContainingBlock().
- Fo: Replaced "ipdNearestBlockAreaNotLineArea" parameter in methods
traitProvisionalDistanceBetweenStarts and traitProvisionalLabelSeparation with
use of the ipdAncestorBlockArea method in FoContext.
- Fo: Replaced "ipdAncestorBANotLA" parameter in method
traitLastLineEndIndent with use of the ipdAncestorBlockArea method in
FoContext.
- Fo: Replaced "isFirst" and "isLast" parameters in methods
traitBorderBeforeWidth, traitBorderAfterWidth, traitBorderStartWidth,
traitBorderEndWidth, traitPaddingBefore, traitPaddingAfter, traitPaddingStart,
and traitPaddingEnd, with new methods in FoContext.
- Fo: Replaced "ipdContainingRA" parameter in methods traitStartIndent and
traitEndIndent with new method ipdContainingRefArea in FoContext.
- fo: Replaced "ipdParentContent" parameter in method
traitLeaderPatternWidth with new method ipdParentArea in FoContext.
- fo: Replaced "areaHeight" property with new interface FoInlineContext,
which contains a method alignmentAdjustBase, which provides the same
information.
- FoScaled: Add methods to retrieve the IPD and BPD of the reference
area, that is, the area in which the content should actually be drawn (as
opposed to the viewport in which it is viewed).
- Fo: Removed the parameter "mediumRange" from the method traitPitch().
Implementations should use the new Voice interface in the new Speech module
to obtain the various keyword values for a given Voice.
- Fo: Removed the methods isContentBlock(), isContentInline(),
isContentPcdata(), canContainBlock(), canContainInline(), and
canContainPcdata(). These are implementation-specific validation-related
methods that do not need to be exposed to client applications.
- Removed the AbstractFlow and AbstractTablePart interfaces, as they
add no value.
- Add interfaces for new 1.1 objects: IndexPageNumberPrefix,
IndexPageNumberSuffix, IndexRangeBegin, IndexRangeEnd, IndexKeyReference,
IndexPageCitationList, IndexPageCitationListSeparator,
IndexPageCitationRangeSeparator, ScalingValueCitation, and
PageSequenceWrapper.
- Changes made to handle multiple flows in a page-sequence (an XSL-FO 1.1
change): PageSequence method Flow getFlow() has been changed to
List<Flow> getFlows().
SimplePageMaster method getRegionBody was changed to getRegionBody(String
regionName).
SimplePageMaster method added: Collection<? extends RegionBody>
getRegionBodies().
Flow method added: List<String> regionBodies(), which returns a list of
region-body names into which the flow contents should be laid out.
- Since implementations are required to normalize table content to contain
TableRows even when they do not exist in the input, the Fo methods traitEndsRow
and traitStartsRow have been removed.
The input traits are used only by the implementation to create the rows added
during normalization.
- Fo: Renamed method traitHyphLadderCount to traitHyphenationLadderCount,
for consistency.
- Fo: Removed method refIdNeeded as it seems to duplicate traitRefId.
- Fo: Removed the methods getMarginLeft, getMarginRight, getMarginTop, and
getMarginBottom. Instead clients should use the equivalent relative-direction
method, spaceBeforeOptimum, spaceAfterOptimum, etc.
- FoText and FoTextContent were changed to extend Fo instead of FoNode.
FoNode was then rolled up into Fo. All Fo Tree content now extends Fo.
- FoText and FoTextContent were combined into one interface at
org.axsl.fo.fo.CharacterSequence, which implements FoLineText.
- FoContext: Renamed ipdNearestBlockLevel to ipdAncestorBlockOrRa, and
renamed bpdNearestBlockLevel to bpdAncestorBlockOrRa.
- Removed interface org.axsl.fo.extension.ContinuedLabel. This general
capability is addressed with new XSL-FO 1.1 features.
- Removed the methods and related interfaces that exposed the
external-destination and internal-destination properties, replacing them with
a DestinationPa interface with methods returning normalized values.
- BookmarkTitle: Removed unnecessary convenience method getContent.
- Moved methods returning font-selection-related property values from
CommonFontPa to CommonFontExcludedPa. They can be used by implementations
for pro-forma purposes, but are no longer exposed to client applications.
- Moved method traitFontSizeAdjust from CommonFontPa to CommonFontExcludedPa,
as it is needed only as a factor in computing the traitFontSizeActual method.
Also changed the "none" value from -1 to Double.NEGATIVE_INFINITY, as it is
less likely to result in any confusion.
- CommonFontPa: Changed parameter for traitFontSizeActual from "int xHeight"
to "Font font". Passing the font instead of its x-height be much simpler for
the client application.
- Moved method traitFontSize from CommonFontPa to CommonFontExcludedPa, as
the method that should be used by client applications is traitFontSizeActual.
- Removed all references to LinefeeTreatmentPa in FO Tree objects (affects
Block only). The operations of this property are completely internal to the
FO Tree. The interface remains for pro-forma use by implementations.
Area Tree
- Removed the ExternalGraphicArea, ForeignObjectArea, PageNumberArea, and
PageNumberCitationArea interfaces, replacing them with the generic
NormalInlineArea interface.
- Removed the BasicLinkArea, LeaderArea, and InlineArea interfaces,
replacing them with the generic AncestralNormalInlineArea interface.
- Changed the signature for PageCollection.getNextPage(boolean forceOdd,
boolean forceEven, boolean isBlank).
Replaced the first two boolean parameters with an enum that prevents a client
application from requesting both an odd and an even page.
- Removed the method PageCollection.padPagesAtBeginning().
This can reasonably be handled inside the implementation.
Added "throws AreaWException" to AreaTree.makePageCollection, to allow
implementations to throw an exception if they try to make a PageCollection and
are unable to create the padding pages needed at the beginning of the
collection.
- Renamed the method PageCollection.padPagesAtEnd() to layoutComplete() to
make it more general.
- AreaNode: The method getWritableParent() has been renamed to
getParent().
The method getWritableParentArea() has been renamed to getParentArea().
The method getWritablePage() has been renamed to getPage().
The method ancestorWritableNormalBlockArea() has been renamed to
ancestorNormalBlockArea().
These methods were originally named more clearly, but were renamed to handle
the lack of generic capabilities.
Now that we are running Java 5.0, we can name them more sanely.
- PageArea: For the same reason listed above for AreaNode,
the method getWritablePageCollection() has been renamed to
getPageCollection(),
the method getWritableRegionAfter() has been renamed to getRegionAfter(),
the method getWritableRegionBefore() has been renamed to getRegionBefore(),
the method getWritableRegionStart() has been renamed to getRegionStart(),
the method getWritableRegionEnd() has been renamed to getRegionEnd(),
and the method getWritableRegionBody() has been renamed to
getRegionBody().
- RegionRABody: For the same reason listed above for AreaNode, the method
getWritableMainRA() has been renamed to getMainRA,
the method getWritableBeforeFloatRA() has been renamed to getBeforeFloatRA(),
and the method getWritableFootnoteRA() has been renamed to
getFootnoteRA().
- PageCollection: For the same reason listed above for AreaNode, the method
getWritableAreaTree() has been renamed to getAreaTree().
- MainRA: The method getNextWritableArea(FObj fo) has been renamed to
getNormalFlow(FObj fo).
- The GenericContainer interface has been rolled into
AbstractTableContainer.
- The interface MarkerContentArea has been removed.
The idea of placing a node directly in the Area Tree to mark the merger of
Marker and RetrieveMarker items used has been abandoned because of the
ugly implications it had for type-safety within the tree.
- AbstractTableContainer: Remove methods allowing external manipulation of
the location of the table header, footer, and body.
The area tree is responsible for the location of such areas, and external
layout systems are only concerned with their size and potential size.
- Added new BlockContentFactory interface and moved methods from Area that
create block content areas to this interface.
The effect of this is to limit the Areas that can create such content.
- Area: Removed methods incrementProgressionDimension(int incrementAmount)
and setProgressionDimension(int progressionDimension).
Only the area tree should actually adjust the size of Areas.
- Area: Removed method FoValue traitAbsolutePosition(). This appears to be
irrelevant for layout decisions.
- Area: Renamed method progressionDimensionAvailable() to
pdAvailable(), for brevity.
- LineArea: Now extends the LineOutput interface. The method asLineOutput()
has been removed as the LineArea is now already cast as such inherently.
- LineArea: Removed method isEmpty() as it is a duplicate of a similar
method in LineOutput and one in OrderedTreeNode.
- SpanRA: Removed the methods int getCurrentColumn() and
void setCurrentColumn(int columnNumber). These methods access layout data
that does not belong in the AreaTree.
- SpanRA: Removed the method NormalFlowRA normalFlowForNextFO(FObj fo) as it
seems to be unneeded and layout-related.
- PageCollection: Removed the method SpanRA
startingReferenceArea(FObj lastFObj, FObj nextFObj) as it seems to be
unneeded and layout-related.
- PageCollection: The method getNextPage(Force, boolean) has been renamed
to makePage for consistency with similar methods in other classes.
Also, the boolean parameter has been removed as this information essentially
duplicated data in the Force parameter.
- Page Collection: Removed the method int getCurrentPageNumber().
This method was used only to compute the parity of a page (whether odd or
even) to compute the boolean value passed to makePage. It is no longer needed
as makePage is expected to handle the parity computations and checks.
- NormalBlockArea: Renamed method createNextLineArea to makeLineArea, for
consistency with similar methods in other classes.
- AreaNode: Removed two unused and unneeded convenience methods:
int crBPDNearestGeneratedByBlockLevelFO() and
int crIPDNearestGeneratedByBlockLevelFO().
- Added a more specific implementation of traitGeneratedBy() to
TableArea.
- Renamed interface AbstractTableContainer to AbstractTablePartContainer,
for clarity.
- TableArea: Added methods to return each of the named table parts.
- AreaNode: Added method Area nearestArea(), which returns either the node
itself (if it is an area), or the nearest ancestor node that is an Area.
- AreaNode: Renamed method getParentArea() to ancestorArea(), to conform
with the naming standards.
- LineContentFactory: Added methods to create areas generated by fo:inline
formatting objects and by fo:inline-container formatting objects.
- Changed methods throughout the module that formerly depended on
RetrieveMarker to rely on the more general GraftingPoint instead.
- AreaTreeEvent: Now contains and returns a readable PageArea
instead of the native writable PageArea.
- AreaTree: renamed and repurposed method from the narrower
createDocumentNodes() to the broader contentComplete().
Changed the documentation to indicate that this method is now expected to
ensure that all loose ends in the AreaTree are wrapped up and that all Page
Complete events have been processed, as well as that all document nodes have
been created.
- Changed super-interface for TableRowContainer and
AbstractTablePartContainer (the superclass for TableBodyContainer,
TableHeaderContainer, and TableFooterContainer) from Area to AreaNode.
This clarifies the fact that these AreaTree nodes are not really Areas, in
conformity with the XSL-FO Recommendation.
They exist merely as containers within the Area Tree to organize other
nodes.
- Added interfaces ListItemBodyContainer and ListItemLabelContainer, and
added methods to ListItemArea to create instances of these.
This is consistent with the handling of table-row, that is, we create a
non-area container for the areas generated by the children of the
fo:list-item-label and fo:list-item-body objects.
- To avoid exposing unnecessary details, AreaNode now extends
javax.swing.tree.TreeNode directly instead of the OrderedTreeNode interface
(a subinterface of TreeNode).
- The class AreaWException was renamed AreaTreeException.
- All interfaces whose names ended with "RA" were changed to end with
"RefArea".
- RegionBodyRefArea: All methods whose names ended with "RA" were changed to
end with "RefArea".
- Changes made to handle multiple flows in a page-sequence (an XSL-FO 1.1
change): PageArea method getRegionBody() was changed to
getRegionBody(String regionName).
PageArea method added: Collection<? extends RegionBodyRefArea>
getRegionBodies().
- InlineContainerArea: Now extends BlockContentFactory.
- Fo: Renamed getWritingMode to traitWritingMode, for consistency.
- Fo: Removed methods: getPreviousSiblingFo (unused), getBpAxis,
getIpAxis, and getFauxSmallCapFontSize (unnecessary legacy convenience
methods).
- Fo: Renamed method getNearestTable to ancestorTable, and renamed method
getBasicLink to ancestorBasicLink, for consistency with naming standards.
- Root: Added method getFoTree to return the "parent" FoTree instance.
- Fo: Removed convenience method getFontConsumer. This is replaced by new
methods in FoTree exposing the servers and factories.
- Root: Added getFoTree method, to return the parent FoTree instance.
- FoTree: Added getters for the various servers and factories used by the
FoTree.
- Added methods to PageNumber, PageNumberCitation, PageNumberCitationLast,
and ScalingValueCitation to return the respective formatted Strings.
- Most trait value accessors have been moved from Fo to property-specific
interfaces that are extended by the Fo subinterfaces to which the property
applies.
The main result of this change is that trait values are less visible
than they were before, that is, a cast narrower than Fo will generally be
required to get access to the trait values.
- Added interface PageCollectionWrapper as a container for areas returned by
a PageSequenceWrapper object.
- AreaNode: Added method ancestorBlockContentFactory.
- Moved getters for the FontConsumer and TextServer instances from AreaNode
to AreaTree.
- LineContentFactory: Added methods for missing inline content.
- Renamed TextArea to GlyphAreaSequence for clarity.
- LineContentFactory: Renamed method makeTextArea to makeGlyphAreaSequence,
to match the new name of the interface. Also rearranged the order of the
parameters so that the offset and size of the char array immediately follow
the reference to the fo:characters that they index.
Galley (the readable AreaTree)
- This package was renamed from AreaTreeR (the readable AreaTree) to Galley.
The concept is the same, but the naming change helps keep this module distinct
from the writable AreaTree, and also helps signal the fact that this module is
not tied to the AreaTree model that is part of XSL-FO.
- Removed the BasicLink interface.
A link is no longer an area in its own right, but is more of an attribute of
the Areas generated inside of it.
- Added the method Area.isLinkRoot(), so that client apps know whether the
Area should be marked as inside a link.
- Removed the method Area.brPoints(), as the same information is available
in other methods.
- Removed the methods Area.rrOriginX(), Area.rrOriginY(), Area,rrIPD(), and
Area.rrBPD().
With the clear distinction between LineArea and TextArea in the API, the need
for a separate "render rectangle" is not needed.
In other words, a LineArea content rectangle may not start at the same place
that its first child TextArea content rectangle starts, and this is the
difference that the render rectangle addressed.
Client apps should simply use the content rectangle of the correct Area,
either the LineArea or the TextArea, to get the desired rectangle.
- As noted in comments in the previous release, the following methods have
been removed: LineArea.traitTextIndent(), LineArea.traitLastLineEndIndent(),
LineArea.traitStartIndent(), LineArea.traitEndIndent(),
LineArea.traitTextAlign(), and LineArea.traitAlignmentBaseline().
This information does not need to be exposed to successfully render a
document.
- Removed the method LineArea.optimize().
This functionality should be performed before the page is made available to
the renderer, so it does not need to be exposed to client applications.
- Removed the method TableCellArea.optimize().
This functionality should be performed before the page is made available to
the renderer, so it does not need to be exposed to client applications.
- AreaNode: The method getParentOut() has been renamed to getParent().
The method ancestorLineAreaOut() has been renamed to ancestorLineArea().
These methods were originally named more clearly, but were renamed to handle
the lack of generic capabilities.
Now that we are running Java 5.0, we can name them more sanely.
- PageCollection: Removed the method getAreaTreeOut(). If we want a similar
method in the future, it should be added to AreaNode.
- Removed the unneeded SpanRA interface and related visitor method.
- Removed the uneeded NormalFlowRA interface and related visitor
method.
- Area: Added methods to get the border styles.
- Area: Removed methods prOriginX() and prOriginY(). The padding rectangle
is only needed by implementations of the BackgroundArea interface.
- Area: Removed methods traitScaling() and traitOverflow().
These are currently not used.
Overflow may need to be added back in the future, but scaling probably does
not.
- AreaTree: Methods have been added to return document metadata.
- Area: Removed method getColor() as it is a duplicate of traitColor().
- AreaNode: Moved methods traitColor(), traitFontStyle(), and
traitFontWeight() to Area and BookmarkTitleArea, so that other nodes do not
need to implement these methods.
- Moved the method getWordSpacing() from TextArea to GeneralInlineArea and
renamed it wordSpacing().
This allows other inline Areas like LeaderArea and PageNumberArea to have word
spacing as well as letter spacing.
Other inline areas (like ExternalGraphicArea) should simply return zero.
- GeneralInlineArea: Added method boolean kern(), which allows Areas to
turn kerning off.
- To avoid exposing unnecessary details, AreaNode now extends
javax.swing.tree.TreeNode directly instead of the OrderedTreeNode interface
(a subinterface of TreeNode).
- Removed the getChildren() method from AreaNode 1) to avoid casting clashes
resulting from Generics erasure, 2) to avoid unnecessary exposure of the data
structure itself, and 3) to totally hide the data structure, allowing
implementations to use arrays or other collection types instead of Lists, if
they wish.
The children can still be iterated using the getChildCount() and
getChildAt(int) methods.
- AreaNode: Now implements the Iterable interface so that client
applications can use the "foreach" looping construct if they wish.
- SVGArea: Method getSVGDocument(), which returned a DOM SVGDocument
instance, has been replaced by getSVGGraphic(), which returns an aXSL
SVGGraphic implementation.
The SVGDocument instance is still accessible through the SVGGraphic method
getSVGDocument().
- The class AreaRException was renamed GalleyException.
- Area: The method getProgressionDimension() was removed. This information
is available in the methods that return the various area rectangles.
- Area: The methods traitFontWeight and traitFontStyle were removed as they
were unnecessary.
- Area: Moved method traitColor to GeneralInlineArea, as it is only needed
its by sub-interfaces.
- Renamed the "AreaTree" interface to "Galley".
- Moved method traitInternalDestination() from AreaNode to BookmarkArea and
renamed it getDestination().
- Removed the unnecessary RegionBodyArea interface.
- Rolled up the BookmarkTitleArea interface into BookmarkArea as there is a
one-to-one relationship between them.
- Renamed interfaces BookmarkTreeArea to BookmarkTree, and BookmarkArea to
Bookmark.
- Removed PageNumberArea and PageNumberCitationArea interfaces.
Implementations of these should now implement TextArea instead.
- Removed BookmarkTree and its children from the AreaNode hierarchy.
They no longer extend AreaNode.
- Renamed interface PageArea to Page.
- ForeignObjectArea: For method getContainedForeignObject(), return an Area
instead of an AreaNode.
- SvgArea: Rename method getSvgGraphic() to getGraphic(), which now makes it
a more specific implementation of that method in the super-interface
GraphicArea. Also added more specific implementation of getParent(), to return
the parent ForeignObjectArea.
- Created new super-interface ScalableArea, and made ExternalGraphicArea and
ForeignObjectArea extend it.
This has methods to retrieve the IPD and BPD of the rectangle in which the
content should be drawn (as opposed to the viewport in which it will be
viewed).
- Create new marker interface ForeignContent, which is not a node in the
tree.
Make SvgArea extend it instead of GraphicArea, thus effectively removing
SvgArea from the tree (although it is conceptually a leaf under its parent
ForeignObjectArea), and clarifying the fact that the parent ForeignObjectArea
controls all Area-related aspects of the two items.
Renamed SvgArea to ForeignContentSvg to reflect its new meaning.
Similarly removed the related method in RenderVisitor.
- Changes made to handle multiple flows in a page-sequence (an XSL-FO 1.1
change): RegionArea getRegionBody() was changed to
Collection<? extends RegionArea> getRegionBodies().
- Made LeaderArea extend TextArea, and moved the text-related methods from
GeneralInlineArea to TextArea.
- Moved getter for the FontConsumer instance from AreaNode to Galley.
Output
- Added OutputException class and generally changed thrown Exceptions to
that class.
- OutputTarget: Renamed method setStrokeSVGText(...) to setStrokeText, as
it has potential application to other graphic formats.
- Renderer: Renamed method setAreaTree to setGalley, to reflect the change
in nomenclature in that module.
PDF
- Removed method PDFPage.createLink(...), as it was a duplicate of
PDFPage.makeLink(...).
- Change PDFPage.makeLink(...) to take any Rectangle2D implementation as a
parameter, and clarify in doc that the values are expressed in millipoints.
- PDFPathPaint: Renamed method getColorSpaceOut() to getSetterString(), and
added better documentation.
- Converted PDFDocument integer constants to PDFVersion typesafe
enumeration.
- PDFDocument: Renamed method outputHeader to writeHeader, for consistency
with other methods.
- PDFDocument: Removed OutputStream parameter from the close(),
writeHeader(), and writeIndirectObjects() methods. The PDFDocument should
already know about its output stream, probably since construction.
- PDFDocument: Added methods to set the remaining document metadata fields,
that is, title, author, subject, and keywords.
- Added typesafe enumeration for line cap style, and added a method in
PDFContentStream to set it.
- PDFContentStream: Removed the setting of colors/paint from the parameters
for drawRectangle(...), as these should now be set in the appropriate methods
that change the graphics state.
- PDFContentStream: Added boolean parameter "kern" to method drawText(...).
Previously it was assumed that any text written should be kerned, but this
can now be turned off.
- PDFContentStream: Rolled method drawSVGDocument(...) into
drawGraphic(...), adding the extra parameters in drawSVGDocument to
drawGraphic. In other words, drawGraphic is now expected to handle the
drawing of all graphics, including SVG.
- PDFContentStream: Changed method signature for setStrokeColor to take a
java.awt.Color instead of an org.axsl.pdfW.PDFColor.
This allows more of the color management logic to remain internal to the
implementation.
- PDFContentStream: Changed method signature for setFont to take an
org.axsl.fontR.FontUse instead of an org.axsl.pdfW.PDFFont.
This allows more of the font management logic to remain internal to the
implementation.
- PDFContentStream: Added method setLineWidth(float width) to set the line
width in the graphics state. Removed "thickness" parameter from drawLine(...)
as this should now be set using setLineWidth.
- PDFContentStream: Added method setDashPattern(...) to set the dash pattern
array and number. Removed the related parameters from drawLine(...) as this
should now be set using setDashPattern.
- PDFContentStream: Add methods for remaining text state parameters.
- PDFContentStream: Removed stroke Color from the drawLine method. This
should be set using the method for that purpose.
- PDFContentStream: Changed name of method setStrokeColor to setColor, and
added parameter to it so that it can be used to set either the stroke or the
fill color.
- PDFDocument: Removed method resetGraphicsState(). Implementations should
do this automatically at page creation or other times, rather than forcing
the client application to do it.
- Generally changed thrown exceptions to the more general PDFException to
consolidate thrown exceptions and to prevent wrapping in irrelevant Exception
subclasses.
- PDFNamedDestination: Removed this interface. Changed (the only) method in
PDFExplicitDestination to a void method that performs a registration of the
destination as a named destination instead of returning a PDFNamedDestination.
Renamed the interface from PDFExplicitDestination to PDFDestination.
Renamed PDFPage method to from createPDFExplicitDestination to
createDestination to match the more generic terms.