Class CssBackgroundValidator

java.lang.Object
com.itextpdf.styledxmlparser.css.validate.impl.datatype.CssBackgroundValidator
All Implemented Interfaces:
ICssDataTypeValidator

public class CssBackgroundValidator extends Object implements ICssDataTypeValidator
ICssDataTypeValidator implementation for background properties. This validator should not be used with non-background properties.
  • Field Details

    • MAX_AMOUNT_OF_VALUES

      private static final int MAX_AMOUNT_OF_VALUES
      See Also:
    • backgroundProperty

      private final String backgroundProperty
  • Constructor Details

    • CssBackgroundValidator

      public CssBackgroundValidator(String backgroundProperty)
      Creates a new CssBackgroundValidator instance.
      Parameters:
      backgroundProperty - is background property corresponding to current validator
  • Method Details

    • isValid

      public boolean isValid(String objectString)
      Checks if a value is a valid data type (e.g. a color, an identifier,...).
      Specified by:
      isValid in interface ICssDataTypeValidator
      Parameters:
      objectString - the value
      Returns:
      true, if the value is a valid data type
    • isValidProperty

      private boolean isValidProperty(List<String> propertyValues, int index)
    • checkMultiValuePositionXY

      private boolean checkMultiValuePositionXY(List<String> propertyValues, int index)
    • isMultiValueAllowedForThisType

      private boolean isMultiValueAllowedForThisType()
    • isMultiValueAllowedForThisValue

      private static boolean isMultiValueAllowedForThisValue(String value)
    • isPropertyValueCorrespondsPropertyType

      private boolean isPropertyValueCorrespondsPropertyType(String value)