Package io.sf.carte.doc.style.css
Interface MediaQueryHandler
public interface MediaQueryHandler
Interface to be implemented by handlers that are used inside
Parser.parseMediaQueryList(String,Node).-
Method Summary
Modifier and TypeMethodDescriptionvoidcompatQuery(CSSParseException exception) Reports that the current media query is invalid but probably compatible with a legacy browser.voidcondition(BooleanCondition condition) If the current query contains a media (feature) condition, set it.voidendQuery()The current query ends.voidThe query list ends.Get the media query list that this object handles.voidinvalidQuery(CSSParseException queryError) Reports that the current media query is invalid.voidA media type was found (e.g.voidReports that the current query is a negative query.voidThe current query uses theonlyprefix.booleanCheck whether this handler takes the responsibility of reporting errors to an error handler.voidA new media query starts being processed.
-
Method Details
-
startQuery
void startQuery()A new media query starts being processed. -
mediaType
A media type was found (e.g.screen) in the current query.- Parameters:
mediaType- the media type.
-
negativeQuery
void negativeQuery()Reports that the current query is a negative query. -
onlyPrefix
void onlyPrefix()The current query uses theonlyprefix. -
condition
If the current query contains a media (feature) condition, set it.- Parameters:
condition- the media condition, which contains one or more media feature predicates and an initial media type predicate.
-
endQuery
void endQuery()The current query ends. -
reportsErrors
boolean reportsErrors()Check whether this handler takes the responsibility of reporting errors to an error handler.- Returns:
- true if this handler reports errors to an error handler.
-
invalidQuery
Reports that the current media query is invalid.- Parameters:
queryError- the exception describing the error.
-
compatQuery
Reports that the current media query is invalid but probably compatible with a legacy browser.- Parameters:
exception- the exception describing the location where the issue was found.
-
endQueryList
void endQueryList()The query list ends. -
getMediaQueryList
MediaQueryList getMediaQueryList()Get the media query list that this object handles.- Returns:
- the media query list.
-