Class Cue.Builder

  • Enclosing class:
    Cue

    public static final class Cue.Builder
    extends Object
    A builder for Cue objects.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • getBitmap

        @Nullable
        public Bitmap getBitmap()
        Gets the cue image.
        See Also:
        Cue.bitmap
      • setTextAlignment

        public Cue.Builder setTextAlignment​(@Nullable
                                            Layout.Alignment textAlignment)
        Sets the alignment of the cue text within the cue box.

        Passing null means the alignment is undefined.

        See Also:
        Cue.textAlignment
      • getTextAlignment

        @Nullable
        public Layout.Alignment getTextAlignment()
        Gets the alignment of the cue text within the cue box, or null if the alignment is undefined.
        See Also:
        Cue.textAlignment
      • setLine

        public Cue.Builder setLine​(float line,
                                   @LineType
                                   int lineType)
        Sets the position of the cue box within the viewport in the direction orthogonal to the writing direction.
        See Also:
        Cue.line, Cue.lineType
      • getLine

        public float getLine()
        Gets the position of the lineAnchor of the cue box within the viewport in the direction orthogonal to the writing direction.
        See Also:
        Cue.line
      • setPosition

        public Cue.Builder setPosition​(float position)
        Sets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
        See Also:
        Cue.position
      • getPosition

        public float getPosition()
        Gets the fractional position of the positionAnchor of the cue box within the viewport in the direction orthogonal to line.
        See Also:
        Cue.position
      • getTextSize

        public float getTextSize()
        Gets the default text size for this cue's text.
        See Also:
        Cue.textSize
      • setSize

        public Cue.Builder setSize​(float size)
        Sets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
        See Also:
        Cue.size
      • getSize

        public float getSize()
        Gets the size of the cue box in the writing direction specified as a fraction of the viewport size in that direction.
        See Also:
        Cue.size
      • setBitmapHeight

        public Cue.Builder setBitmapHeight​(float bitmapHeight)
        Sets the bitmap height as a fraction of the viewport size.
        See Also:
        Cue.bitmapHeight
      • getBitmapHeight

        public float getBitmapHeight()
        Gets the bitmap height as a fraction of the viewport size.
        See Also:
        Cue.bitmapHeight
      • isWindowColorSet

        public boolean isWindowColorSet()
        Returns true if the fill color of the window is set.
        See Also:
        Cue.windowColorSet
      • getWindowColor

        public int getWindowColor()
        Gets the fill color of the window.
        See Also:
        Cue.windowColor
      • setShearDegrees

        public Cue.Builder setShearDegrees​(float shearDegrees)
        Sets the shear angle for this Cue.
      • build

        public Cue build()
        Build the cue.