Class GeneralSettingsViewModel
- java.lang.Object
-
- de.xima.fc.workflow.designer.bpmn.model.settings.ASettingsViewViewModel
-
- de.xima.fc.workflow.designer.bpmn.model.settings.GeneralSettingsViewModel
-
- All Implemented Interfaces:
Serializable
public final class GeneralSettingsViewModel extends ASettingsViewViewModel
View model for general layout settings related to BPMN diagrams.- Since:
- 8.4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeneralSettingsViewModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyFromSettings(IWorkflowBpmnLayoutSettings settings)
Applies the settings from the givenIWorkflowBpmnLayoutSettings
instance to this view model.void
applyFromSettings(FlowchartToBpmnConverterSettings settings)
Applies the settings from the givenFlowchartToBpmnConverterSettings
instance to this view model.void
applyToBuilder(WorkflowBpmnLayoutSettings.Builder builder)
Applies the settings from this view model to the givenWorkflowBpmnLayoutSettings.Builder
instance.void
applyToBuilder(FlowchartToBpmnConverterSettings.Builder builder)
Applies the settings from this view model to the givenFlowchartToBpmnConverterSettings.Builder
instance.double
getCrossFlowDirectionSpacing()
Gets the default spacing to apply in the crossflow direction
, i.e.ECardinalDirection2D
getDirection()
Gets the main direction for orienting the elements in the BPMN diagram.double
getFlowDirectionSpacing()
Gets the default spacing tp apply in the mainflow direction
.EBpmnTextSettingsUnit
getFontSizeUnit()
Gets the unit for the font size in the BPMN diagram.double
getNameDistance()
Gets the default distance between the name of anamed
element and its name.boolean
isColorize()
Gets whether the BPMN diagram should be colorized.void
setColorize(boolean colorize)
Sets whether the BPMN diagram should be colorized.void
setCrossFlowDirectionSpacing(double crossFlowDirectionSpacing)
Sets the default spacing to apply in the crossflow direction
, i.e.void
setDirection(ECardinalDirection2D direction)
Sets the main direction for orienting the elements in the BPMN diagram.void
setFlowDirectionSpacing(double flowDirectionSpacing)
Sets the default spacing to apply in the mainflow direction
.void
setFontSizeUnit(EBpmnTextSettingsUnit fontSizeUnit)
Sets the unit for the font size in the BPMN diagram.void
setNameDistance(double nameDistance)
Sets the default distance between the name of anamed
element and its name.
-
-
-
Method Detail
-
applyFromSettings
public void applyFromSettings(IWorkflowBpmnLayoutSettings settings)
Description copied from class:ASettingsViewViewModel
Applies the settings from the givenIWorkflowBpmnLayoutSettings
instance to this view model.- Specified by:
applyFromSettings
in classASettingsViewViewModel
- Parameters:
settings
- The settings to apply.
-
applyFromSettings
public void applyFromSettings(FlowchartToBpmnConverterSettings settings)
Description copied from class:ASettingsViewViewModel
Applies the settings from the givenFlowchartToBpmnConverterSettings
instance to this view model.- Specified by:
applyFromSettings
in classASettingsViewViewModel
- Parameters:
settings
- The settings to apply.
-
applyToBuilder
public void applyToBuilder(WorkflowBpmnLayoutSettings.Builder builder)
Description copied from class:ASettingsViewViewModel
Applies the settings from this view model to the givenWorkflowBpmnLayoutSettings.Builder
instance.- Specified by:
applyToBuilder
in classASettingsViewViewModel
- Parameters:
builder
- The builder to apply settings to.
-
applyToBuilder
public void applyToBuilder(FlowchartToBpmnConverterSettings.Builder builder)
Description copied from class:ASettingsViewViewModel
Applies the settings from this view model to the givenFlowchartToBpmnConverterSettings.Builder
instance.- Specified by:
applyToBuilder
in classASettingsViewViewModel
- Parameters:
builder
- The builder to apply settings to.
-
getCrossFlowDirectionSpacing
public double getCrossFlowDirectionSpacing()
Gets the default spacing to apply in the crossflow direction
, i.e. the direction perpendicular to the main flow. This is e.g. the spacing between the consequent (if) and alternate (else) branch in a selection statement (if-else block).- Returns:
- The cross flow direction spacing.
-
setCrossFlowDirectionSpacing
public void setCrossFlowDirectionSpacing(double crossFlowDirectionSpacing)
Sets the default spacing to apply in the crossflow direction
, i.e. the direction perpendicular to the main flow. This is e.g. the spacing between the consequent (if) and alternate (else) branch in a selection statement (if-else block).- Parameters:
crossFlowDirectionSpacing
- The cross flow direction spacing.
-
getDirection
public ECardinalDirection2D getDirection()
Gets the main direction for orienting the elements in the BPMN diagram.- Returns:
- The main flow direction.
-
setDirection
public void setDirection(ECardinalDirection2D direction)
Sets the main direction for orienting the elements in the BPMN diagram.- Parameters:
direction
- The main flow direction.
-
getFlowDirectionSpacing
public double getFlowDirectionSpacing()
Gets the default spacing tp apply in the mainflow direction
. This is e.g. the spacing between two consecutive tasks in a sequence statement.- Returns:
- The flow direction spacing.
-
setFlowDirectionSpacing
public void setFlowDirectionSpacing(double flowDirectionSpacing)
Sets the default spacing to apply in the mainflow direction
. This is e.g. the spacing between two consecutive tasks in a sequence statement.- Parameters:
flowDirectionSpacing
- The flow direction spacing.
-
getFontSizeUnit
public EBpmnTextSettingsUnit getFontSizeUnit()
Gets the unit for the font size in the BPMN diagram. The BPMN standard allows specifying font sizes, but only as unitless numbers. Different tools interpret these numbers differently. This setting allow to specify the implied unit for the font size.- Returns:
- The font size unit.
-
setFontSizeUnit
public void setFontSizeUnit(EBpmnTextSettingsUnit fontSizeUnit)
Sets the unit for the font size in the BPMN diagram. The BPMN standard allows specifying font sizes, but only as unitless numbers. Different tools interpret these numbers differently. This setting allow to specify the implied unit for the font size.- Parameters:
fontSizeUnit
- The font size unit.
-
getNameDistance
public double getNameDistance()
Gets the default distance between the name of anamed
element and its name.- Returns:
- The name distance.
-
setNameDistance
public void setNameDistance(double nameDistance)
Sets the default distance between the name of anamed
element and its name.- Parameters:
nameDistance
- The name distance.
-
isColorize
public boolean isColorize()
Gets whether the BPMN diagram should be colorized.- Returns:
- True if the BPMN diagram should be colorized, false otherwise.
-
setColorize
public void setColorize(boolean colorize)
Sets whether the BPMN diagram should be colorized.- Parameters:
colorize
- True if the BPMN diagram should be colorized, false otherwise.
-
-