Package de.xima.fc.common.workflow.bpmn
Class WorkflowBpmnTextLayoutSettings
- java.lang.Object
-
- de.xima.fc.common.workflow.bpmn.WorkflowBpmnTextLayoutSettings
-
public final class WorkflowBpmnTextLayoutSettings extends Object
Factory for creatingWorkflowBpmnTextLayoutSettings
instances.- Since:
- 8.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkflowBpmnTextLayoutSettings.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WorkflowBpmnTextLayoutSettings.Builder
builder()
Creates a new builder forWorkflowBpmnTextLayoutSettings
.boolean
coalesceSpaces()
Whether to coalesce multiple spaces into a single space.WorkflowBpmnTextLayoutSettings.Builder
derive()
Derives a new builder for the text layout settings, using the current settings as defaults.boolean
explicitBounds()
Whether the name in the BPMN diagram should have theBounds
set explicitly.QuantityDouble<Length>
fontSize()
The font size of the text, in some units of length.EWorkflowBpmnTextLayoutLineBreakMode
lineBreakMode()
Whether to remove output line breaks from the emitted text.double
lineHeight()
The line height of the text, as a relative value.double
maxHeight()
The maximum height of the text.EWorkflowBpmnTextLayoutSettingsMaxHeightType
maxHeightType()
How to interpret themaximum height
setting.double
maxWidth()
The maximum width of the text.double
minWidth()
The minimum width for the text bounding box.boolean
trimSpaces()
Whether to trim leading and trailing spaces from the text.
-
-
-
Method Detail
-
coalesceSpaces
public boolean coalesceSpaces()
Whether to coalesce multiple spaces into a single space. This transformation is applied to the input text, before the text is laid out. Spaces are defined as the characters in the range U+0000 to U+0020 and the Unicode whitespace characters.- Returns:
true
if multiple spaces should be coalesced into a single space,false
otherwise.
-
derive
public WorkflowBpmnTextLayoutSettings.Builder derive()
Derives a new builder for the text layout settings, using the current settings as defaults.- Returns:
- A new builder for the text layout settings, using the current settings as defaults.
-
explicitBounds
public boolean explicitBounds()
Whether the name in the BPMN diagram should have theBounds
set explicitly.- Returns:
- true if explicit bounds are set, false if bounds are omitted from the BPMN diagram.
-
fontSize
public QuantityDouble<Length> fontSize()
The font size of the text, in some units of length.- Returns:
- The font size of the text.
-
lineBreakMode
public EWorkflowBpmnTextLayoutLineBreakMode lineBreakMode()
Whether to remove output line breaks from the emitted text. When true, the text will contain line breaks as computed by the text wrapper. When false, the text will not contain any line breaks.Defaults to
NORMAL
.- Returns:
true
if line breaks should be output,false
otherwise.
-
lineHeight
public double lineHeight()
The line height of the text, as a relative value. A value of 1.0 means the line height is equal to the font size, 1.5 means the line height is 1.5 times the font size, etc. To use the intrinsic line height of the font, set this value toDouble.NaN
.- Returns:
- The relative line height of the text.
-
maxHeight
public double maxHeight()
The maximum height of the text. UseDouble.POSITIVE_INFINITY
for no limit. If the text is taller than this limit, it will be cut off. SeemaxHeightType
for how this value is interpreted.- Returns:
- The maximum height of the text.
-
maxHeightType
public EWorkflowBpmnTextLayoutSettingsMaxHeightType maxHeightType()
How to interpret themaximum height
setting.- Returns:
- The type of maximum height to use.
-
maxWidth
public double maxWidth()
The maximum width of the text. UseDouble.POSITIVE_INFINITY
for no limit. If the text is longer than this width, it will be broken into multiple lines.- Returns:
- The maximum height of the text.
-
minWidth
public double minWidth()
The minimum width for the text bounding box. By default, the bounding box is as wide as computed by the text layout engine. If this value is non-zero, the text will have a minimum width of this value. May be useful for tools that require a certain minimum width.- Returns:
- The minimum width to set for the text bounding box.
-
trimSpaces
public boolean trimSpaces()
Whether to trim leading and trailing spaces from the text. This transformation is applied to the input text, before the text is laid out. Defaults totrue
. Spaces are defined as the characters in the range U+0000 to U+0020 and the Unicode whitespace characters.- Returns:
true
if leading and trailing spaces should be trimmed,false
otherwise.
-
builder
public static WorkflowBpmnTextLayoutSettings.Builder builder()
Creates a new builder forWorkflowBpmnTextLayoutSettings
.- Returns:
- A new builder for text layout settings.
-
-