Package net.sf.jasperreports.engine.base
Class JRBaseFont
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseFont
-
- All Implemented Interfaces:
Serializable
,Cloneable
,JRChangeEventsSupport
,JRCloneable
,JRFont
,JRStyleContainer
- Direct Known Subclasses:
JRDesignFont
public class JRBaseFont extends Object implements JRFont, Serializable, JRChangeEventsSupport, JRCloneable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
fontName
protected Float
fontSize
protected Boolean
isBold
protected Boolean
isItalic
protected Boolean
isPdfEmbedded
protected Boolean
isStrikeThrough
protected Boolean
isUnderline
protected String
pdfEncoding
protected String
pdfFontName
static String
PROPERTY_BOLD
static String
PROPERTY_FONT_NAME
static String
PROPERTY_FONT_SIZE
static String
PROPERTY_ITALIC
static String
PROPERTY_PDF_EMBEDDED
static String
PROPERTY_PDF_ENCODING
static String
PROPERTY_PDF_FONT_NAME
static String
PROPERTY_STRIKE_THROUGH
static String
PROPERTY_UNDERLINE
protected JRStyle
style
protected JRStyleContainer
styleContainer
protected String
styleNameReference
-
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(Map<AttributedCharacterIterator.Attribute,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 Object
clone()
JRDefaultStyleProvider
getDefaultStyleProvider()
JRPropertyChangeSupport
getEventSupport()
Returns the property change support object for this instance.String
getFontName()
float
getFontSize()
String
getOwnFontName()
Float
getOwnFontSize()
String
getOwnPdfEncoding()
String
getOwnPdfFontName()
String
getPdfEncoding()
String
getPdfFontName()
JRStyle
getStyle()
Returns this object's style.String
getStyleNameReference()
Returns the name of an external style which is to be used by this object.protected StyleResolver
getStyleResolver()
boolean
isBold()
boolean
isItalic()
Boolean
isOwnBold()
Boolean
isOwnItalic()
Boolean
isOwnPdfEmbedded()
Boolean
isOwnStrikeThrough()
Boolean
isOwnUnderline()
boolean
isPdfEmbedded()
boolean
isStrikeThrough()
boolean
isUnderline()
void
setBold(Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.void
setFontName(String fontName)
void
setFontSize(Float fontSize)
Method which allows also to reset the "own" size property.void
setItalic(Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.void
setPdfEmbedded(Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.void
setPdfEncoding(String pdfEncoding)
void
setPdfFontName(String pdfFontName)
void
setStrikeThrough(Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.void
setUnderline(Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleName
-
-
-
-
Field Detail
-
PROPERTY_BOLD
public static final String PROPERTY_BOLD
- See Also:
- Constant Field Values
-
PROPERTY_FONT_NAME
public static final String PROPERTY_FONT_NAME
- See Also:
- Constant Field Values
-
PROPERTY_FONT_SIZE
public static final String PROPERTY_FONT_SIZE
- See Also:
- Constant Field Values
-
PROPERTY_ITALIC
public static final String PROPERTY_ITALIC
- See Also:
- Constant Field Values
-
PROPERTY_PDF_EMBEDDED
public static final String PROPERTY_PDF_EMBEDDED
- See Also:
- Constant Field Values
-
PROPERTY_PDF_ENCODING
public static final String PROPERTY_PDF_ENCODING
- See Also:
- Constant Field Values
-
PROPERTY_PDF_FONT_NAME
public static final String PROPERTY_PDF_FONT_NAME
- See Also:
- Constant Field Values
-
PROPERTY_STRIKE_THROUGH
public static final String PROPERTY_STRIKE_THROUGH
- See Also:
- Constant Field Values
-
PROPERTY_UNDERLINE
public static final String PROPERTY_UNDERLINE
- See Also:
- Constant Field Values
-
styleContainer
protected JRStyleContainer styleContainer
-
style
protected JRStyle style
-
styleNameReference
protected String styleNameReference
-
fontName
protected String fontName
-
isBold
protected Boolean isBold
-
isItalic
protected Boolean isItalic
-
isUnderline
protected Boolean isUnderline
-
isStrikeThrough
protected Boolean isStrikeThrough
-
fontSize
protected Float fontSize
-
pdfFontName
protected String pdfFontName
-
pdfEncoding
protected String pdfEncoding
-
isPdfEmbedded
protected Boolean isPdfEmbedded
-
-
Constructor Detail
-
JRBaseFont
public JRBaseFont()
-
JRBaseFont
public JRBaseFont(Map<AttributedCharacterIterator.Attribute,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:
getDefaultStyleProvider
in interfaceJRStyleContainer
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getStyle
public JRStyle getStyle()
Description copied from interface:JRStyleContainer
Returns this object's style.- Specified by:
getStyle
in interfaceJRStyleContainer
- Returns:
- this object's style
-
getStyleNameReference
public String getStyleNameReference()
Description copied from interface:JRStyleContainer
Returns the name of an external style which is to be used by this object. External styles are defined intemplates
and are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()
is specified for this object.- Specified by:
getStyleNameReference
in interfaceJRStyleContainer
- Returns:
- the name of an external style
-
getFontName
public String getFontName()
- Specified by:
getFontName
in interfaceJRFont
-
getOwnFontName
public String getOwnFontName()
- Specified by:
getOwnFontName
in interfaceJRFont
-
setFontName
public void setFontName(String fontName)
- Specified by:
setFontName
in interfaceJRFont
-
setBold
public void setBold(Boolean isBold)
Alternative setBold method which allows also to reset the "own" isBold property.
-
isOwnItalic
public Boolean isOwnItalic()
- Specified by:
isOwnItalic
in interfaceJRFont
-
setItalic
public void setItalic(Boolean isItalic)
Alternative setItalic method which allows also to reset the "own" isItalic property.
-
isUnderline
public boolean isUnderline()
- Specified by:
isUnderline
in interfaceJRFont
-
isOwnUnderline
public Boolean isOwnUnderline()
- Specified by:
isOwnUnderline
in interfaceJRFont
-
setUnderline
public void setUnderline(Boolean isUnderline)
Alternative setUnderline method which allows also to reset the "own" isUnderline property.- Specified by:
setUnderline
in interfaceJRFont
-
isStrikeThrough
public boolean isStrikeThrough()
- Specified by:
isStrikeThrough
in interfaceJRFont
-
isOwnStrikeThrough
public Boolean isOwnStrikeThrough()
- Specified by:
isOwnStrikeThrough
in interfaceJRFont
-
setStrikeThrough
public void setStrikeThrough(Boolean isStrikeThrough)
Alternative setStrikeThrough method which allows also to reset the "own" isStrikeThrough property.- Specified by:
setStrikeThrough
in interfaceJRFont
-
getFontSize
public float getFontSize()
- Specified by:
getFontSize
in interfaceJRFont
-
getOwnFontSize
public Float getOwnFontSize()
- Specified by:
getOwnFontSize
in interfaceJRFont
-
setFontSize
public void setFontSize(Float fontSize)
Method which allows also to reset the "own" size property.- Specified by:
setFontSize
in interfaceJRFont
-
getPdfFontName
public String getPdfFontName()
- Specified by:
getPdfFontName
in interfaceJRFont
-
getOwnPdfFontName
public String getOwnPdfFontName()
- Specified by:
getOwnPdfFontName
in interfaceJRFont
-
setPdfFontName
public void setPdfFontName(String pdfFontName)
- Specified by:
setPdfFontName
in interfaceJRFont
-
getPdfEncoding
public String getPdfEncoding()
- Specified by:
getPdfEncoding
in interfaceJRFont
-
getOwnPdfEncoding
public String getOwnPdfEncoding()
- Specified by:
getOwnPdfEncoding
in interfaceJRFont
-
setPdfEncoding
public void setPdfEncoding(String pdfEncoding)
- Specified by:
setPdfEncoding
in interfaceJRFont
-
isPdfEmbedded
public boolean isPdfEmbedded()
- Specified by:
isPdfEmbedded
in interfaceJRFont
-
isOwnPdfEmbedded
public Boolean isOwnPdfEmbedded()
- Specified by:
isOwnPdfEmbedded
in interfaceJRFont
-
setPdfEmbedded
public void setPdfEmbedded(Boolean isPdfEmbedded)
Alternative setPdfEmbedded method which allows also to reset the "own" isPdfEmbedded property.- Specified by:
setPdfEmbedded
in interfaceJRFont
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-
-