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()
JRChangeEventsSupport
getEventSupport
in interface JRChangeEventsSupport
public 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
JRException
public 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()
JRTemplate
getStyles
in interface JRTemplate
public 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()
JRTemplate
getIncludedTemplates
in interface JRTemplate
public List<JRTemplateReference> getIncludedTemplatesList()
Copyright © 2021 TIBCO Software Inc.. All rights reserved.