Package net.sf.jasperreports.engine.base
Class JRBaseParagraph
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseParagraph
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Deduplicable,JRChangeEventsSupport,JRParagraph,JRStyleContainer
public class JRBaseParagraph extends java.lang.Object implements JRParagraph, java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, Deduplicable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.IntegerfirstLineIndentprotected java.lang.IntegerleftIndentprotected LineSpacingEnumlineSpacingprotected java.lang.FloatlineSpacingSizeprotected JRParagraphContainerparagraphContainerstatic java.lang.StringPROPERTY_FIRST_LINE_INDENTstatic java.lang.StringPROPERTY_LEFT_INDENTstatic java.lang.StringPROPERTY_LINE_SPACINGstatic java.lang.StringPROPERTY_LINE_SPACING_SIZEstatic java.lang.StringPROPERTY_RIGHT_INDENTstatic java.lang.StringPROPERTY_SPACING_AFTERstatic java.lang.StringPROPERTY_SPACING_BEFOREstatic java.lang.StringPROPERTY_TAB_STOP_WIDTHstatic java.lang.StringPROPERTY_TAB_STOPSprotected java.lang.IntegerrightIndentprotected java.lang.IntegerspacingAfterprotected java.lang.IntegerspacingBeforeprotected java.util.List<TabStop>tabStopsprotected java.lang.IntegertabStopWidth-
Fields inherited from interface net.sf.jasperreports.engine.JRParagraph
DEFAULT_FIRST_LINE_INDENT, DEFAULT_LEFT_INDENT, DEFAULT_LINE_SPACING_SIZE, DEFAULT_RIGHT_INDENT, DEFAULT_SPACING_AFTER, DEFAULT_SPACING_BEFORE, DEFAULT_TAB_STOP_WIDTH
-
-
Constructor Summary
Constructors Constructor Description JRBaseParagraph(JRParagraphContainer paragraphContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTabStop(int index, TabStop tabStop)voidaddTabStop(TabStop tabStop)JRParagraphclone(JRParagraphContainer paragraphContainer)JRDefaultStyleProvidergetDefaultStyleProvider()JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.java.lang.IntegergetFirstLineIndent()Gets the text first line indent.intgetHashCode()Returns a hash code to be used for the deduplicate map.java.lang.IntegergetLeftIndent()Gets the text left indent.LineSpacingEnumgetLineSpacing()Gets the text line spacing.java.lang.FloatgetLineSpacingSize()Gets the text line spacing size to be used in combination with the line spacing type.java.lang.IntegergetOwnFirstLineIndent()Gets the text own first line indent.java.lang.IntegergetOwnLeftIndent()Gets the text own left indent.LineSpacingEnumgetOwnLineSpacing()Gets the text own line spacing.java.lang.FloatgetOwnLineSpacingSize()Gets the text own line spacing size to be used in combination with the line spacing type.java.lang.IntegergetOwnRightIndent()Gets the text own right indent.java.lang.IntegergetOwnSpacingAfter()Gets the text own spacing after.java.lang.IntegergetOwnSpacingBefore()Gets the text own spacing before.TabStop[]getOwnTabStops()Gets the custom tab stops.java.lang.IntegergetOwnTabStopWidth()Gets the text own tab stop width.JRParagraphContainergetParagraphContainer()Gets the text line spacing.java.lang.IntegergetRightIndent()Gets the text right indent.java.lang.IntegergetSpacingAfter()Gets the text spacing after.java.lang.IntegergetSpacingBefore()Gets the text spacing before.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()TabStop[]getTabStops()Gets the custom tab stops.java.lang.IntegergetTabStopWidth()Gets the text tab stop width.booleanisIdentical(java.lang.Object object)Determines if this instance is identical to another object.voidpopulateStyle()voidremoveTabStop(int index)voidremoveTabStop(TabStop tabStop)voidsetFirstLineIndent(java.lang.Integer firstLineIndent)Sets the text own first line indent.voidsetLeftIndent(java.lang.Integer leftIndent)Sets the text own left indent.voidsetLineSpacing(LineSpacingEnum lineSpacing)Sets the text line spacing.voidsetLineSpacingSize(java.lang.Float lineSpacingSize)Sets the text line spacing size to be used in combination with the line spacing type.voidsetRightIndent(java.lang.Integer rightIndent)Sets the text own right indent.voidsetSpacingAfter(java.lang.Integer spacingAfter)Sets the text own spacing after.voidsetSpacingBefore(java.lang.Integer spacingBefore)Sets the text own spacing before.voidsetTabStopWidth(java.lang.Integer tabStopWidth)Sets the text own tab stop width.
-
-
-
Field Detail
-
PROPERTY_LINE_SPACING
public static final java.lang.String PROPERTY_LINE_SPACING
- See Also:
- Constant Field Values
-
PROPERTY_LINE_SPACING_SIZE
public static final java.lang.String PROPERTY_LINE_SPACING_SIZE
- See Also:
- Constant Field Values
-
PROPERTY_FIRST_LINE_INDENT
public static final java.lang.String PROPERTY_FIRST_LINE_INDENT
- See Also:
- Constant Field Values
-
PROPERTY_LEFT_INDENT
public static final java.lang.String PROPERTY_LEFT_INDENT
- See Also:
- Constant Field Values
-
PROPERTY_RIGHT_INDENT
public static final java.lang.String PROPERTY_RIGHT_INDENT
- See Also:
- Constant Field Values
-
PROPERTY_SPACING_BEFORE
public static final java.lang.String PROPERTY_SPACING_BEFORE
- See Also:
- Constant Field Values
-
PROPERTY_SPACING_AFTER
public static final java.lang.String PROPERTY_SPACING_AFTER
- See Also:
- Constant Field Values
-
PROPERTY_TAB_STOP_WIDTH
public static final java.lang.String PROPERTY_TAB_STOP_WIDTH
- See Also:
- Constant Field Values
-
PROPERTY_TAB_STOPS
public static final java.lang.String PROPERTY_TAB_STOPS
- See Also:
- Constant Field Values
-
paragraphContainer
protected JRParagraphContainer paragraphContainer
-
lineSpacing
protected LineSpacingEnum lineSpacing
-
lineSpacingSize
protected java.lang.Float lineSpacingSize
-
firstLineIndent
protected java.lang.Integer firstLineIndent
-
leftIndent
protected java.lang.Integer leftIndent
-
rightIndent
protected java.lang.Integer rightIndent
-
spacingBefore
protected java.lang.Integer spacingBefore
-
spacingAfter
protected java.lang.Integer spacingAfter
-
tabStopWidth
protected java.lang.Integer tabStopWidth
-
tabStops
protected java.util.List<TabStop> tabStops
-
-
Constructor Detail
-
JRBaseParagraph
public JRBaseParagraph(JRParagraphContainer paragraphContainer)
-
-
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
-
getParagraphContainer
public JRParagraphContainer getParagraphContainer()
Description copied from interface:JRParagraphGets the text line spacing.- Specified by:
getParagraphContainerin interfaceJRParagraph- Returns:
- a value representing one of the line spacing constants in
LineSpacingEnum
-
getLineSpacing
public LineSpacingEnum getLineSpacing()
Description copied from interface:JRParagraphGets the text line spacing.- Specified by:
getLineSpacingin interfaceJRParagraph- Returns:
- a value representing one of the line spacing constants in
LineSpacingEnum
-
getOwnLineSpacing
public LineSpacingEnum getOwnLineSpacing()
Description copied from interface:JRParagraphGets the text own line spacing.- Specified by:
getOwnLineSpacingin interfaceJRParagraph- Returns:
- a value representing one of the line spacing constants in
LineSpacingEnum
-
setLineSpacing
public void setLineSpacing(LineSpacingEnum lineSpacing)
Description copied from interface:JRParagraphSets the text line spacing.- Specified by:
setLineSpacingin interfaceJRParagraph- Parameters:
lineSpacing- a value representing one of the line spacing constants inLineSpacingEnum
-
getLineSpacingSize
public java.lang.Float getLineSpacingSize()
Description copied from interface:JRParagraphGets the text line spacing size to be used in combination with the line spacing type.- Specified by:
getLineSpacingSizein interfaceJRParagraph
-
getOwnLineSpacingSize
public java.lang.Float getOwnLineSpacingSize()
Description copied from interface:JRParagraphGets the text own line spacing size to be used in combination with the line spacing type.- Specified by:
getOwnLineSpacingSizein interfaceJRParagraph
-
setLineSpacingSize
public void setLineSpacingSize(java.lang.Float lineSpacingSize)
Description copied from interface:JRParagraphSets the text line spacing size to be used in combination with the line spacing type.- Specified by:
setLineSpacingSizein interfaceJRParagraph
-
getFirstLineIndent
public java.lang.Integer getFirstLineIndent()
Description copied from interface:JRParagraphGets the text first line indent.- Specified by:
getFirstLineIndentin interfaceJRParagraph
-
getOwnFirstLineIndent
public java.lang.Integer getOwnFirstLineIndent()
Description copied from interface:JRParagraphGets the text own first line indent.- Specified by:
getOwnFirstLineIndentin interfaceJRParagraph
-
setFirstLineIndent
public void setFirstLineIndent(java.lang.Integer firstLineIndent)
Description copied from interface:JRParagraphSets the text own first line indent.- Specified by:
setFirstLineIndentin interfaceJRParagraph
-
getLeftIndent
public java.lang.Integer getLeftIndent()
Description copied from interface:JRParagraphGets the text left indent.- Specified by:
getLeftIndentin interfaceJRParagraph
-
getOwnLeftIndent
public java.lang.Integer getOwnLeftIndent()
Description copied from interface:JRParagraphGets the text own left indent.- Specified by:
getOwnLeftIndentin interfaceJRParagraph
-
setLeftIndent
public void setLeftIndent(java.lang.Integer leftIndent)
Description copied from interface:JRParagraphSets the text own left indent.- Specified by:
setLeftIndentin interfaceJRParagraph
-
getRightIndent
public java.lang.Integer getRightIndent()
Description copied from interface:JRParagraphGets the text right indent.- Specified by:
getRightIndentin interfaceJRParagraph
-
getOwnRightIndent
public java.lang.Integer getOwnRightIndent()
Description copied from interface:JRParagraphGets the text own right indent.- Specified by:
getOwnRightIndentin interfaceJRParagraph
-
setRightIndent
public void setRightIndent(java.lang.Integer rightIndent)
Description copied from interface:JRParagraphSets the text own right indent.- Specified by:
setRightIndentin interfaceJRParagraph
-
getSpacingBefore
public java.lang.Integer getSpacingBefore()
Description copied from interface:JRParagraphGets the text spacing before.- Specified by:
getSpacingBeforein interfaceJRParagraph
-
getOwnSpacingBefore
public java.lang.Integer getOwnSpacingBefore()
Description copied from interface:JRParagraphGets the text own spacing before.- Specified by:
getOwnSpacingBeforein interfaceJRParagraph
-
setSpacingBefore
public void setSpacingBefore(java.lang.Integer spacingBefore)
Description copied from interface:JRParagraphSets the text own spacing before.- Specified by:
setSpacingBeforein interfaceJRParagraph
-
getSpacingAfter
public java.lang.Integer getSpacingAfter()
Description copied from interface:JRParagraphGets the text spacing after.- Specified by:
getSpacingAfterin interfaceJRParagraph
-
getOwnSpacingAfter
public java.lang.Integer getOwnSpacingAfter()
Description copied from interface:JRParagraphGets the text own spacing after.- Specified by:
getOwnSpacingAfterin interfaceJRParagraph
-
setSpacingAfter
public void setSpacingAfter(java.lang.Integer spacingAfter)
Description copied from interface:JRParagraphSets the text own spacing after.- Specified by:
setSpacingAfterin interfaceJRParagraph
-
getTabStopWidth
public java.lang.Integer getTabStopWidth()
Description copied from interface:JRParagraphGets the text tab stop width.- Specified by:
getTabStopWidthin interfaceJRParagraph
-
getOwnTabStopWidth
public java.lang.Integer getOwnTabStopWidth()
Description copied from interface:JRParagraphGets the text own tab stop width.- Specified by:
getOwnTabStopWidthin interfaceJRParagraph
-
setTabStopWidth
public void setTabStopWidth(java.lang.Integer tabStopWidth)
Description copied from interface:JRParagraphSets the text own tab stop width.- Specified by:
setTabStopWidthin interfaceJRParagraph
-
getTabStops
public TabStop[] getTabStops()
Description copied from interface:JRParagraphGets the custom tab stops.- Specified by:
getTabStopsin interfaceJRParagraph
-
getOwnTabStops
public TabStop[] getOwnTabStops()
Description copied from interface:JRParagraphGets the custom tab stops.- Specified by:
getOwnTabStopsin interfaceJRParagraph
-
addTabStop
public void addTabStop(TabStop tabStop)
- Specified by:
addTabStopin interfaceJRParagraph
-
addTabStop
public void addTabStop(int index, TabStop tabStop)- Specified by:
addTabStopin interfaceJRParagraph
-
removeTabStop
public void removeTabStop(TabStop tabStop)
- Specified by:
removeTabStopin interfaceJRParagraph
-
removeTabStop
public void removeTabStop(int index)
- Specified by:
removeTabStopin interfaceJRParagraph
-
clone
public JRParagraph clone(JRParagraphContainer paragraphContainer)
- Specified by:
clonein interfaceJRParagraph
-
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
-
getHashCode
public int getHashCode()
Description copied from interface:DeduplicableReturns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwhDeduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.- Specified by:
getHashCodein interfaceDeduplicable- Returns:
- deduplication hash code
-
isIdentical
public boolean isIdentical(java.lang.Object object)
Description copied from interface:DeduplicableDetermines if this instance is identical to another object.- Specified by:
isIdenticalin interfaceDeduplicable- Parameters:
object- the object to compare with this instance- Returns:
trueif the two objects are identical and can be deduplicated
-
populateStyle
public void populateStyle()
- Specified by:
populateStylein interfaceJRParagraph
-
-