You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/26 17:17:05 UTC
svn commit: r240260 - in
/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline:
AbstractTextArea.java Character.java InlineArea.java TextArea.java
Author: jeremias
Date: Fri Aug 26 08:16:58 2005
New Revision: 240260
URL: http://svn.apache.org/viewcvs?rev=240260&view=rev
Log:
Common base class for TextArea and Character. These two might even be merged altogether.
Added:
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java (with props)
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Character.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java
Added: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java?rev=240260&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java (added)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java Fri Aug 26 08:16:58 2005
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.area.inline;
+
+/**
+ * Abstract base class for both TextArea and Character.
+ */
+public abstract class AbstractTextArea extends InlineArea {
+
+ private int iTextWordSpaceAdjust = 0;
+ private int iTextLetterSpaceAdjust = 0;
+
+ /**
+ * Get text word space adjust.
+ *
+ * @return the text word space adjustment
+ */
+ public int getTextWordSpaceAdjust() {
+ return iTextWordSpaceAdjust;
+ }
+
+ /**
+ * Set text word space adjust.
+ *
+ * @param iTWSadjust the text word space adjustment
+ */
+ public void setTextWordSpaceAdjust(int iTWSadjust) {
+ iTextWordSpaceAdjust = iTWSadjust;
+ }
+ /**
+ * Get text letter space adjust.
+ *
+ * @return the text letter space adjustment
+ */
+ public int getTextLetterSpaceAdjust() {
+ return iTextLetterSpaceAdjust;
+ }
+
+ /**
+ * Set text letter space adjust.
+ *
+ * @param iTLSadjust the text letter space adjustment
+ */
+ public void setTextLetterSpaceAdjust(int iTLSadjust) {
+ iTextLetterSpaceAdjust = iTLSadjust;
+ }
+}
Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Character.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Character.java?rev=240260&r1=240259&r2=240260&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Character.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Character.java Fri Aug 26 08:16:58 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,12 +22,10 @@
* Single character inline area.
* This inline area holds a single character.
*/
-public class Character extends InlineArea {
+public class Character extends AbstractTextArea {
// use a String instead of a character because if this character
// ends a syllable the hyphenation character must be added
private String character;
- private int iTextWordSpaceAdjust = 0;
- private int iTextLetterSpaceAdjust = 0;
/**
* Create a new character inline area with the given character.
@@ -58,40 +56,5 @@
this.setIPD(this.getIPD() + hyphSize);
}
- /**
- * Get text word space adjust.
- *
- * @return the text word space adjustment
- */
- public int getTextWordSpaceAdjust() {
- return iTextWordSpaceAdjust;
- }
-
- /**
- * Set text word space adjust.
- *
- * @param iTWSadjust the text word space adjustment
- */
- public void setTextWordSpaceAdjust(int iTWSadjust) {
- iTextWordSpaceAdjust = iTWSadjust;
- }
-
- /**
- * Get text letter space adjust.
- *
- * @return the text letter space adjustment
- */
- public int getTextLetterSpaceAdjust() {
- return iTextLetterSpaceAdjust;
- }
-
- /**
- * Set text letter space adjust.
- *
- * @param iTLSadjust the text letter space adjustment
- */
- public void setTextLetterSpaceAdjust(int iTLSadjust) {
- iTextLetterSpaceAdjust = iTLSadjust;
- }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java?rev=240260&r1=240259&r2=240260&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java Fri Aug 26 08:16:58 2005
@@ -67,18 +67,22 @@
return verticalPosition;
}
+ /** @return true if the inline area is underlined. */
public boolean hasUnderline() {
return getBooleanTrait(Trait.UNDERLINE);
}
+ /** @return true if the inline area is overlined. */
public boolean hasOverline() {
return getBooleanTrait(Trait.OVERLINE);
}
+ /** @return true if the inline area has a line through. */
public boolean hasLineThrough() {
return getBooleanTrait(Trait.LINETHROUGH);
}
+ /** @return true if the inline area is blinking. */
public boolean isBlinking() {
return getBooleanTrait(Trait.BLINK);
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java?rev=240260&r1=240259&r2=240260&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java Fri Aug 26 08:16:58 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,14 +21,12 @@
/**
* A text inline area.
*/
-public class TextArea extends InlineArea {
+public class TextArea extends AbstractTextArea {
/**
* The text for this inline area
*/
protected String text;
- private int iTextWordSpaceAdjust = 0;
- private int iTextLetterSpaceAdjust = 0;
/**
* Create a text inline area
@@ -54,39 +52,5 @@
return text;
}
- /**
- * Get text word space adjust.
- *
- * @return the text word space adjustment
- */
- public int getTextWordSpaceAdjust() {
- return iTextWordSpaceAdjust;
- }
-
- /**
- * Set text word space adjust.
- *
- * @param iTWSadjust the text word space adjustment
- */
- public void setTextWordSpaceAdjust(int iTWSadjust) {
- iTextWordSpaceAdjust = iTWSadjust;
- }
- /**
- * Get text letter space adjust.
- *
- * @return the text letter space adjustment
- */
- public int getTextLetterSpaceAdjust() {
- return iTextLetterSpaceAdjust;
- }
-
- /**
- * Set text letter space adjust.
- *
- * @param iTLSadjust the text letter space adjustment
- */
- public void setTextLetterSpaceAdjust(int iTLSadjust) {
- iTextLetterSpaceAdjust = iTLSadjust;
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org