Package net.sf.jasperreports.engine.type
Enum ScaleImageEnum
- All Implemented Interfaces:
Serializable,Comparable<ScaleImageEnum>,java.lang.constant.Constable,NamedEnum
- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA constant value specifying that if the actual image is larger than the image element size, it will be cut off so that it keeps its original resolution, and only the region that fits the specified size will be displayed.A constant value specifying that if the dimensions of the actual image do not fit those specified for the image element that displays it, the image can be forced to obey them and stretch itself so that it fits in the designated output area.A scale image type that adjusts the image element height to the actual image dimensions.A scale image type that adjusts the image element height in the same way asREAL_HEIGHT, and in addition reduces the image element width to match the width occupied by the rendered image.A constant value specifying that if the actual image does not fit into the image element, it can be adapted to those dimensions without needing to change its original proportions. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScaleImageEnumgetName()static ScaleImageEnumReturns the enum constant of this type with the specified name.static ScaleImageEnum[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface net.sf.jasperreports.engine.type.NamedEnum
getDefault
-
Enum Constant Details
-
CLIP
A constant value specifying that if the actual image is larger than the image element size, it will be cut off so that it keeps its original resolution, and only the region that fits the specified size will be displayed. -
FILL_FRAME
A constant value specifying that if the dimensions of the actual image do not fit those specified for the image element that displays it, the image can be forced to obey them and stretch itself so that it fits in the designated output area. -
RETAIN_SHAPE
A constant value specifying that if the actual image does not fit into the image element, it can be adapted to those dimensions without needing to change its original proportions. -
REAL_HEIGHT
A scale image type that adjusts the image element height to the actual image dimensions. The image element height stretches to accommodate the actual image, but does not shrink below its declared value. If the actual image is wider than the image element, the image is proportionally shrunk to fit the element width and the element height is adjusted accordingly. The image is then rendered proportionally within the element boundaries, preserving its aspect ratio.Several restrictions apply to the image element stretching:
- It only works when the image renderer implements
DimensionRenderable. - Images with delayed evaluation (see
JREvaluation.getEvaluationTime()) do not stretch the element; the image is proportionally shrunk to fit the declared element dimensions. - An image overflows (to the next page/column) only once; after that, the image is rendered in the available space by proportionally shrinking its size.
- See Also:
- It only works when the image renderer implements
-
REAL_SIZE
A scale image type that adjusts the image element height in the same way asREAL_HEIGHT, and in addition reduces the image element width to match the width occupied by the rendered image.This is useful when, for instance, a border needs to be drawn around the image element, tightly wrapping the rendered image content.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
-
getByName
-