Package de.xima.fc.common.workflow.bpmn
Class WorkflowBpmnLabelStyleDefinition
- java.lang.Object
-
- de.xima.fc.common.workflow.bpmn.WorkflowBpmnLabelStyleDefinition
-
- All Implemented Interfaces:
Serializable
public final class WorkflowBpmnLabelStyleDefinition extends Object implements Serializable
Style definition for a BPMN label. This is used as a key for retrieving an appropriateBpmnLabelStyle
instance when building a BPMN diagram.- Since:
- 8.4.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkflowBpmnLabelStyleDefinition.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
bold()
Whether the label should be bold.static WorkflowBpmnLabelStyleDefinition.Builder
builder()
Creates a new builder for aWorkflowBpmnLabelStyleDefinition
.boolean
equals(Object value)
String
fontName()
The name of the font to use for the label, e.g.double
fontSize()
The font size to use for the label.int
hashCode()
boolean
italic()
Whether the label should be italic.boolean
struckThrough()
Whether the label should be struck through.WorkflowBpmnLabelStyleDefinition
undecorated(String fontName, double fontSize)
Creates an undecorated label style definition with the specified font name and size.boolean
underlined()
Whether the label should be underlined.
-
-
-
Method Detail
-
bold
public boolean bold()
Whether the label should be bold.- Returns:
true
if the label should be bold,false
otherwise.
-
fontName
public String fontName()
The name of the font to use for the label, e.g. "Arial", "Times New Roman", etc. Never null, but may be empty. When empty, indicates that BPMN tools should use some default font.- Returns:
- The font name, or an empty string if no font is specified.
-
fontSize
public double fontSize()
The font size to use for the label. The BPMN specification does not define an explicit unit for font size, though most tools use pixels, not points.- Returns:
- The font size, or
Double.NaN
if no font size is specified.
-
italic
public boolean italic()
Whether the label should be italic.- Returns:
true
if the label should be italic,false
otherwise.
-
struckThrough
public boolean struckThrough()
Whether the label should be struck through.- Returns:
true
if the label should be struck through,false
otherwise.
-
undecorated
public WorkflowBpmnLabelStyleDefinition undecorated(String fontName, double fontSize)
Creates an undecorated label style definition with the specified font name and size. The bold, italic, struck-through, and underlined flags are all set to false.- Parameters:
fontName
- The name of the font to use for the label, e.g. "Arial", "Times New Roman", etc. May be empty or null to indicate that no specific font is specified, in which case BPMN tools use some default font.fontSize
- The font size to use for the label. The BPMN specification does not define an explicit unit for font size, but most tools use pixels, not points. May beDouble.NaN
to indicate that no specific font size is specified, in which case BPMN tools use some default font size.- Returns:
- A new
WorkflowBpmnLabelStyleDefinition
instance with the specified font name and size, and all decorations (bold, italic, struck-through, underlined) set to false.
-
underlined
public boolean underlined()
Whether the label should be underlined.- Returns:
true
if the label should be underlined,false
otherwise.
-
builder
public static WorkflowBpmnLabelStyleDefinition.Builder builder()
Creates a new builder for aWorkflowBpmnLabelStyleDefinition
.- Returns:
- A new builder instance.
-
-