Class 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 to GraphicMasterPage.
    See Also:
    MasterPageTypeValidator, MasterPageSizeValidator
    • Field Summary

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

        modules, name
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MasterPageMultiColumnValidator getInstance()
      Returns the singleton validator instance.
      java.util.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 Detail

      • MasterPageMultiColumnValidator

        public MasterPageMultiColumnValidator()
    • Method Detail

      • validate

        public java.util.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.