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
ConstructorsConstructorDescriptionIconLabelComponentFill
(IconLabelComponent iconLabelComponent, JRFillCloneFactory factory) IconLabelComponentFill
(IconLabelComponent iconLabelComponent, JRFillObjectFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copy
(JRGenericPrintElement printElement) protected void
copy
(JRPrintFrame printFrame) createClone
(JRFillCloneFactory factory) void
evaluate
(byte evaluation) Evaluates the fill component.void
evaluateDelayedElement
(JRPrintElement element, byte evaluation) The default implementation throwsUnsupportedOperationException
.fill()
Fills the component by creating a print element which will be included in the generated report.void
void
Gets the image horizontal alignment.protected IconLabelComponent
getStyle()
Returns this object's style.Returns the name of an external style which is to be used by this object.protected StyleResolver
Gets the image vertical alignment.prepare
(int availableHeight) prepare
(int availableHeight, boolean isOverflowAllowed) Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.void
setConditionalStylesContainer
(JRFillElementContainer conditionalStylesContainer) void
setHorizontalImageAlign
(HorizontalImageAlignEnum horizontalAlignment) Sets the image horizontal alignment.void
setStretchHeight
(int stretchHeight) void
setVerticalImageAlign
(VerticalImageAlignEnum verticalAlignment) Gets the image vertical alignment.Methods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
deduplicate, evaluateExpression, initialize, rewind
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleName
-
Constructor Details
-
IconLabelComponentFill
-
IconLabelComponentFill
-
-
Method Details
-
getIconLabelComponent
-
evaluate
Description copied from interface:FillComponent
Evaluates 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:
evaluate
in interfaceFillComponent
- Parameters:
evaluation
- the evaluation type- Throws:
JRException
- See Also:
-
fill
Description copied from interface:FillComponent
Fills 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:
fill
in 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:
setStretchHeight
in interfaceStretchableFillComponent
-
setConditionalStylesContainer
- Specified by:
setConditionalStylesContainer
in interfaceConditionalStyleAwareFillComponent
-
prepare
- Specified by:
prepare
in interfaceFillComponent
-
prepare
Description copied from interface:FillComponent
Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.- Specified by:
prepare
in interfaceFillComponent
- Parameters:
availableHeight
- the amount of vertical space available for the component, starting from the top of the component element.isOverflowAllowed
- flag indicating if overflow is allowed for the component.- Returns:
- the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
-
createClone
-
evaluateDelayedElement
Description copied from class:BaseFillComponent
The default implementation throwsUnsupportedOperationException
.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElement
in interfaceFillComponent
- Overrides:
evaluateDelayedElement
in classBaseFillComponent
- Parameters:
element
- the print element for which delayed evaluation has been registeredevaluation
- the evaluation type- Throws:
JRException
- See Also:
-
copy
-
copy
-
getDefaultLineColor
- Specified by:
getDefaultLineColor
in interfaceJRBoxContainer
-
getDefaultStyleProvider
- Specified by:
getDefaultStyleProvider
in interfaceJRStyleContainer
-
getStyleResolver
-
getStyle
Description copied from interface:JRStyleContainer
Returns this object's style.- Specified by:
getStyle
in interfaceJRStyleContainer
- Returns:
- this object's style
-
getStyleNameReference
Description copied from interface:JRStyleContainer
Returns the name of an external style which is to be used by this object. External styles are defined intemplates
and are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()
is specified for this object.- Specified by:
getStyleNameReference
in interfaceJRStyleContainer
- Returns:
- the name of an external style
-
getLineBox
- Specified by:
getLineBox
in interfaceJRBoxContainer
-
getHorizontalImageAlign
Description copied from interface:JRImageAlignment
Gets the image horizontal alignment.- Specified by:
getHorizontalImageAlign
in interfaceJRImageAlignment
- Returns:
- a value representing one of the horizontal image alignment constants in
HorizontalImageAlignEnum
-
getOwnHorizontalImageAlign
- Specified by:
getOwnHorizontalImageAlign
in interfaceJRImageAlignment
-
setHorizontalImageAlign
Description copied from interface:JRImageAlignment
Sets the image horizontal alignment.- Specified by:
setHorizontalImageAlign
in interfaceJRImageAlignment
- Parameters:
horizontalAlignment
- a value representing one of the horizontal image alignment constants inHorizontalImageAlignEnum
-
getVerticalImageAlign
Description copied from interface:JRImageAlignment
Gets the image vertical alignment.- Specified by:
getVerticalImageAlign
in interfaceJRImageAlignment
- Returns:
- a value representing one of the vertical image alignment constants in
VerticalImageAlignEnum
-
getOwnVerticalImageAlign
- Specified by:
getOwnVerticalImageAlign
in interfaceJRImageAlignment
-
setVerticalImageAlign
Description copied from interface:JRImageAlignment
Gets the image vertical alignment.- Specified by:
setVerticalImageAlign
in interfaceJRImageAlignment
- Parameters:
verticalAlignment
- a value representing one of the vertical image alignment constants inVerticalImageAlignEnum
-