Class SubProcessSettingsViewModel
- java.lang.Object
-
- de.xima.fc.workflow.designer.bpmn.model.settings.ASettingsViewViewModel
-
- de.xima.fc.workflow.designer.bpmn.model.settings.SubProcessSettingsViewModel
-
- All Implemented Interfaces:
Serializable
public final class SubProcessSettingsViewModel extends ASettingsViewViewModel
View model for layout settings related tosub processes
in BPMN diagrams.- Since:
- 8.4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SubProcessSettingsViewModel()
-
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
getAnnotationDistance()
Gets the distance between the sub-process shape and its text annotation.double
getHeaderPadding()
Gets the padding for the header of sub-processes.double
getNameAlignmentOffset()
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentRatio
.double
getNameAlignmentRatio()
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentOffset
.TextSettingsViewModel
getTextSettings()
Gets the text settings for the name of sub-processes.void
setAnnotationDistance(double annotationDistance)
Sets the distance between the sub-process shape and its text annotation.void
setHeaderPadding(double headerPadding)
Sets the padding for the header of sub-processes.void
setNameAlignmentOffset(double nameAlignmentOffset)
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentRatio
.void
setNameAlignmentRatio(double nameAlignmentRatio)
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentOffset
.
-
-
-
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.
-
getAnnotationDistance
public double getAnnotationDistance()
Gets the distance between the sub-process shape and its text annotation.- Returns:
- The distance in pixels.
-
setAnnotationDistance
public void setAnnotationDistance(double annotationDistance)
Sets the distance between the sub-process shape and its text annotation.- Parameters:
annotationDistance
- The distance in pixels to set.
-
getHeaderPadding
public double getHeaderPadding()
Gets the padding for the header of sub-processes. This is the padding on the side of the sub process where its name is displayed. Different BPMN tools require different amounts of padding, or the diagram looks bad.- Returns:
- The header padding
-
setHeaderPadding
public void setHeaderPadding(double headerPadding)
Sets the padding for the header of sub-processes. This is the padding on the side of the sub process where its name is displayed. Different BPMN tools require different amounts of padding, or the diagram looks bad.- Parameters:
headerPadding
- The header padding to set
-
getNameAlignmentOffset
public double getNameAlignmentOffset()
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentRatio
. Defaults to 0, which corresponds to no offset.To determine the position of the name, the name is first positioned according to the ration, the offset by given amount.
- The ration is a value between 0 and 1, where 0 means the name is aligned to the left edge of the sub process, and 1 means the name is aligned to the right edge of the sub process.
- The offset is an absolute value in pixels, which is added to the position of the name after it has been aligned. A positive offset moves the name to the right, a negative offset moves it to the left.
- Returns:
- The alignment offset of the sub process name in the BPMN diagram.
-
setNameAlignmentOffset
public void setNameAlignmentOffset(double nameAlignmentOffset)
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentRatio
. Defaults to 0, which corresponds to no offset.To determine the position of the name, the name is first positioned according to the ration, the offset by given amount.
- The ration is a value between 0 and 1, where 0 means the name is aligned to the left edge of the sub process, and 1 means the name is aligned to the right edge of the sub process.
- The offset is an absolute value in pixels, which is added to the position of the name after it has been aligned. A positive offset moves the name to the right, a negative offset moves it to the left.
- Parameters:
nameAlignmentOffset
- The alignment offset of the sub process name in the BPMN diagram.
-
getNameAlignmentRatio
public double getNameAlignmentRatio()
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentOffset
. Defaults to 0.5, which centers the name.To determine the position of the name, the name is first positioned according to the ration, the offset by given amount.
- The ration is a value between 0 and 1, where 0 means the name is aligned to the left edge of the sub process, and 1 means the name is aligned to the right edge of the sub process.
- The offset is an absolute value in pixels, which is added to the position of the name after it has been aligned. A positive offset moves the name to the right, a negative offset moves it to the left.
- Returns:
- The alignment ratio of the sub process name in the BPMN diagram.
-
setNameAlignmentRatio
public void setNameAlignmentRatio(double nameAlignmentRatio)
Controls the alignment of asub process
's name in the BPMN diagram in the horizontal direction, together withnameAlignmentOffset
. Defaults to 0.5, which centers the name.To determine the position of the name, the name is first positioned according to the ration, the offset by given amount.
- The ration is a value between 0 and 1, where 0 means the name is aligned to the left edge of the sub process, and 1 means the name is aligned to the right edge of the sub process.
- The offset is an absolute value in pixels, which is added to the position of the name after it has been aligned. A positive offset moves the name to the right, a negative offset moves it to the left.
- Parameters:
nameAlignmentRatio
- The alignment ratio of the sub process name in the BPMN diagram.
-
getTextSettings
public TextSettingsViewModel getTextSettings()
Gets the text settings for the name of sub-processes.- Returns:
- The text settings view model.
-
-