public enum StretchTypeEnum extends Enum<StretchTypeEnum> implements JREnum
First, there is the natural stretch of the element, which is caused by the element growing naturally in order to display its entire content. This is the case with text fields that have isStretchWithOverflow set to true and thus growing in height in order to display all the rows of text that the value of their text field expression provides at runtime.
Secondly, there is the forced stretch of an element, which in addition to its natural growth required by its own content, needs to further grow to match the growing height of some other element that it is put in relation with at report design time.
A forced stretch can be imposed to elements that are part of element groups (JRElementGroup) or element containers (bands, frames, table cells, list cells, etc.).
The forced stretch also comes in two flavors.
There is element group stretch and container stretch.
Element group stretch is forced upon an element by the natural growth of the other elements in the same group.
The container stretch is forced upon an element by all types of growth that the container itself suffers,
including forced container stretch imposed onto the container by its own parent container.
Enum Constant and Description |
---|
CONTAINER_BOTTOM
Constant used for specifying that the element will adapt its height to match the new
height of the container it is placed on, which has been affected by stretch, but also taking
into account the fact that the Y position of the element has probably changed and should be compensated for,
resulting in the element's distance to container bottom being preserved.
|
CONTAINER_HEIGHT
Constant used for specifying that the element will adapt its height to match the new
height of the container it is placed on, which has been affected by stretch, but without taking
into account the fact that the Y position of the element within the container has probably changed due to floating and/or
collapsing white space above it.
|
ELEMENT_GROUP_BOTTOM
Constant used for specifying that the element will adapt its height to match the changing
height of the overall element group it is part of, but also taking into account the fact that the Y position of the
element within the group has probably changed due to floating and/or
collapsing white space above it and should be compensated for, resulting in the element's distance to the group's initial
bottom edge being preserved.
|
ELEMENT_GROUP_HEIGHT
Constant used for specifying that the element will adapt its height to match the changing
height of the overall element group it is part of, but without taking into account the fact that the Y position of the
element within the group has probably changed due to floating and/or
collapsing white space above it.
|
NO_STRETCH
A constant indicating that the element preserves its original specified height.
|
RELATIVE_TO_BAND_HEIGHT
Deprecated.
Replaced by
CONTAINER_HEIGHT . |
RELATIVE_TO_TALLEST_OBJECT
Deprecated.
Replaced by
ELEMENT_GROUP_HEIGHT . |
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_LEGACY_ELEMENT_STRETCH_ENABLED |
Modifier and Type | Method and Description |
---|---|
static StretchTypeEnum |
getByName(String name) |
static StretchTypeEnum |
getByValue(byte value)
Deprecated.
Used only by deprecated serialized fields.
|
static StretchTypeEnum |
getByValue(Byte value)
Deprecated.
Used only by deprecated serialized fields.
|
String |
getName() |
byte |
getValue()
Deprecated.
Used only by deprecated serialized fields.
|
Byte |
getValueByte()
Deprecated.
Used only by deprecated serialized fields.
|
static StretchTypeEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StretchTypeEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StretchTypeEnum NO_STRETCH
public static final StretchTypeEnum RELATIVE_TO_TALLEST_OBJECT
ELEMENT_GROUP_HEIGHT
.public static final StretchTypeEnum RELATIVE_TO_BAND_HEIGHT
CONTAINER_HEIGHT
.public static final StretchTypeEnum ELEMENT_GROUP_HEIGHT
public static final StretchTypeEnum ELEMENT_GROUP_BOTTOM
public static final StretchTypeEnum CONTAINER_HEIGHT
public static final StretchTypeEnum CONTAINER_BOTTOM
public static final String PROPERTY_LEGACY_ELEMENT_STRETCH_ENABLED
public static StretchTypeEnum[] values()
for (StretchTypeEnum c : StretchTypeEnum.values()) System.out.println(c);
public static StretchTypeEnum valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Byte getValueByte()
getValueByte
in interface JREnum
public final byte getValue()
public static StretchTypeEnum getByName(String name)
public static StretchTypeEnum getByValue(Byte value)
public static StretchTypeEnum getByValue(byte value)
Copyright © 2016. All rights reserved.