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 pb...@apache.org on 2004/05/27 17:09:09 UTC

cvs commit: xml-fop/src/java/org/apache/fop/datatypes TextDecorations.java

pbwest      2004/05/27 08:09:09

  Modified:    src/java/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
                        TextDecorations.java
  Log:
  Added boolean decoration tests
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.4   +26 -3     xml-fop/src/java/org/apache/fop/datatypes/Attic/TextDecorations.java
  
  Index: TextDecorations.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Attic/TextDecorations.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- TextDecorations.java	19 Feb 2004 03:11:55 -0000	1.1.2.3
  +++ TextDecorations.java	27 May 2004 15:09:08 -0000	1.1.2.4
  @@ -26,6 +26,7 @@
   
   import org.apache.fop.fo.PropNames;
   import org.apache.fop.fo.expr.PropertyException;
  +import org.apache.fop.fo.properties.TextDecoration;
   
   /**
    * Class for the text decorations to be applied according to the
  @@ -33,6 +34,7 @@
    * set of text decorations.  Modifications to the set are specified in a
    * TextDecorator object, which contains the on and off masks to be applied
    * to the "current" set of decorations.
  + * TODO Should this be a PropertyValue at all?  I don't think so.
    */
   
   public class TextDecorations
  @@ -72,6 +74,27 @@
       {
           super(propertyName, PropertyValue.TEXT_DECORATIONS);
           this.decorations = decorations;
  +    }
  +
  +    public boolean overlined() {
  +        if ((decorations & TextDecoration.OVERLINE) != 0) {
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public boolean struckthrough() {
  +        if ((decorations & TextDecoration.LINE_THROUGH) != 0) {
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public boolean underlined() {
  +        if ((decorations & TextDecoration.UNDERLINE) != 0) {
  +            return true;
  +        }
  +        return false;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org