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, String helpText) -
Method Summary
Modifier and TypeMethodDescriptionGets a help text.parseNonNull(@NonNull 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(@NonNull TT value, @Nullable IdSupplier idSupplier, @NonNull 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 @NonNull String parseNonNull(@NonNull 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(@NonNull TT value, @Nullable IdSupplier idSupplier, @NonNull Consumer<CssToken> out) - Specified by:
produceTokensNonNullin classAbstractCssConverter<String>
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceConverter<String>- Overrides:
getDefaultValuein classAbstractCssConverter<String>
-