java.lang.Object
org.jhotdraw8.css.function.AbstractCssFunction<T>
org.jhotdraw8.css.function.AttrCssFunction<T>
- Type Parameters:
T- the element type of the DOM
- All Implemented Interfaces:
CssFunction<T>
Processes the
attr() function.
attr = "attr(" , s* , attr-name, s* , [ type-or-unit ] , s* , [ "," , s* , attr-fallback ] , s* , ")" ;
attr-name = qualified-name;
type-or-unit = "string" | "color" | "url" | "integer" | "number"
| "%" ( "length" | "angle" | "time" | "frequency" )
;
attr-fallback = ident-token;
qualified-name = [ [ ident-token ], "|" ] , ident-token ;
If attr-fallback is not given, then ident "none" is assumed.
References:
- CSS Values and Units Module Level 5. Paragraph 5.4. Attribute References: the attr() function
- csswg.org
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttrCssFunction(String name) Creates a new instance with the specified function name. -
Method Summary
Modifier and TypeMethodDescriptionGets localized help text about this function.voidprocess(T element, CssTokenizer tt, SelectorModel<T> model, CssFunctionProcessor<T> functionProcessor, Consumer<CssToken> out, Deque<CssFunction<T>> recursionStack) Processes the function.Methods inherited from class org.jhotdraw8.css.function.AbstractCssFunction
getName
-
Field Details
-
NAME
Function name.- See Also:
-
-
Constructor Details
-
AttrCssFunction
public AttrCssFunction() -
AttrCssFunction
Creates a new instance with the specified function name.- Parameters:
name- the name of the function
-
-
Method Details
-
process
public void process(T element, CssTokenizer tt, SelectorModel<T> model, CssFunctionProcessor<T> functionProcessor, Consumer<CssToken> out, Deque<CssFunction<T>> recursionStack) throws IOException, ParseException Description copied from interface:CssFunctionProcesses the function.- Parameters:
element- the DOM elementtt- the tokenizer providing the unprocessed tokensmodel- the selector modelfunctionProcessor- the function processorout- the consumer for the processed tokensrecursionStack- the recursion stack- Throws:
IOException- on IO failureParseException- on parsing failure
-
getHelpText
Description copied from interface:CssFunctionGets localized help text about this function.- Returns:
- localized help text
-