[FOray-commit] SF.net SVN: foray: [7640] trunk/foray/foray-fotree/src/java/org/foray/fotree
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-06-15 23:43:50
|
Revision: 7640 Author: victormote Date: 2006-06-15 16:43:42 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7640&view=rev Log Message: ----------- 1. Conform to axsl change: Remove unneeded method. 2. Remove unneeded parameter from method. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:29:56 UTC (rev 7639) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-06-15 23:43:42 UTC (rev 7640) @@ -714,11 +714,8 @@ return propertyList.getRegionName(); } - /** - * {@inheritDoc} - */ - public boolean traitPrecedence(FOContext context) { - return propertyList.getPrecedence(context); + public boolean traitPrecedence() { + return propertyList.getPrecedence(); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:29:56 UTC (rev 7639) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-06-15 23:43:42 UTC (rev 7640) @@ -951,13 +951,16 @@ return null; } - public boolean getPrecedence(FOContext context) { + public boolean getPrecedence() { Boolean property = (Boolean) getProperty(Constants.FOPROP_PRECEDENCE); + /* Null context is OK, because the object this applies to cannot be + * insider a marker. */ + FOContext context = null; if (property != null) { return property.getValue(context, fobj); } - return Boolean.getValueNoInstance(context, - fobj, Constants.FOPROP_AUTO_RESTORE); + return Boolean.getValueNoInstance(context,fobj, + Constants.FOPROP_PRECEDENCE); } public int getExtent(FOContext context) { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-06-15 23:29:56 UTC (rev 7639) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-06-15 23:43:42 UTC (rev 7640) @@ -58,7 +58,7 @@ */ public int getXPositionVP_CR(FOContext context) { int xPosition = getPageMaster().getXPositionRA_CR(); - if (traitPrecedence(context) == false) { + if (traitPrecedence() == false) { xPosition += getPageMaster().getStartExtent(); } return xPosition; @@ -78,7 +78,7 @@ */ public int getWidthVP_CR(FOContext context) { int width = getPageMaster().getWidthRA_CR(); - if (traitPrecedence(context) == false) { + if (traitPrecedence() == false) { width -= getPageMaster().getStartExtent() + getPageMaster().getEndExtent(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-06-15 23:29:56 UTC (rev 7639) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-06-15 23:43:42 UTC (rev 7640) @@ -59,7 +59,7 @@ public int getXPositionVP_CR(FOContext context) { int pageWidth = getPageMaster().traitPageWidth(context); int xPosition = getPageMaster().getMarginLeft(context, pageWidth); - if (traitPrecedence(context) == false) { + if (traitPrecedence() == false) { xPosition += getPageMaster().getStartExtent(); } return xPosition; @@ -82,7 +82,7 @@ int width = getPageMaster().traitPageWidth(context) - getPageMaster().getMarginLeft(context, pageWidth) - getPageMaster().getMarginRight(context, pageWidth); - if (traitPrecedence(context) == false) { + if (traitPrecedence() == false) { width -= getPageMaster().getStartExtent() + getPageMaster().getEndExtent(); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2006-06-15 23:29:56 UTC (rev 7639) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2006-06-15 23:43:42 UTC (rev 7640) @@ -146,12 +146,10 @@ * @return True iff the region-before has Precedence. */ public boolean getBeforePrecedence() { - /* TODO: Handle context better. */ - FOContext context = null; - if (getRegionBefore() == null) { + if (this.regionBefore == null) { return false; } - return getRegionBefore().traitPrecedence(context); + return regionBefore.traitPrecedence(); } /** @@ -159,12 +157,10 @@ * @return True iff the region-after has Precedence. */ public boolean getAfterPrecedence() { - /* TODO: Handle context better. */ - FOContext context = null; - if (getRegionAfter() == null) { + if (this.regionAfter == null) { return false; } - return getRegionAfter().traitPrecedence(context); + return this.regionAfter.traitPrecedence(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |