com.adobe.mediacore
Class TextFormatBuilder

java.lang.Object
  extended by com.adobe.mediacore.TextFormatBuilder

public final class TextFormatBuilder
extends Object


Constructor Summary
TextFormatBuilder()
          Constructor which initializes a TextFormat with default attributes.
TextFormatBuilder(TextFormat.Font font, TextFormat.Size size, TextFormat.FontEdge fontEdge, TextFormat.Color fontColor, TextFormat.Color backgroundColor, TextFormat.Color fillColor, TextFormat.Color edgeColor, int fontOpacity, int backgroundOpacity, int fillOpacity)
          Constructor using parameters to initialize a TextFormat.
 
Method Summary
 TextFormatBuilder setBackgroundColor(TextFormat.Color backgroundColor)
          Sets the background color.
 TextFormatBuilder setBackgroundOpacity(int backgroundOpacity)
          Sets the background opacity.
 TextFormatBuilder setEdgeColor(TextFormat.Color edgeColor)
          Sets the edge color.
 TextFormatBuilder setFillColor(TextFormat.Color fillColor)
          Sets the fill color.
 TextFormatBuilder setFillOpacity(int fillOpacity)
          Sets the fill opacity.
 TextFormatBuilder setFont(TextFormat.Font font)
          Sets the text font.
 TextFormatBuilder setFontColor(TextFormat.Color fontColor)
          Sets the font color.
 TextFormatBuilder setFontEdge(TextFormat.FontEdge fontEdge)
          Sets the font edge.
 TextFormatBuilder setFontOpacity(int fontOpacity)
          Sets the font opacity.
 TextFormatBuilder setSize(TextFormat.Size size)
          Sets the text size.
 TextFormat toTextFormat()
          Creates a TextFormat with the arguments supplied to this builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFormatBuilder

public TextFormatBuilder()
Constructor which initializes a TextFormat with default attributes.


TextFormatBuilder

public TextFormatBuilder(TextFormat.Font font,
                         TextFormat.Size size,
                         TextFormat.FontEdge fontEdge,
                         TextFormat.Color fontColor,
                         TextFormat.Color backgroundColor,
                         TextFormat.Color fillColor,
                         TextFormat.Color edgeColor,
                         int fontOpacity,
                         int backgroundOpacity,
                         int fillOpacity)
Constructor using parameters to initialize a TextFormat.

Parameters:
font - The desired font.
size - The desired text size.
fontEdge - The desired font edge.
fontColor - The desired font color.
backgroundColor - The desired background color.
fillColor - The desired fill color.
edgeColor - The desired color to draw the text edges.
fontOpacity - The desired font opacity.
backgroundOpacity - The desired background opacity.
fillOpacity - The desired fill opacity.
Method Detail

setFont

public TextFormatBuilder setFont(TextFormat.Font font)
Sets the text font.

Parameters:
font - The desired font
Returns:
This builder object to allow chaining calls

setBackgroundColor

public TextFormatBuilder setBackgroundColor(TextFormat.Color backgroundColor)
Sets the background color.

Parameters:
backgroundColor - The desired color
Returns:
This builder object to allow chaining calls

setFillColor

public TextFormatBuilder setFillColor(TextFormat.Color fillColor)
Sets the fill color.

Parameters:
fillColor - The desired color
Returns:
This builder object to allow chaining calls

setEdgeColor

public TextFormatBuilder setEdgeColor(TextFormat.Color edgeColor)
Sets the edge color.

Parameters:
edgeColor - The desired color
Returns:
This builder object to allow chaining calls

setSize

public TextFormatBuilder setSize(TextFormat.Size size)
Sets the text size.

Parameters:
size - The desired text size
Returns:
This builder object to allow chaining calls

setFontEdge

public TextFormatBuilder setFontEdge(TextFormat.FontEdge fontEdge)
Sets the font edge.

Parameters:
fontEdge - The desired edge effect
Returns:
This builder object to allow chaining calls

setFontOpacity

public TextFormatBuilder setFontOpacity(int fontOpacity)
Sets the font opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.

Parameters:
fontOpacity -
Returns:
This builder object to allow chaining calls

setBackgroundOpacity

public TextFormatBuilder setBackgroundOpacity(int backgroundOpacity)
Sets the background opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.

Parameters:
backgroundOpacity - The background opacity
Returns:
This builder object to allow chaining calls

setFillOpacity

public TextFormatBuilder setFillOpacity(int fillOpacity)
Sets the fill opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.

Parameters:
fillOpacity - The desired opacity
Returns:
This builder object to allow chaining calls

setFontColor

public TextFormatBuilder setFontColor(TextFormat.Color fontColor)
Sets the font color.

Parameters:
fontColor - The desired font color
Returns:
This builder object to allow chaining calls

toTextFormat

public TextFormat toTextFormat()
Creates a TextFormat with the arguments supplied to this builder.