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,
                                       String tag,
                                       Set<String> classes,
                                       String voice)
        Returns a value in a score system compliant with the CSS Specificity rules.

        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.
        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.
        The score of the match, zero if there is no match.
        See Also:
        CSS Cascading
      • isLinethrough

        public boolean isLinethrough()
      • setLinethrough

        public WebvttCssStyle setLinethrough​(boolean linethrough)
      • isUnderline

        public boolean isUnderline()
      • setUnderline

        public WebvttCssStyle setUnderline​(boolean underline)
      • getFontFamily

        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​( int unit)
      • getFontSizeUnit

        public int getFontSizeUnit()
      • getFontSize

        public float getFontSize()
      • setRubyPosition

        public WebvttCssStyle setRubyPosition​( int rubyPosition)
      • getRubyPosition

        public int getRubyPosition()
      • setCombineUpright

        public WebvttCssStyle setCombineUpright​(boolean enabled)
      • getCombineUpright

        public boolean getCombineUpright()