public class IlvFOUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IlvFOUtil.ComponentPaintable
This class is a
Paintable that paints a Component
without scaling. |
static interface |
IlvFOUtil.Paintable
This interface denotes a graphic entity that can paint itself onto an
output device.
|
Modifier and Type | Field and Description |
---|---|
static String |
FONamespaceUri
The namespace URI used in the generation of XSL-FO.
|
static String |
SVGNamespaceUri
The namespace URI used in the generation of embedded SVG elements inside
XSL-FO.
|
Modifier and Type | Method and Description |
---|---|
static Element |
paintToFO(Document document,
Component component)
Deprecated.
Starting with JViews 8.8, please use
paintToFOUnscaled(Document, ilog.views.util.print.IlvFOUtil.ComponentPaintable)
instead. |
static Element |
paintToFO(Document document,
IlvFOUtil.Paintable component,
int width,
int height)
Generates an XSL-FO
element representing the given paintable object.
|
static Element |
paintToFOFitted(Document document,
IlvFOUtil.ComponentPaintable paintable,
int availableWidth,
int availableHeight,
int horizontalAlignment,
int verticalAlignment)
Generates an XSL-FO
element representing the given component.
|
static Element |
paintToFOScaled(Document document,
IlvFOUtil.ComponentPaintable paintable,
double scaleFactor)
Generates an XSL-FO
element representing the given component.
|
static Element |
paintToFOUnscaled(Document document,
IlvFOUtil.ComponentPaintable paintable)
Generates an XSL-FO
element representing the given component.
|
public static String FONamespaceUri
public static String SVGNamespaceUri
public static Element paintToFO(Document document, IlvFOUtil.Paintable component, int width, int height)
Note: This method operates correctly only if the batik-jviews-svggen jar is available in the CLASSPATH. Otherwise, it returns an empty FO element.
document
- The XML document that the generated element shall become part of.component
- The component to paint.width
- Width attribute of the output FO element. Width is measured in
units of 1/72 of an inch.height
- Height attribute of the output FO element. Height is measured in
units of 1/72 of an inch.@Deprecated public static Element paintToFO(Document document, Component component)
paintToFOUnscaled(Document, ilog.views.util.print.IlvFOUtil.ComponentPaintable)
instead.The component is unscaled, that is, every pixel gets mapped onto a length of 1/72 inch (ca. 0.35 mm).
Note: This method operates correctly only if the batik-jviews-svggen jar is available in the CLASSPATH. Otherwise, it returns an empty FO element.
document
- The XML document that the generated element shall become part of.component
- The component to paint.public static Element paintToFOUnscaled(Document document, IlvFOUtil.ComponentPaintable paintable)
The component is unscaled, that is, every pixel gets mapped onto a length of 1/72 inch (ca. 0.35 mm).
Note: This method operates correctly only if the batik-jviews-svggen jar is available in the CLASSPATH. Otherwise, it returns an empty FO element.
document
- The XML document that the generated element shall become part of.paintable
- A Paintable
object that encapsulates the component to
paint.public static Element paintToFOScaled(Document document, IlvFOUtil.ComponentPaintable paintable, double scaleFactor)
The component is scaled with the given scale factor, that is, every pixel
gets mapped onto a length of scaleFactor
* 1/72 inch.
Note: This method operates correctly only if the batik-jviews-svggen jar is available in the CLASSPATH. Otherwise, it returns an empty FO element.
document
- The XML document that the generated element shall become part of.paintable
- A Paintable
object that encapsulates the component to
paint.scaleFactor
- A scaling factor. Must be > 0.public static Element paintToFOFitted(Document document, IlvFOUtil.ComponentPaintable paintable, int availableWidth, int availableHeight, int horizontalAlignment, int verticalAlignment)
The component is scaled to fit a given rectangular area.
Note: This method operates correctly only if the batik-jviews-svggen jar is available in the CLASSPATH. Otherwise, it returns an empty FO element.
document
- The XML document that the generated element shall become part of.paintable
- A Paintable
object that encapsulates the component to
paint.availableWidth
- The available width, measured in units of 1/72 of an inch.availableHeight
- The available height, measured in units of 1/72 of an inch.horizontalAlignment
- Indicates where to put the representation of the component when
there is more horizontal space than needed. One of
SwingConstants.LEFT
, SwingConstants.RIGHT
,
SwingConstants.LEADING
, SwingConstants.TRAILING
,
SwingConstants.CENTER
.verticalAlignment
- Indicates where to put the representation of the component when
there is more vertical space than needed. One of
SwingConstants.TOP
, SwingConstants.BOTTOM
,
SwingConstants.CENTER
.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.