org.eclipse.birt.report.model.api.validators
Class MasterPageMultiColumnValidator

java.lang.Object
  extended by org.eclipse.birt.report.model.validators.AbstractSemanticValidator
      extended by org.eclipse.birt.report.model.validators.AbstractElementValidator
          extended by 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 to GraphicMasterPage.

See Also:
MasterPageTypeValidator, MasterPageSizeValidator

Field Summary
 
Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
modules, name
 
Constructor Summary
MasterPageMultiColumnValidator()
           
 
Method Summary
static MasterPageMultiColumnValidator getInstance()
          Returns the singleton validator instance.
 java.util.List 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

getInstance

public static MasterPageMultiColumnValidator getInstance()
Returns the singleton validator instance.

Returns:
the validator instance

validate

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


Copyright © 2008 Actuate Corp. All rights reserved.