Package net.sf.jasperreports.engine.base
Class JRBaseFont
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseFont
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRChangeEventsSupport,JRCloneable,JRFont,JRStyleContainer
- Direct Known Subclasses:
JRDesignFont
public class JRBaseFont extends java.lang.Object implements JRFont, java.io.Serializable, JRChangeEventsSupport, JRCloneable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringfontNameprotected java.lang.Floatfontsizeprotected java.lang.BooleanisBoldprotected java.lang.BooleanisItalicprotected java.lang.BooleanisPdfEmbeddedprotected java.lang.BooleanisStrikeThroughprotected java.lang.BooleanisUnderlineprotected java.lang.StringpdfEncodingprotected java.lang.StringpdfFontNamestatic java.lang.StringPROPERTY_BOLDstatic java.lang.StringPROPERTY_FONT_NAMEstatic java.lang.StringPROPERTY_FONT_SIZEstatic java.lang.StringPROPERTY_ITALICstatic java.lang.StringPROPERTY_PDF_EMBEDDEDstatic java.lang.StringPROPERTY_PDF_ENCODINGstatic java.lang.StringPROPERTY_PDF_FONT_NAMEstatic java.lang.StringPROPERTY_REPORT_FONTstatic java.lang.StringPROPERTY_STRIKE_THROUGHstatic java.lang.StringPROPERTY_UNDERLINEprotected JRStylestyleprotected JRStyleContainerstyleContainerprotected java.lang.StringstyleNameReference-
Fields inherited from interface net.sf.jasperreports.engine.JRFont
DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_PDF_EMBEDDED, DEFAULT_PDF_ENCODING, DEFAULT_PDF_FONT_NAME
-
-
Constructor Summary
Constructors Constructor Description JRBaseFont()JRBaseFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes)JRBaseFont(JRStyleContainer styleContainer)JRBaseFont(JRStyleContainer styleContainer, JRFont font)JRBaseFont(JRStyleContainer styleContainer, JRFont font, JRAbstractObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()JRDefaultStyleProvidergetDefaultStyleProvider()JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.java.lang.StringgetFontName()floatgetFontsize()java.lang.StringgetOwnFontName()java.lang.FloatgetOwnFontsize()java.lang.StringgetOwnPdfEncoding()java.lang.StringgetOwnPdfFontName()java.lang.StringgetPdfEncoding()java.lang.StringgetPdfFontName()JRStylegetStyle()Returns this object's style.java.lang.StringgetStyleNameReference()Returns the name of an external style which is to be used by this object.protected StyleResolvergetStyleResolver()booleanisBold()booleanisItalic()java.lang.BooleanisOwnBold()java.lang.BooleanisOwnItalic()java.lang.BooleanisOwnPdfEmbedded()java.lang.BooleanisOwnStrikeThrough()java.lang.BooleanisOwnUnderline()booleanisPdfEmbedded()booleanisStrikeThrough()booleanisUnderline()voidsetBold(java.lang.Boolean isBold)Alternative setBold method which allows also to reset the "own" isBold property.voidsetFontName(java.lang.String fontName)voidsetFontSize(java.lang.Float fontSize)Method which allows also to reset the "own" size property.voidsetItalic(java.lang.Boolean isItalic)Alternative setItalic method which allows also to reset the "own" isItalic property.voidsetPdfEmbedded(java.lang.Boolean isPdfEmbedded)Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.voidsetPdfEncoding(java.lang.String pdfEncoding)voidsetPdfFontName(java.lang.String pdfFontName)voidsetStrikeThrough(java.lang.Boolean isStrikeThrough)Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.voidsetUnderline(java.lang.Boolean isUnderline)Alternative setUnderline method which allows also to reset the "own" isUnderline property.
-
-
-
Field Detail
-
PROPERTY_BOLD
public static final java.lang.String PROPERTY_BOLD
- See Also:
- Constant Field Values
-
PROPERTY_FONT_NAME
public static final java.lang.String PROPERTY_FONT_NAME
- See Also:
- Constant Field Values
-
PROPERTY_FONT_SIZE
public static final java.lang.String PROPERTY_FONT_SIZE
- See Also:
- Constant Field Values
-
PROPERTY_ITALIC
public static final java.lang.String PROPERTY_ITALIC
- See Also:
- Constant Field Values
-
PROPERTY_PDF_EMBEDDED
public static final java.lang.String PROPERTY_PDF_EMBEDDED
- See Also:
- Constant Field Values
-
PROPERTY_PDF_ENCODING
public static final java.lang.String PROPERTY_PDF_ENCODING
- See Also:
- Constant Field Values
-
PROPERTY_PDF_FONT_NAME
public static final java.lang.String PROPERTY_PDF_FONT_NAME
- See Also:
- Constant Field Values
-
PROPERTY_REPORT_FONT
public static final java.lang.String PROPERTY_REPORT_FONT
- See Also:
- Constant Field Values
-
PROPERTY_STRIKE_THROUGH
public static final java.lang.String PROPERTY_STRIKE_THROUGH
- See Also:
- Constant Field Values
-
PROPERTY_UNDERLINE
public static final java.lang.String PROPERTY_UNDERLINE
- See Also:
- Constant Field Values
-
styleContainer
protected JRStyleContainer styleContainer
-
style
protected JRStyle style
-
styleNameReference
protected java.lang.String styleNameReference
-
fontName
protected java.lang.String fontName
-
isBold
protected java.lang.Boolean isBold
-
isItalic
protected java.lang.Boolean isItalic
-
isUnderline
protected java.lang.Boolean isUnderline
-
isStrikeThrough
protected java.lang.Boolean isStrikeThrough
-
fontsize
protected java.lang.Float fontsize
-
pdfFontName
protected java.lang.String pdfFontName
-
pdfEncoding
protected java.lang.String pdfEncoding
-
isPdfEmbedded
protected java.lang.Boolean isPdfEmbedded
-
-
Constructor Detail
-
JRBaseFont
public JRBaseFont()
-
JRBaseFont
public JRBaseFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes)
-
JRBaseFont
public JRBaseFont(JRStyleContainer styleContainer)
-
JRBaseFont
public JRBaseFont(JRStyleContainer styleContainer, JRFont font)
-
JRBaseFont
public JRBaseFont(JRStyleContainer styleContainer, JRFont font, JRAbstractObjectFactory factory)
-
-
Method Detail
-
getDefaultStyleProvider
public JRDefaultStyleProvider getDefaultStyleProvider()
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getStyle
public JRStyle getStyle()
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
getStyleNameReference
public java.lang.String getStyleNameReference()
Description copied from interface:JRStyleContainerReturns the name of an external style which is to be used by this object. External styles are defined intemplatesand are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()is specified for this object.- Specified by:
getStyleNameReferencein interfaceJRStyleContainer- Returns:
- the name of an external style
-
getFontName
public java.lang.String getFontName()
- Specified by:
getFontNamein interfaceJRFont
-
getOwnFontName
public java.lang.String getOwnFontName()
- Specified by:
getOwnFontNamein interfaceJRFont
-
setFontName
public void setFontName(java.lang.String fontName)
- Specified by:
setFontNamein interfaceJRFont
-
setBold
public void setBold(java.lang.Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.
-
isOwnItalic
public java.lang.Boolean isOwnItalic()
- Specified by:
isOwnItalicin interfaceJRFont
-
setItalic
public void setItalic(java.lang.Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.
-
isUnderline
public boolean isUnderline()
- Specified by:
isUnderlinein interfaceJRFont
-
isOwnUnderline
public java.lang.Boolean isOwnUnderline()
- Specified by:
isOwnUnderlinein interfaceJRFont
-
setUnderline
public void setUnderline(java.lang.Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderlinein interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()
- Specified by:
isStrikeThroughin interfaceJRFont
-
isOwnStrikeThrough
public java.lang.Boolean isOwnStrikeThrough()
- Specified by:
isOwnStrikeThroughin interfaceJRFont
-
setStrikeThrough
public void setStrikeThrough(java.lang.Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThroughin interfaceJRFont
-
getFontsize
public float getFontsize()
- Specified by:
getFontsizein interfaceJRFont
-
getOwnFontsize
public java.lang.Float getOwnFontsize()
- Specified by:
getOwnFontsizein interfaceJRFont
-
setFontSize
public void setFontSize(java.lang.Float fontSize)
Method which allows also to reset the "own" size property.- Specified by:
setFontSizein interfaceJRFont
-
getPdfFontName
public java.lang.String getPdfFontName()
- Specified by:
getPdfFontNamein interfaceJRFont
-
getOwnPdfFontName
public java.lang.String getOwnPdfFontName()
- Specified by:
getOwnPdfFontNamein interfaceJRFont
-
setPdfFontName
public void setPdfFontName(java.lang.String pdfFontName)
- Specified by:
setPdfFontNamein interfaceJRFont
-
getPdfEncoding
public java.lang.String getPdfEncoding()
- Specified by:
getPdfEncodingin interfaceJRFont
-
getOwnPdfEncoding
public java.lang.String getOwnPdfEncoding()
- Specified by:
getOwnPdfEncodingin interfaceJRFont
-
setPdfEncoding
public void setPdfEncoding(java.lang.String pdfEncoding)
- Specified by:
setPdfEncodingin interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()
- Specified by:
isPdfEmbeddedin interfaceJRFont
-
isOwnPdfEmbedded
public java.lang.Boolean isOwnPdfEmbedded()
- Specified by:
isOwnPdfEmbeddedin interfaceJRFont
-
setPdfEmbedded
public void setPdfEmbedded(java.lang.Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbeddedin interfaceJRFont
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
-