net.sf.jasperreports.engine
public class JRSimpleTemplate extends java.lang.Object implements JRTemplate, java.io.Serializable
JRTemplate implementation.| Constructor and Description |
|---|
JRSimpleTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncludedTemplate(JRTemplateReference reference)
Adds an included template.
|
void |
addIncludedTemplate(java.lang.String templateLocation)
Adds an included template.
|
void |
addStyle(JRStyle style)
Adds a style to the template.
|
protected void |
checkExistingName(java.lang.String name) |
JRReportFont |
getDefaultFont()
Returns a default font.
|
JRStyle |
getDefaultStyle()
Returns a default style.
|
JRTemplateReference[] |
getIncludedTemplates()
Returns the templates included/referenced by this template.
|
JRStyle |
getStyle(java.lang.String name)
Returns an included style by name.
|
JRStyle[] |
getStyles()
Returns the styles defined in this template.
|
protected boolean |
nameMatches(JRStyle style,
java.lang.String name) |
boolean |
removeIncludedTemplate(JRTemplateReference reference)
Removes an included template.
|
JRTemplateReference |
removeIncludedTemplate(java.lang.String location)
Removes an included template.
|
boolean |
removeStyle(JRStyle style)
Removes an included style.
|
JRStyle |
removeStyle(java.lang.String name)
Removes an included style.
|
public void addStyle(JRStyle style) throws JRException
style - the style to addJRException - when a style with the same name already existsprotected void checkExistingName(java.lang.String name)
throws JRException
JRExceptionprotected boolean nameMatches(JRStyle style, java.lang.String name)
public JRStyle getStyle(java.lang.String name)
name - the name of the style to be returnednull if not foundpublic boolean removeStyle(JRStyle style)
style - the style to removetrue if and only if the style has been found and removedpublic JRStyle removeStyle(java.lang.String name)
name - the name of the style to be removednull if not foundpublic JRStyle[] getStyles()
JRTemplategetStyles in interface JRTemplatepublic JRStyle getDefaultStyle()
JRDefaultStyleProvidergetDefaultStyle in interface JRDefaultStyleProviderpublic JRReportFont getDefaultFont()
JRDefaultFontProvidergetDefaultFont in interface JRDefaultFontProviderpublic void addIncludedTemplate(JRTemplateReference reference)
reference - the template referencegetIncludedTemplates()public void addIncludedTemplate(java.lang.String templateLocation)
templateLocation - the template locationgetIncludedTemplates()public boolean removeIncludedTemplate(JRTemplateReference reference)
reference - the template reference to removetrue if and only if the included template has been found and removedpublic JRTemplateReference removeIncludedTemplate(java.lang.String location)
location - the location of the template to removenull if not foundpublic JRTemplateReference[] getIncludedTemplates()
JRTemplategetIncludedTemplates in interface JRTemplate© 2001-2010 Jaspersoft Corporation www.jaspersoft.com