java.lang.Object
org.jhotdraw8.css.converter.AbstractCssConverter<String>
org.jhotdraw8.css.converter.StringCssConverter
- All Implemented Interfaces:
Converter<String>,CssConverter<String>
Converts an
String to a quoted CSS String.- Author:
- Werner Randelshofer
-
Constructor Summary
ConstructorsConstructorDescriptionStringCssConverter(boolean nullable) StringCssConverter(boolean nullable, char quoteChar, @Nullable String helpText) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringGets a help text.parseNonNull(CssTokenizer tt, @Nullable IdResolver idResolver) Parses from the given tokenizer and moves the tokenizer to the next token past the value.protected <TT extends String>
voidproduceTokensNonNull(TT value, @Nullable IdSupplier idSupplier, Consumer<CssToken> out) Methods inherited from class org.jhotdraw8.css.converter.AbstractCssConverter
isNullable, parse, produceTokensMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.base.converter.Converter
fromString, fromString, fromStringNonNull, fromStringNonNull, fromStringNonNull, fromStringNonNull, needsIdResolver, toString, toStringMethods inherited from interface org.jhotdraw8.css.converter.CssConverter
fromString, fromString, getExamples, toString, toString, toString, toTokens
-
Constructor Details
-
StringCssConverter
public StringCssConverter() -
StringCssConverter
public StringCssConverter(boolean nullable) -
StringCssConverter
-
-
Method Details
-
getHelpText
Description copied from interface:CssConverterGets a help text.- Returns:
- a help text.
-
parseNonNull
public String parseNonNull(CssTokenizer tt, @Nullable IdResolver idResolver) throws ParseException, IOException Description copied from interface:CssConverterParses from the given tokenizer and moves the tokenizer to the next token past the value.- Specified by:
parseNonNullin interfaceCssConverter<String>- Specified by:
parseNonNullin classAbstractCssConverter<String>- Parameters:
tt- tokenizer positioned on the tokenidResolver- the id factory- Returns:
- the parsed value
- Throws:
ParseException- on parse exceptionIOException- on io exception
-
produceTokensNonNull
protected <TT extends String> void produceTokensNonNull(TT value, @Nullable IdSupplier idSupplier, Consumer<CssToken> out) - Specified by:
produceTokensNonNullin classAbstractCssConverter<String>
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceConverter<String>- Overrides:
getDefaultValuein classAbstractCssConverter<String>
-