Class CssQuotes
java.lang.Object
com.itextpdf.styledxmlparser.css.resolve.CssQuotes
Helper class to deal with quoted values in strings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe close quotes.private static final StringThe empty quote value.The open quotes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CssQuotesCreates the defaultCssQuotesinstance.static CssQuotescreateQuotes(String quotesString, boolean fallbackToDefault) Creates aCssQuotesinstance.private voiddecreaseDepth(AbstractCssContext context) Decreases the quote depth.private StringGets the quote.private voidincreaseDepth(AbstractCssContext context) Increases the quote depth.resolveQuote(String value, AbstractCssContext context) Resolves quotes.
-
Field Details
-
EMPTY_QUOTE
The empty quote value.- See Also:
-
openQuotes
The open quotes. -
closeQuotes
The close quotes.
-
-
Constructor Details
-
CssQuotes
Creates a newCssQuotesinstance.- Parameters:
openQuotes- the open quotescloseQuotes- the close quotes
-
-
Method Details
-
createQuotes
Creates aCssQuotesinstance.- Parameters:
quotesString- the quotes stringfallbackToDefault- indicates whether it's OK to fall back to the default- Returns:
- the resulting
CssQuotesinstance
-
createDefaultQuotes
Creates the defaultCssQuotesinstance.- Returns:
- the
CssQuotesinstance
-
resolveQuote
Resolves quotes.- Parameters:
value- the valuecontext- the CSS context- Returns:
- the quote string
-
increaseDepth
Increases the quote depth.- Parameters:
context- the context
-
decreaseDepth
Decreases the quote depth.- Parameters:
context- the context
-
getQuote
Gets the quote.- Parameters:
depth- the depthquotes- the quotes- Returns:
- the requested quote string
-