aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2007-12-13 17:32:43 +0000
committerVincent Hennebert <vhennebert@apache.org>2007-12-13 17:32:43 +0000
commitecf8547e04c4994fcb5017351ec63203f344cf7e (patch)
tree9ccf1c2e71740eec7a9866b122a4a159040ceb2b /src/java/org
parentf585893200a94a360b0e8f8015758aaf8f3ad2d7 (diff)
downloadxmlgraphics-fop-ecf8547e04c4994fcb5017351ec63203f344cf7e.tar.gz
xmlgraphics-fop-ecf8547e04c4994fcb5017351ec63203f344cf7e.zip
Style only: removed trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@603962 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableBody.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableFObj.java4
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java107
4 files changed, 58 insertions, 59 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
index e03e11a15..4f3cca046 100644
--- a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
+++ b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
@@ -199,6 +199,6 @@ public class ConditionalBorder {
static ConditionalBorder getDefaultBorder(CollapsingBorderModel collapsingBorderModel) {
BorderSpecification defaultBorderSpec = BorderSpecification.getDefaultBorder();
return new ConditionalBorder(defaultBorderSpec, defaultBorderSpec, defaultBorderSpec,
- collapsingBorderModel);
+ collapsingBorderModel);
}
}
diff --git a/src/java/org/apache/fop/fo/flow/table/TableBody.java b/src/java/org/apache/fop/fo/flow/table/TableBody.java
index c1453bdfa..dced3c062 100644
--- a/src/java/org/apache/fop/fo/flow/table/TableBody.java
+++ b/src/java/org/apache/fop/fo/flow/table/TableBody.java
@@ -138,7 +138,7 @@ public class TableBody extends TableCellContainer {
protected void finishLastRowGroup() throws ValidationException {
if (!inMarker()) {
- RowGroupBuilder rowGroupBuilder = getTable().getRowGroupBuilder();
+ RowGroupBuilder rowGroupBuilder = getTable().getRowGroupBuilder();
if (tableRowsFound) {
rowGroupBuilder.endRow(lastRow);
} else if (!lastCellEndsRow) {
@@ -211,7 +211,7 @@ public class TableBody extends TableCellContainer {
rowsStarted = true;
TableCell cell = (TableCell) child;
addTableCellChild(cell, firstRow);
- lastCellEndsRow = cell.endsRow();
+ lastCellEndsRow = cell.endsRow();
if (lastCellEndsRow) {
firstRow = false;
columnNumberManager.prepareForNextRow(pendingSpans);
diff --git a/src/java/org/apache/fop/fo/flow/table/TableFObj.java b/src/java/org/apache/fop/fo/flow/table/TableFObj.java
index 4b90ccac3..9618d7ff4 100644
--- a/src/java/org/apache/fop/fo/flow/table/TableFObj.java
+++ b/src/java/org/apache/fop/fo/flow/table/TableFObj.java
@@ -48,7 +48,7 @@ public abstract class TableFObj extends FObj {
BorderSpecification borderEnd;
CollapsingBorderModel collapsingBorderModel;
-
+
/**
* Main constructor
*
@@ -208,7 +208,7 @@ public abstract class TableFObj extends FObj {
}
/*
- * TODO made public so that RetrieveMarker can access it.
+ * TODO made public so that RetrieveMarker can access it.
*/
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
index c5a4950f4..866a020e2 100755
--- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
+++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
@@ -64,20 +64,20 @@ public class CommonBorderPaddingBackground {
* The "background-position-vertical" property.
*/
public Length backgroundPositionVertical;
-
-
+
+
private FopImage fopimage;
-
-
- /** the "before" edge */
+
+
+ /** the "before" edge */
public static final int BEFORE = 0;
- /** the "after" edge */
+ /** the "after" edge */
public static final int AFTER = 1;
- /** the "start" edge */
+ /** the "start" edge */
public static final int START = 2;
- /** the "end" edge */
+ /** the "end" edge */
public static final int END = 3;
-
+
public static class BorderInfo {
private int mStyle; // Enum for border style
private Color mColor; // Border color
@@ -88,15 +88,15 @@ public class CommonBorderPaddingBackground {
mWidth = width;
mColor = color;
}
-
+
public int getStyle() {
return this.mStyle;
}
-
+
public Color getColor() {
return this.mColor;
}
-
+
public CondLengthProperty getWidth() {
return this.mWidth;
}
@@ -109,7 +109,7 @@ public class CommonBorderPaddingBackground {
return mWidth.getLengthValue();
}
}
-
+
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer("BorderInfo");
@@ -204,9 +204,8 @@ public class CommonBorderPaddingBackground {
* Construct a CommonBorderPaddingBackground object.
*/
public CommonBorderPaddingBackground() {
-
}
-
+
/**
* Construct a CommonBorderPaddingBackground object.
*
@@ -214,7 +213,7 @@ public class CommonBorderPaddingBackground {
* @throws PropertyException if there's an error while binding the properties
*/
public CommonBorderPaddingBackground(PropertyList pList) throws PropertyException {
-
+
backgroundAttachment = pList.get(Constants.PR_BACKGROUND_ATTACHMENT).getEnum();
backgroundColor = pList.get(Constants.PR_BACKGROUND_COLOR).getColor(
pList.getFObj().getUserAgent());
@@ -231,7 +230,7 @@ public class CommonBorderPaddingBackground {
Constants.PR_BACKGROUND_POSITION_HORIZONTAL).getLength();
backgroundPositionVertical = pList.get(
Constants.PR_BACKGROUND_POSITION_VERTICAL).getLength();
-
+
//Additional processing: preload image
String url = ImageFactory.getURL(backgroundImage);
FOUserAgent userAgent = pList.getFObj().getUserAgent();
@@ -242,37 +241,37 @@ public class CommonBorderPaddingBackground {
} else {
// load dimensions
if (!fopimage.load(FopImage.DIMENSIONS)) {
- Property.log.error("Cannot read background image dimensions: "
+ Property.log.error("Cannot read background image dimensions: "
+ backgroundImage);
}
}
//TODO Report to caller so he can decide to throw an exception
}
- initBorderInfo(pList, BEFORE,
- Constants.PR_BORDER_BEFORE_COLOR,
- Constants.PR_BORDER_BEFORE_STYLE,
- Constants.PR_BORDER_BEFORE_WIDTH,
+ initBorderInfo(pList, BEFORE,
+ Constants.PR_BORDER_BEFORE_COLOR,
+ Constants.PR_BORDER_BEFORE_STYLE,
+ Constants.PR_BORDER_BEFORE_WIDTH,
Constants.PR_PADDING_BEFORE);
- initBorderInfo(pList, AFTER,
- Constants.PR_BORDER_AFTER_COLOR,
- Constants.PR_BORDER_AFTER_STYLE,
- Constants.PR_BORDER_AFTER_WIDTH,
+ initBorderInfo(pList, AFTER,
+ Constants.PR_BORDER_AFTER_COLOR,
+ Constants.PR_BORDER_AFTER_STYLE,
+ Constants.PR_BORDER_AFTER_WIDTH,
Constants.PR_PADDING_AFTER);
- initBorderInfo(pList, START,
- Constants.PR_BORDER_START_COLOR,
- Constants.PR_BORDER_START_STYLE,
- Constants.PR_BORDER_START_WIDTH,
+ initBorderInfo(pList, START,
+ Constants.PR_BORDER_START_COLOR,
+ Constants.PR_BORDER_START_STYLE,
+ Constants.PR_BORDER_START_WIDTH,
Constants.PR_PADDING_START);
- initBorderInfo(pList, END,
- Constants.PR_BORDER_END_COLOR,
- Constants.PR_BORDER_END_STYLE,
- Constants.PR_BORDER_END_WIDTH,
+ initBorderInfo(pList, END,
+ Constants.PR_BORDER_END_COLOR,
+ Constants.PR_BORDER_END_STYLE,
+ Constants.PR_BORDER_END_WIDTH,
Constants.PR_PADDING_END);
}
- private void initBorderInfo(PropertyList pList, int side,
+ private void initBorderInfo(PropertyList pList, int side,
int colorProp, int styleProp, int widthProp, int paddingProp)
throws PropertyException {
padding[side] = pList.get(paddingProp).getCondLength();
@@ -285,7 +284,7 @@ public class CommonBorderPaddingBackground {
pList.get(colorProp).getColor(ua)), side);
}
}
-
+
/**
* Sets a border.
* @param info the border information
@@ -294,7 +293,7 @@ public class CommonBorderPaddingBackground {
public void setBorderInfo(BorderInfo info, int side) {
this.borderInfo[side] = info;
}
-
+
/**
* @param side the side to retrieve
* @return the border info for a side
@@ -306,7 +305,7 @@ public class CommonBorderPaddingBackground {
return this.borderInfo[side];
}
}
-
+
/**
* Set padding.
* @param source the padding info to copy from
@@ -314,7 +313,7 @@ public class CommonBorderPaddingBackground {
public void setPadding(CommonBorderPaddingBackground source) {
this.padding = source.padding;
}
-
+
/**
* @return the background image as a preloaded FopImage, null if there is
* no background image.
@@ -322,7 +321,7 @@ public class CommonBorderPaddingBackground {
public FopImage getFopImage() {
return this.fopimage;
}
-
+
/**
* @param bDiscard indicates whether the .conditionality component should be
* considered (start of a reference-area)
@@ -405,7 +404,7 @@ public class CommonBorderPaddingBackground {
return padding[side].getLengthValue(context);
}
}
-
+
/**
* Returns the CondLengthProperty for the padding on one side.
* @param side the side
@@ -416,21 +415,21 @@ public class CommonBorderPaddingBackground {
}
/**
- * Return all the border and padding width in the inline progression
+ * Return all the border and padding width in the inline progression
* dimension.
* @param bDiscard the discard flag.
* @param context for percentage evaluation.
* @return all the padding and border width.
*/
public int getIPPaddingAndBorder(boolean bDiscard, PercentBaseContext context) {
- return getPaddingStart(bDiscard, context)
- + getPaddingEnd(bDiscard, context)
- + getBorderStartWidth(bDiscard)
- + getBorderEndWidth(bDiscard);
+ return getPaddingStart(bDiscard, context)
+ + getPaddingEnd(bDiscard, context)
+ + getBorderStartWidth(bDiscard)
+ + getBorderEndWidth(bDiscard);
}
-
+
/**
- * Return all the border and padding height in the block progression
+ * Return all the border and padding height in the block progression
* dimension.
* @param bDiscard the discard flag.
* @param context for percentage evaluation
@@ -438,7 +437,7 @@ public class CommonBorderPaddingBackground {
*/
public int getBPPaddingAndBorder(boolean bDiscard, PercentBaseContext context) {
return getPaddingBefore(bDiscard, context) + getPaddingAfter(bDiscard, context)
- + getBorderBeforeWidth(bDiscard) + getBorderAfterWidth(bDiscard);
+ + getBorderBeforeWidth(bDiscard) + getBorderAfterWidth(bDiscard);
}
/** {@inheritDoc} */
@@ -448,7 +447,7 @@ public class CommonBorderPaddingBackground {
+ getBorderStartWidth(false) + ", " + getBorderEndWidth(false) + ")\n"
+ "Border Colors: (" + getBorderColor(BEFORE) + ", " + getBorderColor(AFTER) + ", "
+ getBorderColor(START) + ", " + getBorderColor(END) + ")\n"
- + "Padding: (" + getPaddingBefore(false, null) + ", " + getPaddingAfter(false, null)
+ + "Padding: (" + getPaddingBefore(false, null) + ", " + getPaddingAfter(false, null)
+ ", " + getPaddingStart(false, null) + ", " + getPaddingEnd(false, null) + ")\n";
}
@@ -461,19 +460,19 @@ public class CommonBorderPaddingBackground {
/** @return true if border is non-zero. */
public boolean hasBorder() {
- return ((getBorderBeforeWidth(false) + getBorderAfterWidth(false)
+ return ((getBorderBeforeWidth(false) + getBorderAfterWidth(false)
+ getBorderStartWidth(false) + getBorderEndWidth(false)) > 0);
}
/**
* @param context for percentage based evaluation.
- * @return true if padding is non-zero.
+ * @return true if padding is non-zero.
*/
public boolean hasPadding(PercentBaseContext context) {
- return ((getPaddingBefore(false, context) + getPaddingAfter(false, context)
+ return ((getPaddingBefore(false, context) + getPaddingAfter(false, context)
+ getPaddingStart(false, context) + getPaddingEnd(false, context)) > 0);
}
-
+
/** @return true if there are any borders defined. */
public boolean hasBorderInfo() {
return (borderInfo[BEFORE] != null || borderInfo[AFTER] != null