Class WebvttCssStyle

    • Constructor Detail

      • WebvttCssStyle

        public WebvttCssStyle()
    • Method Detail

      • setTargetId

        public void setTargetId​(String targetId)
      • setTargetTagName

        public void setTargetTagName​(String targetTag)
      • setTargetClasses

        public void setTargetClasses​(String[] targetClasses)
      • setTargetVoice

        public void setTargetVoice​(String targetVoice)
      • getSpecificityScore

        public int getSpecificityScore​(@Nullable
                                       String id,
                                       @Nullable
                                       String tag,
                                       Set<String> classes,
                                       @Nullable
                                       String voice)
        Returns a value in a score system compliant with the CSS Specificity rules.
        Parameters:
        id - The id of the cue if present, null otherwise.
        tag - Name of the tag, null if it refers to the entire cue.
        classes - An array containing the classes the tag belongs to. Must not be null.
        voice - Annotated voice if present, null otherwise.
        Returns:
        The score of the match, zero if there is no match.
        See Also:
        CSS Cascading

        The score works as follows:

        • Id match adds 0x40000000 to the score.
        • Each class and voice match adds 4 to the score.
        • Tag matching adds 2 to the score.
        • Universal selector matching scores 1.
      • isLinethrough

        public boolean isLinethrough()
      • setLinethrough

        public WebvttCssStyle setLinethrough​(boolean linethrough)
      • isUnderline

        public boolean isUnderline()
      • setUnderline

        public WebvttCssStyle setUnderline​(boolean underline)
      • getFontFamily

        @Nullable
        public String getFontFamily()
      • getFontColor

        public int getFontColor()
      • hasFontColor

        public boolean hasFontColor()
      • getBackgroundColor

        public int getBackgroundColor()
      • setBackgroundColor

        public WebvttCssStyle setBackgroundColor​(int backgroundColor)
      • hasBackgroundColor

        public boolean hasBackgroundColor()
      • setFontSizeUnit

        public WebvttCssStyle setFontSizeUnit​(short unit)
      • getFontSize

        public float getFontSize()
      • getRubyPosition

        @Position
        public int getRubyPosition()
      • setCombineUpright

        public WebvttCssStyle setCombineUpright​(boolean enabled)
      • getCombineUpright

        public boolean getCombineUpright()