Package org.eclipse.birt.report.model.api.validators

# 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 invalid input: '<' content width

### Applicability

This validator is only applied to `GraphicMasterPage`.

See Also:
  - `MasterPageTypeValidator`
  - `MasterPageSizeValidator`

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator

`modules, name`

## Constructor Summary

Constructors
Constructor
Description
`MasterPageMultiColumnValidator()`

## Method Summary

Modifier and Type
Method
Description
`static MasterPageMultiColumnValidator`
`getInstance()`
Returns the singleton validator instance.
`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.

### Methods inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator

`canApplyToDesign, canApplyToLibrary, getName, isInTemplateParameterDefinitionSlot, setModules, setName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MasterPageMultiColumnValidator

public MasterPageMultiColumnValidator()

## Method Details

### getInstance

public static MasterPageMultiColumnValidator 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:
  `validate` in class `org.eclipse.birt.report.model.validators.AbstractElementValidator`
Parameters:
  `module` - the module
  `element` - the graphic master page to validate
Returns:
  error list, each of which is the instance of `SemanticException`.