public final class JRTextMeasurerUtil extends Object
JRTextMeasurer
,
JRTextMeasurerFactory
Modifier and Type | Class and Description |
---|---|
static class |
JRTextMeasurerUtil.WrappingTextMeasurerFactory
Deprecated.
To be removed.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_TEXT_MEASURER_FACTORY
Property that specifies a text measurer factory.
|
Modifier and Type | Method and Description |
---|---|
JRTextMeasurer |
createTextMeasurer(JRCommonText text)
Creates a text measurer for a text object.
|
JRTextMeasurer |
createTextMeasurer(JRCommonText text,
JRPropertiesHolder propertiesHolder)
Creates a text measurer for a text object.
|
JRTextMeasurerFactory |
getFactory(JRPropertiesHolder propertiesHolder)
Returns the text measurer factory given a set of properties.
|
static JRTextMeasurerUtil |
getInstance(JasperReportsContext jasperReportsContext) |
JRTextMeasurerFactory |
getTextMeasurerFactory(JRPropertiesHolder propertiesHolder)
Deprecated.
Replaced by
getFactory(JRPropertiesHolder) . |
protected String |
getTextMeasurerFactoryClass(JRPropertiesHolder propertiesHolder) |
void |
measureTextElement(JRPrintText printText) |
public static final String PROPERTY_TEXT_MEASURER_FACTORY
This property can either hold the name of a text measurer factory class, e.g.
or hold an alias of a text measurer factory class property, e.g.
net.sf.jasperreports.text.measurer.factory=org.me.MyTextMeasurerFactory
net.sf.jasperreports.text.measurer.factory=myTextMeasurer
...
net.sf.jasperreports.text.measurer.factory.myTextMeasurer=org.me.MyTextMeasurerFactory
JRTextMeasurerFactory
,
Constant Field Valuespublic static JRTextMeasurerUtil getInstance(JasperReportsContext jasperReportsContext)
public JRTextMeasurer createTextMeasurer(JRCommonText text)
If the text object is an instance of JRPropertiesHolder
, its properties
are used when determining the text measurer factory.
text
- the text objectpublic JRTextMeasurer createTextMeasurer(JRCommonText text, JRPropertiesHolder propertiesHolder)
text
- the text objectpropertiesHolder
- the properties to use for determining the text measurer factory;
can be null
public JRTextMeasurerFactory getTextMeasurerFactory(JRPropertiesHolder propertiesHolder)
getFactory(JRPropertiesHolder)
.public JRTextMeasurerFactory getFactory(JRPropertiesHolder propertiesHolder)
propertiesHolder
- the properties holderprotected String getTextMeasurerFactoryClass(JRPropertiesHolder propertiesHolder)
public void measureTextElement(JRPrintText printText)
Copyright © 2017. All rights reserved.