Class MasterPageMultiColumnValidator
java.lang.Object
org.eclipse.birt.report.model.validators.AbstractSemanticValidator
org.eclipse.birt.report.model.validators.AbstractElementValidator
org.eclipse.birt.report.model.api.validators.MasterPageMultiColumnValidator
public class MasterPageMultiColumnValidator
extends org.eclipse.birt.report.model.validators.AbstractElementValidator
Validates the multiple columns and content width should be consistent. This
validator should be performed after
MasterPageTypeValidator and
MasterPageSizeValidator.
Rule
The rule is that the width occupied by column spacing is less than the content width.column spacing width = (COLUMNS_PROP - 1) * COLUMN_SPACING_PROP
content width = WIDTH_PROP - LEFT_MARGIN_PROP - RIGHT_MARGIN_PROP
column spacing width < content width
Applicability
This validator is only applied toGraphicMasterPage.-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
modules, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the singleton validator instance.validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Validates whether multiple columns and content width are consistent.Methods inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
canApplyToDesign, canApplyToLibrary, getName, isInTemplateParameterDefinitionSlot, setModules, setName
-
Constructor Details
-
MasterPageMultiColumnValidator
public MasterPageMultiColumnValidator()
-
-
Method Details
-
getInstance
Returns the singleton validator instance.- Returns:
- the validator instance
-
validate
public List<SemanticException> validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Validates whether multiple columns and content width are consistent.- Specified by:
validatein classorg.eclipse.birt.report.model.validators.AbstractElementValidator- Parameters:
module- the moduleelement- the graphic master page to validate- Returns:
- error list, each of which is the instance of
SemanticException.
-