Class IconLabelComponentFill
- java.lang.Object
-
- net.sf.jasperreports.engine.component.BaseFillComponent
-
- net.sf.jasperreports.components.iconlabel.IconLabelComponentFill
-
- All Implemented Interfaces:
ConditionalStyleAwareFillComponent,FillComponent,StretchableFillComponent,JRBoxContainer,JRImageAlignment,JRStyleContainer
public class IconLabelComponentFill extends BaseFillComponent implements StretchableFillComponent, ConditionalStyleAwareFillComponent, JRBoxContainer, JRImageAlignment
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
fillContext, printElementOriginator
-
-
Constructor Summary
Constructors Constructor Description IconLabelComponentFill(IconLabelComponent iconLabelComponent, JRFillCloneFactory factory)IconLabelComponentFill(IconLabelComponent iconLabelComponent, JRFillObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopy(JRGenericPrintElement printElement)protected voidcopy(JRPrintFrame printFrame)JRFillCloneablecreateClone(JRFillCloneFactory factory)voidevaluate(byte evaluation)Evaluates the fill component.voidevaluateDelayedElement(JRPrintElement element, byte evaluation)The default implementation throwsUnsupportedOperationException.JRPrintElementfill()Fills the component by creating a print element which will be included in the generated report.voidfillHorizontal()voidfillVertical()ColorgetDefaultLineColor()JRDefaultStyleProvidergetDefaultStyleProvider()HorizontalImageAlignEnumgetHorizontalImageAlign()Gets the image horizontal alignment.protected IconLabelComponentgetIconLabelComponent()JRLineBoxgetLineBox()HorizontalImageAlignEnumgetOwnHorizontalImageAlign()VerticalImageAlignEnumgetOwnVerticalImageAlign()JRStylegetStyle()Returns this object's style.StringgetStyleNameReference()Returns the name of an external style which is to be used by this object.protected StyleResolvergetStyleResolver()VerticalImageAlignEnumgetVerticalImageAlign()Gets the image vertical alignment.FillPrepareResultprepare(int availableHeight)Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.voidsetConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer)voidsetHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)Sets the image horizontal alignment.voidsetStretchHeight(int stretchHeight)voidsetVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)Gets the image vertical alignment.-
Methods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
deduplicate, evaluateExpression, initialize, rewind
-
-
-
-
Constructor Detail
-
IconLabelComponentFill
public IconLabelComponentFill(IconLabelComponent iconLabelComponent, JRFillObjectFactory factory)
-
IconLabelComponentFill
public IconLabelComponentFill(IconLabelComponent iconLabelComponent, JRFillCloneFactory factory)
-
-
Method Detail
-
getIconLabelComponent
protected IconLabelComponent getIconLabelComponent()
-
evaluate
public void evaluate(byte evaluation) throws JRExceptionDescription copied from interface:FillComponentEvaluates the fill component.This method would evaluate the component expressions and store the results to be used in
FillComponent.fill().If the component needs to delay the evaluation of some of its expressions, it would call
FillContext.registerDelayedEvaluation(JRPrintElement, EvaluationTimeEnum, String)to register a delayed evaluation print element, and perform the delayed evaluations onFillComponent.evaluateDelayedElement(JRPrintElement, byte).- Specified by:
evaluatein interfaceFillComponent- Parameters:
evaluation- the evaluation type- Throws:
JRException- See Also:
FillContext.evaluate(net.sf.jasperreports.engine.JRExpression, byte)
-
fill
public JRPrintElement fill()
Description copied from interface:FillComponentFills the component by creating a print element which will be included in the generated report.This method will get called only if
FillComponent.prepare(int)returned a result that indicated that the component will print.- Specified by:
fillin interfaceFillComponent- Returns:
- the print element generated by the component
-
fillHorizontal
public void fillHorizontal()
-
fillVertical
public void fillVertical()
-
setStretchHeight
public void setStretchHeight(int stretchHeight)
- Specified by:
setStretchHeightin interfaceStretchableFillComponent
-
setConditionalStylesContainer
public void setConditionalStylesContainer(JRFillElementContainer conditionalStylesContainer)
- Specified by:
setConditionalStylesContainerin interfaceConditionalStyleAwareFillComponent
-
prepare
public FillPrepareResult prepare(int availableHeight)
Description copied from interface:FillComponentPrepares to fill the component by deciding whether the component will print, and how much vertical space it will require.- Specified by:
preparein interfaceFillComponent- Parameters:
availableHeight- the amount of vertical space available for the component, starting from the top of the component element.- Returns:
- the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
-
createClone
public JRFillCloneable createClone(JRFillCloneFactory factory)
-
evaluateDelayedElement
public void evaluateDelayedElement(JRPrintElement element, byte evaluation) throws JRException
Description copied from class:BaseFillComponentThe default implementation throwsUnsupportedOperationException.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElementin interfaceFillComponent- Overrides:
evaluateDelayedElementin classBaseFillComponent- Parameters:
element- the print element for which delayed evaluation has been registeredevaluation- the evaluation type- Throws:
JRException- See Also:
FillComponent.evaluate(byte)
-
copy
protected void copy(JRGenericPrintElement printElement)
-
copy
protected void copy(JRPrintFrame printFrame)
-
getDefaultLineColor
public Color getDefaultLineColor()
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
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 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
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getHorizontalImageAlign
public HorizontalImageAlignEnum getHorizontalImageAlign()
Description copied from interface:JRImageAlignmentGets the image horizontal alignment.- Specified by:
getHorizontalImageAlignin interfaceJRImageAlignment- Returns:
- a value representing one of the horizontal image alignment constants in
HorizontalImageAlignEnum
-
getOwnHorizontalImageAlign
public HorizontalImageAlignEnum getOwnHorizontalImageAlign()
- Specified by:
getOwnHorizontalImageAlignin interfaceJRImageAlignment
-
setHorizontalImageAlign
public void setHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)
Description copied from interface:JRImageAlignmentSets the image horizontal alignment.- Specified by:
setHorizontalImageAlignin interfaceJRImageAlignment- Parameters:
horizontalAlignment- a value representing one of the horizontal image alignment constants inHorizontalImageAlignEnum
-
getVerticalImageAlign
public VerticalImageAlignEnum getVerticalImageAlign()
Description copied from interface:JRImageAlignmentGets the image vertical alignment.- Specified by:
getVerticalImageAlignin interfaceJRImageAlignment- Returns:
- a value representing one of the vertical image alignment constants in
VerticalImageAlignEnum
-
getOwnVerticalImageAlign
public VerticalImageAlignEnum getOwnVerticalImageAlign()
- Specified by:
getOwnVerticalImageAlignin interfaceJRImageAlignment
-
setVerticalImageAlign
public void setVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)
Description copied from interface:JRImageAlignmentGets the image vertical alignment.- Specified by:
setVerticalImageAlignin interfaceJRImageAlignment- Parameters:
verticalAlignment- a value representing one of the vertical image alignment constants inVerticalImageAlignEnum
-
-