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 voidapplyFromSettings(IWorkflowBpmnLayoutSettings settings)Applies the settings from the givenIWorkflowBpmnLayoutSettingsinstance to this view model.voidapplyFromSettings(FlowchartToBpmnConverterSettings settings)Applies the settings from the givenFlowchartToBpmnConverterSettingsinstance to this view model.voidapplyToBuilder(WorkflowBpmnLayoutSettings.Builder builder)Applies the settings from this view model to the givenWorkflowBpmnLayoutSettings.Builderinstance.voidapplyToBuilder(FlowchartToBpmnConverterSettings.Builder builder)Applies the settings from this view model to the givenFlowchartToBpmnConverterSettings.Builderinstance.doublegetCrossFlowDirectionSpacing()Gets the default spacing to apply in the crossflow direction, i.e.ECardinalDirection2DgetDirection()Gets the main direction for orienting the elements in the BPMN diagram.doublegetFlowDirectionSpacing()Gets the default spacing tp apply in the mainflow direction.EBpmnTextSettingsUnitgetFontSizeUnit()Gets the unit for the font size in the BPMN diagram.doublegetNameDistance()Gets the default distance between the name of anamedelement and its name.booleanisColorize()Gets whether the BPMN diagram should be colorized.voidsetColorize(boolean colorize)Sets whether the BPMN diagram should be colorized.voidsetCrossFlowDirectionSpacing(double crossFlowDirectionSpacing)Sets the default spacing to apply in the crossflow direction, i.e.voidsetDirection(ECardinalDirection2D direction)Sets the main direction for orienting the elements in the BPMN diagram.voidsetFlowDirectionSpacing(double flowDirectionSpacing)Sets the default spacing to apply in the mainflow direction.voidsetFontSizeUnit(EBpmnTextSettingsUnit fontSizeUnit)Sets the unit for the font size in the BPMN diagram.voidsetNameDistance(double nameDistance)Sets the default distance between the name of anamedelement and its name.
-
-
-
Method Detail
-
applyFromSettings
public void applyFromSettings(IWorkflowBpmnLayoutSettings settings)
Description copied from class:ASettingsViewViewModelApplies the settings from the givenIWorkflowBpmnLayoutSettingsinstance to this view model.- Specified by:
applyFromSettingsin classASettingsViewViewModel- Parameters:
settings- The settings to apply.
-
applyFromSettings
public void applyFromSettings(FlowchartToBpmnConverterSettings settings)
Description copied from class:ASettingsViewViewModelApplies the settings from the givenFlowchartToBpmnConverterSettingsinstance to this view model.- Specified by:
applyFromSettingsin classASettingsViewViewModel- Parameters:
settings- The settings to apply.
-
applyToBuilder
public void applyToBuilder(WorkflowBpmnLayoutSettings.Builder builder)
Description copied from class:ASettingsViewViewModelApplies the settings from this view model to the givenWorkflowBpmnLayoutSettings.Builderinstance.- Specified by:
applyToBuilderin classASettingsViewViewModel- Parameters:
builder- The builder to apply settings to.
-
applyToBuilder
public void applyToBuilder(FlowchartToBpmnConverterSettings.Builder builder)
Description copied from class:ASettingsViewViewModelApplies the settings from this view model to the givenFlowchartToBpmnConverterSettings.Builderinstance.- Specified by:
applyToBuilderin 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 anamedelement and its name.- Returns:
- The name distance.
-
setNameDistance
public void setNameDistance(double nameDistance)
Sets the default distance between the name of anamedelement 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.
-
-