<property name="ignore_jdk11"
value="org/apache/fop/render/awt/**
- ,org/apache/fop/image/analyzer/*
,org/apache/fop/viewer/**
- ,org/apache/fop/image/*
+ ,**/GifJpegImage.java
+ ,**/JimiImage.java
,**/PrintCommandLine.java
,**/AWTCommandLine.java"/>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- simple example for text-decoration -->
+
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <fo:layout-master-set>
+
+ <!-- layout for the first page -->
+ <fo:simple-page-master master-name="first"
+ page-height="29.7cm"
+ page-width="21cm"
+ margin-top="1cm"
+ margin-bottom="2cm"
+ margin-left="2.5cm"
+ margin-right="2.5cm">
+ <fo:region-body margin-top="3cm"/>
+ <fo:region-before extent="3cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+
+ <!-- layout for the other pages -->
+ <fo:simple-page-master master-name="rest"
+ page-height="29.7cm"
+ page-width="21cm"
+ margin-top="1cm"
+ margin-bottom="2cm"
+ margin-left="2.5cm"
+ margin-right="2.5cm">
+ <fo:region-body margin-top="2.5cm"/>
+ <fo:region-before extent="2.5cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+
+<fo:page-sequence-master master-name="basicPSM" >
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-name="first"
+ page-position="first" />
+ <fo:conditional-page-master-reference master-name="rest"
+ page-position="rest" />
+ <!-- recommended fallback procedure -->
+ <fo:conditional-page-master-reference master-name="rest" />
+ </fo:repeatable-page-master-alternatives>
+</fo:page-sequence-master>
+
+ </fo:layout-master-set>
+ <!-- end: defines page layout -->
+
+ <!-- actual layout -->
+ <fo:page-sequence master-name="basicPSM">
+
+ <fo:flow flow-name="xsl-region-body">
+
+ <fo:block font-size="18pt" font-family="sans-serif" line-height="24pt" space-after.optimum="15pt"
+ background-color="blue" color="white" text-align="center" padding-top="3pt">
+ Simple example for text-decoration
+ </fo:block>
+
+ <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="10pt">
+ The "text-decoration"-property describes decorations that are added to the text of an element.
+ If the property is specified for a block-level element, it should affect all inline-level descendants
+ of the element (does not work yet!).
+ If it is specified for (or affects) an inline-level
+ element, it affects all boxes generated by the element.
+ </fo:block>
+
+ <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="3pt">
+ Example: <fo:inline text-decoration="underline">underline</fo:inline>
+ </fo:block>
+
+ <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="10pt">
+ <fo:inline font-family="monospace"><![CDATA[<fo:inline text-decoration="underline">underline</fo:inline>]]></fo:inline>
+ </fo:block>
+
+ <fo:block font-size="12pt"
+ font-family="serif"
+ line-height="15pt"
+ space-after.optimum="10pt"
+ text-align="start">
+ This is simple test of the text-decoration<fo:inline text-decoration="underline">underline</fo:inline>.
+ </fo:block>
+ <fo:block font-size="22pt"
+ font-family="sans-serif"
+ line-height="15pt"
+ space-after.optimum="10pt"
+ text-align="start">
+ This is simple test with a <fo:inline text-decoration="underline">bigger</fo:inline> font-size.
+ </fo:block>
+ <fo:block font-size="12pt"
+ font-family="monospace"
+ line-height="15pt"
+ space-after.optimum="20pt"
+ text-align="start">
+ This is simple test with a <fo:inline text-decoration="underline">monospaced</fo:inline> font.
+
+ </fo:block>
+
+ <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="3pt">
+ The following text decorations are defined in the WD:
+ </fo:block>
+
+ <fo:list-block>
+
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>
+ <fo:inline text-decoration="none">none</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>
+ <fo:inline text-decoration="underline">underline</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>
+ <fo:inline text-decoration="overline">overline</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>
+ <fo:inline text-decoration="line-through">line-through</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>
+ <fo:inline text-decoration="blink">blink</fo:inline>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+
+ </fo:list-block>
+
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
private String configFile, outFile;
private String [] filenameList;
private String filenames;
- private ArrayList files = new ArrayList();
+ private Vector files = new Vector();
//sets name of configuration file, which must
//be an xml file conforming to the book.dtd used by xml-site
{
String line, filename;
BufferedReader in;
- Iterator iterator = files.iterator();
+ Enumeration iterator = files.elements();
try {
BufferedWriter out =
new BufferedWriter (new FileWriter("compileXMLFiles-tmp.xml"));
"<!DOCTYPE documentation [\n" +
"<!ENTITY nbsp \" \">\n" +
"]>\n<documentation>");
- while (iterator.hasNext()) {
- filename = (String) iterator.next();
+ while (iterator.hasMoreElements()) {
+ filename = (String) iterator.nextElement();
in = new BufferedReader(new FileReader(filename));
while ((line = in.readLine()) != null) {
//kill the lines pointing to the sbk protocol and the xml declaration
String id, label, source;
if (name.equals("document") || name.equals("entry")) {
source = atts.getValue("source");
- files.add(source);
+ files.addElement(source);
}
}
public void endElement (String name)
}
}
if(current != null)
- selectors.add(current);
+ selectors.addElement(current);
}
}
public void deleteRule(int index)
throws DOMException
{
- rules.remove(index);
+ rules.removeElementAt(index);
}
public String getType()
import java.io.InputStream;
import java.io.BufferedInputStream;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Vector;
// FOP
import org.apache.fop.image.FopImageException;
* @version 1.0
*/
public class ImageReaderFactory {
- static protected ArrayList formats = null;
+ static protected Vector formats = null;
/**
* ImageReader maker.
throws FopImageException {
// need to use a config file and remove static methods
- formats = new ArrayList();
- formats.add(new JPEGReader());
- formats.add(new BMPReader());
- formats.add(new GIFReader());
- formats.add(new PNGReader());
- formats.add(new SVGReader());
+ formats = new Vector();
+ formats.addElement(new JPEGReader());
+ formats.addElement(new BMPReader());
+ formats.addElement(new GIFReader());
+ formats.addElement(new PNGReader());
+ formats.addElement(new SVGReader());
//
ImageReader reader;
BufferedInputStream bis = new BufferedInputStream(in);
- Iterator itr = formats.iterator();
+ Enumeration itr = formats.elements();
try {
- while (itr.hasNext()) {
- reader = (ImageReader) itr.next();
+ while (itr.hasMoreElements()) {
+ reader = (ImageReader) itr.nextElement();
if (reader.verifySignature(bis)) {
return reader;
}
import java.io.*;
import java.util.*;
-import javax.swing.*;
+//import javax.swing.*;
/** The class MessageHandler contains the static methods log and error which
* should be used for any end user information instead of System.out.print() or
float height = 0;
try {
if(st.hasMoreTokens()) {
- x = Float.parseFloat(st.nextToken());
+ x = Double.valueOf(st.nextToken()).floatValue();
}
if(st.hasMoreTokens()) {
- y = Float.parseFloat(st.nextToken());
+ y = Double.valueOf(st.nextToken()).floatValue();
}
if(st.hasMoreTokens()) {
- width = Float.parseFloat(st.nextToken());
+ width = Double.valueOf(st.nextToken()).floatValue();
}
if(st.hasMoreTokens()) {
- height = Float.parseFloat(st.nextToken());
+ height = Double.valueOf(st.nextToken()).floatValue();
}
} catch(Exception e) {
}