org.pentaho.chart.model
Class StyledText

java.lang.Object
  extended by org.pentaho.chart.model.StyledText
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChartTitle

public class StyledText
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
StyledText()
           
StyledText(String text)
           
StyledText(String text, String fontFamily, CssStyle.FontStyle fontStyle, CssStyle.FontWeight fontWeight, int fontSize)
           
 
Method Summary
 CssStyle.TextAlignment getAlignment()
           
 Integer getBackgroundColor()
           
 Integer getColor()
           
 String getFontFamily()
           
 Integer getFontSize()
           
 CssStyle.FontStyle getFontStyle()
           
 CssStyle.FontWeight getFontWeight()
           
 CssStyle getStyle()
           
 String getText()
           
 void setAlignment(CssStyle.TextAlignment textAlignment)
          Alignment of text within its given context.
 void setBackgroundColor(Integer color)
          Hex RGB notation of the desired background color
 void setColor(Integer color)
          Hex RGB notation of the desired color
 void setFont(String family, Integer size)
          #setFont(String, Integer, FontStyle, FontWeight)
 void setFont(String family, Integer size, CssStyle.FontStyle fontStyle, CssStyle.FontWeight fontWeight)
           The font-family is the name of the font or group of fonts to be used.
 void setFontFamily(String family)
          #setFont(String, Integer, FontStyle, FontWeight)
 void setFontSize(Integer size)
          #setFont(String, Integer, FontStyle, FontWeight)
 void setFontStyle(CssStyle.FontStyle fontStyle)
          #setFont(String, Integer, FontStyle, FontWeight)
 void setFontWeight(CssStyle.FontWeight weight)
          #setFont(String, Integer, FontStyle, FontWeight)
 void setText(String text)
          The text content of the item
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyledText

public StyledText(String text)

StyledText

public StyledText(String text,
                  String fontFamily,
                  CssStyle.FontStyle fontStyle,
                  CssStyle.FontWeight fontWeight,
                  int fontSize)

StyledText

public StyledText()
Method Detail

getText

public String getText()

setText

public void setText(String text)
The text content of the item

Parameters:
text -

getFontFamily

public String getFontFamily()

getFontSize

public Integer getFontSize()

getFontStyle

public CssStyle.FontStyle getFontStyle()

getFontWeight

public CssStyle.FontWeight getFontWeight()

setFont

public void setFont(String family,
                    Integer size,
                    CssStyle.FontStyle fontStyle,
                    CssStyle.FontWeight fontWeight)

The font-family is the name of the font or group of fonts to be used.

For example
arial
monospace
times new roman
verdana

The font-size is the size in pixels of the font.

The font-style is the visual styling of the font.

Possible values
NORMAL
ITALIC
OBLIQUE

The font-weight is the visual density of the text.

Possible values
NORMAL
BOLD

Parameters:
family -
size -
fontStyle -
fontWeight -

setFont

public void setFont(String family,
                    Integer size)
#setFont(String, Integer, FontStyle, FontWeight)


setFontFamily

public void setFontFamily(String family)
#setFont(String, Integer, FontStyle, FontWeight)


setFontSize

public void setFontSize(Integer size)
#setFont(String, Integer, FontStyle, FontWeight)


setFontStyle

public void setFontStyle(CssStyle.FontStyle fontStyle)
#setFont(String, Integer, FontStyle, FontWeight)


setFontWeight

public void setFontWeight(CssStyle.FontWeight weight)
#setFont(String, Integer, FontStyle, FontWeight)


getBackgroundColor

public Integer getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(Integer color)
Hex RGB notation of the desired background color

Basic colors
White: #FFFFFF
Black: #000000
Grey: #888888
Red: #FF0000
Green: #00FF00
Blue: #0000FF

Parameters:
color -

getColor

public Integer getColor()

setColor

public void setColor(Integer color)
Hex RGB notation of the desired color

Basic colors
White #FFFFFF
Black #000000
Grey #888888
Red #FF0000
Green #00FF00
Blue #0000FF

Parameters:
color -

getStyle

public CssStyle getStyle()

getAlignment

public CssStyle.TextAlignment getAlignment()

setAlignment

public void setAlignment(CssStyle.TextAlignment textAlignment)
Alignment of text within its given context.

Possible values
LEFT
CENTER
RIGHT

Parameters:
textAlignment -