public class JRSimpleTemplate extends Object implements JRTemplate, Serializable, JRChangeEventsSupport
JRTemplate implementation.| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_DUPLICATE_TEMPLATE_STYLE |
static String |
PROPERTY_INCLUDED_TEMPLATES |
static String |
PROPERTY_STYLE |
| Constructor and Description |
|---|
JRSimpleTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncludedTemplate(int index,
JRTemplateReference reference)
Adds an included template.
|
void |
addIncludedTemplate(JRTemplateReference reference)
Adds an included template.
|
void |
addIncludedTemplate(String templateLocation)
Adds an included template.
|
void |
addStyle(int index,
JRStyle style)
Adds a style to the template.
|
void |
addStyle(JRStyle style)
Adds a style to the template.
|
protected void |
checkExistingName(String name) |
JRPropertyChangeSupport |
getEventSupport()
Returns the property change support object for this instance.
|
JRTemplateReference[] |
getIncludedTemplates()
Returns the templates included/referenced by this template.
|
List<JRTemplateReference> |
getIncludedTemplatesList() |
JRStyle |
getStyle(String name)
Returns an included style by name.
|
JRStyle[] |
getStyles()
Returns the styles defined in this template.
|
List<JRStyle> |
getStylesList() |
protected boolean |
nameMatches(JRStyle style,
String name) |
boolean |
removeIncludedTemplate(JRTemplateReference reference)
Removes an included template.
|
JRTemplateReference |
removeIncludedTemplate(String location)
Removes an included template.
|
boolean |
removeStyle(JRStyle style)
Removes an included style.
|
JRStyle |
removeStyle(String name)
Removes an included style.
|
public static final String EXCEPTION_MESSAGE_KEY_DUPLICATE_TEMPLATE_STYLE
public static final String PROPERTY_STYLE
public static final String PROPERTY_INCLUDED_TEMPLATES
public JRPropertyChangeSupport getEventSupport()
JRChangeEventsSupportgetEventSupport in interface JRChangeEventsSupportpublic void addStyle(JRStyle style) throws JRException
style - the style to addJRException - when a style with the same name already existspublic void addStyle(int index,
JRStyle style)
throws JRException
style - the style to addJRException - when a style with the same name already existsprotected void checkExistingName(String name) throws JRException
JRExceptionpublic JRStyle getStyle(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(String name)
name - the name of the style to be removednull if not foundpublic JRStyle[] getStyles()
JRTemplategetStyles in interface JRTemplatepublic void addIncludedTemplate(int index,
JRTemplateReference reference)
reference - the template referencegetIncludedTemplates()public void addIncludedTemplate(JRTemplateReference reference)
reference - the template referencegetIncludedTemplates()public void addIncludedTemplate(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(String location)
location - the location of the template to removenull if not foundpublic JRTemplateReference[] getIncludedTemplates()
JRTemplategetIncludedTemplates in interface JRTemplatepublic List<JRTemplateReference> getIncludedTemplatesList()
Copyright © 2017. All rights reserved.