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 String
The empty quote value.The open quotes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CssQuotes
Creates the defaultCssQuotes
instance.static CssQuotes
createQuotes
(String quotesString, boolean fallbackToDefault) Creates aCssQuotes
instance.private void
decreaseDepth
(AbstractCssContext context) Decreases the quote depth.private String
Gets the quote.private void
increaseDepth
(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 newCssQuotes
instance.- Parameters:
openQuotes
- the open quotescloseQuotes
- the close quotes
-
-
Method Details
-
createQuotes
Creates aCssQuotes
instance.- Parameters:
quotesString
- the quotes stringfallbackToDefault
- indicates whether it's OK to fall back to the default- Returns:
- the resulting
CssQuotes
instance
-
createDefaultQuotes
Creates the defaultCssQuotes
instance.- Returns:
- the
CssQuotes
instance
-
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
-