java.lang.Object
io.sf.carte.doc.style.css.om.CSSValueMediaQueryFactory
- All Implemented Interfaces:
BooleanConditionFactory
,MediaQueryFactory
Contains methods related to media query conditions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a media query list for all media.Create a boolean condition of theand
type.createMediaQueryHandler
(Node owner) Create a handler attached to a new media query list.createMediaTypePredicate
(String medium) Create a predicate that contains a media type.Create a boolean condition of thenot
type.protected CSSNumberValue
createNumberValue
(short unit, float valueInSpecifiedUnit, boolean calculated) Create aCSSNumberValue
in the desired implementation.Create a boolean condition of the given type (and
,or
,not
).protected Parser
Create aParser
compatible with this media query factory.createPredicate
(String featureName) Create a media-feature operand condition.static MediaQueryList
Gets an unmodifiable media list for all media.protected CSSValueFactory
getValueFactory
(String featureName) Create aCSSValueFactory
with the desired OM value implementation.
-
Constructor Details
-
CSSValueMediaQueryFactory
public CSSValueMediaQueryFactory()
-
-
Method Details
-
getAllMediaInstance
Gets an unmodifiable media list for all media.- Returns:
- the unmodifiable media list for all media.
-
createAndCondition
Create a boolean condition of theand
type.- Specified by:
createAndCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createOrCondition
Create a boolean condition of the given type (and
,or
,not
).- Specified by:
createOrCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createNotCondition
Create a boolean condition of thenot
type.- Specified by:
createNotCondition
in interfaceBooleanConditionFactory
- Returns:
- the condition.
-
createPredicate
Create a media-feature operand condition.- Specified by:
createPredicate
in interfaceBooleanConditionFactory
- Specified by:
createPredicate
in interfaceMediaQueryFactory
- Parameters:
featureName
- the name of the media feature.- Returns:
- the condition.
-
createMediaTypePredicate
Description copied from interface:MediaQueryFactory
Create a predicate that contains a media type.- Specified by:
createMediaTypePredicate
in interfaceMediaQueryFactory
- Parameters:
medium
- the media type.- Returns:
- the predicate.
-
createMediaQueryHandler
Description copied from interface:MediaQueryFactory
Create a handler attached to a new media query list.- Specified by:
createMediaQueryHandler
in interfaceMediaQueryFactory
- Parameters:
owner
- the node that owns the responsibility to handle the errors in the query list.- Returns:
- the media query handler.
-
createAllMedia
Description copied from interface:MediaQueryFactory
Create a media query list for all media.- Specified by:
createAllMedia
in interfaceMediaQueryFactory
- Returns:
- a new media query list for all media.
-
createNumberValue
protected CSSNumberValue createNumberValue(short unit, float valueInSpecifiedUnit, boolean calculated) Create aCSSNumberValue
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
Create aParser
compatible with this media query factory.The parser shall be used to append media queries to a given list.
- Returns:
- the parser.
-
getValueFactory
Create aCSSValueFactory
with the desired OM value implementation.- Parameters:
featureName
- the name of the media feature.- Returns:
- the object-model value factory.
-