Class CSSValueMediaQueryFactory

java.lang.Object
io.sf.carte.doc.style.css.om.CSSValueMediaQueryFactory
All Implemented Interfaces:
BooleanConditionFactory, MediaQueryFactory

public class CSSValueMediaQueryFactory extends Object implements MediaQueryFactory
Contains methods related to media query conditions.
  • Constructor Details

    • CSSValueMediaQueryFactory

      public CSSValueMediaQueryFactory()
  • Method Details

    • getAllMediaInstance

      public static MediaQueryList getAllMediaInstance()
      Gets an unmodifiable media list for all media.
      Returns:
      the unmodifiable media list for all media.
    • createAndCondition

      public BooleanCondition createAndCondition()
      Create a boolean condition of the and type.
      Specified by:
      createAndCondition in interface BooleanConditionFactory
      Returns:
      the condition.
    • createOrCondition

      public BooleanCondition createOrCondition()
      Create a boolean condition of the given type (and, or, not).
      Specified by:
      createOrCondition in interface BooleanConditionFactory
      Returns:
      the condition.
    • createNotCondition

      public BooleanCondition createNotCondition()
      Create a boolean condition of the not type.
      Specified by:
      createNotCondition in interface BooleanConditionFactory
      Returns:
      the condition.
    • createPredicate

      public MediaFeaturePredicate createPredicate(String featureName)
      Create a media-feature operand condition.
      Specified by:
      createPredicate in interface BooleanConditionFactory
      Specified by:
      createPredicate in interface MediaQueryFactory
      Parameters:
      featureName - the name of the media feature.
      Returns:
      the condition.
    • createMediaTypePredicate

      public MediaQueryPredicate createMediaTypePredicate(String medium)
      Description copied from interface: MediaQueryFactory
      Create a predicate that contains a media type.
      Specified by:
      createMediaTypePredicate in interface MediaQueryFactory
      Parameters:
      medium - the media type.
      Returns:
      the predicate.
    • createMediaQueryHandler

      public MediaQueryHandler createMediaQueryHandler(Node owner)
      Description copied from interface: MediaQueryFactory
      Create a handler attached to a new media query list.
      Specified by:
      createMediaQueryHandler in interface MediaQueryFactory
      Parameters:
      owner - the node that owns the responsibility to handle the errors in the query list.
      Returns:
      the media query handler.
    • createAllMedia

      public MediaQueryList createAllMedia()
      Description copied from interface: MediaQueryFactory
      Create a media query list for all media.
      Specified by:
      createAllMedia in interface MediaQueryFactory
      Returns:
      a new media query list for all media.
    • createNumberValue

      protected CSSNumberValue createNumberValue(short unit, float valueInSpecifiedUnit, boolean calculated)
      Create a CSSNumberValue in the desired implementation.
      Parameters:
      unit - the unit.
      valueInSpecifiedUnit - the value in the given unit.
      calculated - whether the value was calculated. Implementations may ignore this parameter.
      Returns:
      the number value.
    • createParser

      protected Parser createParser()
      Create a Parser compatible with this media query factory.

      The parser shall be used to append media queries to a given list.

      Returns:
      the parser.
    • getValueFactory

      protected CSSValueFactory getValueFactory(String featureName)
      Create a CSSValueFactory with the desired OM value implementation.
      Parameters:
      featureName - the name of the media feature.
      Returns:
      the object-model value factory.