java.lang.Object
io.sf.carte.doc.style.css.om.AbstractCSSRule
io.sf.carte.doc.style.css.om.FontFeatureValuesRule
- All Implemented Interfaces:
CSSFontFeatureValuesRule
,ExtendedCSSRule
,CSSRule
Implementation of CSSFontFeatureValuesRule.
-
Field Summary
Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE
Fields inherited from interface io.sf.carte.doc.style.css.ExtendedCSSRule
COUNTER_STYLE_RULE, CUSTOM_MEDIA_RULE, DOCUMENT_RULE, FONT_FEATURE_VALUES_RULE, KEYFRAME_RULE, KEYFRAMES_RULE, MARGIN_RULE, NAMESPACE_RULE, REGION_STYLE_RULE, SUPPORTS_RULE, VIEWPORT_RULE
-
Constructor Summary
ModifierConstructorDescriptionprotected
FontFeatureValuesRule
(AbstractCSSStyleSheet parentSheet, byte origin) -
Method Summary
Modifier and TypeMethodDescriptionclone
(AbstractCSSStyleSheet parentSheet) Obtain a clone of this rule whose parent sheet isparentSheet
.protected Parser
void
Enable a feature values map for the given feature value name.void
enablePrecedingComments
(int initialSize) If this rule does not contain a preceding comment list, create one with the given initial capacity.boolean
Get the annotation map.Get the characterVariant map.getFeatureValuesMap
(String featureValueName) Get a feature values map for the given name.String[]
Get the list of font families for which a given set of feature values is defined.A minified parsable textual representation of the rule.byte
Get the origin of this rule (user agent sheet, author, user).Get the ornaments map.If this rule is contained inside another rule, return that rule.Get the style sheet that contains this rule.Get a list of the comments that preceded this rule, if any.protected StyleFormattingContext
Get the styleset map.Get the stylistic map.getSwash()
Get the swash map.short
getType()
protected URL
Gets an URL for the given URI, taking into account the parent CSS Base URL if appropriate.int
hashCode()
void
setCssText
(String cssText) void
setParentRule
(AbstractCSSRule parent) Sets the parent CSS rule, in case this rule is contained by another.void
writeCssText
(SimpleWriter wri, StyleFormattingContext context) Write a serialization of this rule to the given simple writer, according to the given context.Methods inherited from class io.sf.carte.doc.style.css.om.AbstractCSSRule
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSRule
getParentRule, getParentStyleSheet
-
Constructor Details
-
FontFeatureValuesRule
-
-
Method Details
-
getFontFamily
Description copied from interface:CSSFontFeatureValuesRule
Get the list of font families for which a given set of feature values is defined.- Specified by:
getFontFamily
in interfaceCSSFontFeatureValuesRule
- Returns:
- the list of font families.
-
getAnnotation
Description copied from interface:CSSFontFeatureValuesRule
Get the annotation map.- Specified by:
getAnnotation
in interfaceCSSFontFeatureValuesRule
- Returns:
- the annotation map.
-
getOrnaments
Description copied from interface:CSSFontFeatureValuesRule
Get the ornaments map.- Specified by:
getOrnaments
in interfaceCSSFontFeatureValuesRule
- Returns:
- the ornaments map.
-
getStylistic
Description copied from interface:CSSFontFeatureValuesRule
Get the stylistic map.- Specified by:
getStylistic
in interfaceCSSFontFeatureValuesRule
- Returns:
- the stylistic map.
-
getSwash
Description copied from interface:CSSFontFeatureValuesRule
Get the swash map.- Specified by:
getSwash
in interfaceCSSFontFeatureValuesRule
- Returns:
- the swash map.
-
getCharacterVariant
Description copied from interface:CSSFontFeatureValuesRule
Get the characterVariant map.- Specified by:
getCharacterVariant
in interfaceCSSFontFeatureValuesRule
- Returns:
- the characterVariant map.
-
getStyleset
Description copied from interface:CSSFontFeatureValuesRule
Get the styleset map.- Specified by:
getStyleset
in interfaceCSSFontFeatureValuesRule
- Returns:
- the styleset map.
-
enableMap
Enable a feature values map for the given feature value name. When enabled, a map forfeatureValueName
will be returned bygetFeatureValuesMap(String)
.If a standard feature values name (like 'annotation' or 'stylistic') is enabled, this method has no effect. The method can be used to enable, for example,
historical-forms
.- Specified by:
enableMap
in interfaceCSSFontFeatureValuesRule
- Parameters:
featureValueName
- the feature value name to be enabled.
-
getFeatureValuesMap
Get a feature values map for the given name.- Specified by:
getFeatureValuesMap
in interfaceCSSFontFeatureValuesRule
- Parameters:
featureValueName
- the feature value name.- Returns:
- the feature values map, or null if the feature value name is not standard and
has not been enabled by
enableMap(String)
.
-
getCssText
- Specified by:
getCssText
in interfaceCSSRule
- Specified by:
getCssText
in classAbstractCSSRule
-
getMinifiedCssText
Description copied from class:AbstractCSSRule
A minified parsable textual representation of the rule. This reflects the current state of the rule and not its initial value.- Specified by:
getMinifiedCssText
in interfaceExtendedCSSRule
- Returns:
- the minified textual representation of the rule.
-
writeCssText
Description copied from interface:ExtendedCSSRule
Write a serialization of this rule to the given simple writer, according to the given context.- Specified by:
writeCssText
in interfaceExtendedCSSRule
- Specified by:
writeCssText
in classAbstractCSSRule
- Parameters:
wri
- the simple writer object.context
- the formatting context.- Throws:
IOException
- if an error happened while writing.
-
setCssText
- Specified by:
setCssText
in interfaceCSSRule
- Overrides:
setCssText
in classAbstractCSSRule
- Throws:
DOMException
-
hashCode
public int hashCode() -
equals
-
clone
Description copied from class:AbstractCSSRule
Obtain a clone of this rule whose parent sheet isparentSheet
.- Specified by:
clone
in interfaceExtendedCSSRule
- Specified by:
clone
in classAbstractCSSRule
- Parameters:
parentSheet
- the parent sheet for the new rule.- Returns:
- a clone of this rule with the given parent sheet.
-
getType
public short getType()- Specified by:
getType
in interfaceCSSRule
- Specified by:
getType
in classAbstractCSSRule
-
getParentStyleSheet
Description copied from interface:ExtendedCSSRule
Get the style sheet that contains this rule.- Specified by:
getParentStyleSheet
in interfaceCSSRule
- Specified by:
getParentStyleSheet
in interfaceExtendedCSSRule
- Specified by:
getParentStyleSheet
in classAbstractCSSRule
- Returns:
- the style sheet, or null if no sheet contains this rule.
-
createSACParser
- Throws:
DOMException
-
getParentRule
Description copied from interface:ExtendedCSSRule
If this rule is contained inside another rule, return that rule. If it is not nested inside any other rules, returnnull
.- Specified by:
getParentRule
in interfaceCSSRule
- Specified by:
getParentRule
in interfaceExtendedCSSRule
- Specified by:
getParentRule
in classAbstractCSSRule
- Returns:
- the containing rule, if any, otherwise
null
.
-
setParentRule
Sets the parent CSS rule, in case this rule is contained by another.- Specified by:
setParentRule
in classAbstractCSSRule
- Parameters:
parent
- the parent rule.
-
getOrigin
public byte getOrigin()Description copied from class:AbstractCSSRule
Get the origin of this rule (user agent sheet, author, user).- Specified by:
getOrigin
in classAbstractCSSRule
- Returns:
- the origin of this rule.
-
enablePrecedingComments
public void enablePrecedingComments(int initialSize) Description copied from class:AbstractCSSRule
If this rule does not contain a preceding comment list, create one with the given initial capacity.If this rule already has a comment list, does nothing.
- Specified by:
enablePrecedingComments
in classAbstractCSSRule
- Parameters:
initialSize
- the initial capacity.
-
getPrecedingComments
Description copied from class:AbstractCSSRule
Get a list of the comments that preceded this rule, if any.- Specified by:
getPrecedingComments
in classAbstractCSSRule
- Returns:
- the list of comments, or
null
if there were no preceding comments or the parsing was specified to ignore comments. - See Also:
-
getStyleFormattingContext
-
getURL
Gets an URL for the given URI, taking into account the parent CSS Base URL if appropriate.- Parameters:
uri
- the uri.- Returns:
- the absolute URL.
- Throws:
MalformedURLException
- if the uri was wrong.
-