public class

TextStyledElement

extends ContentElement
java.lang.Object
   ↳ com.pdftron.layout.ContentElement
     ↳ com.pdftron.layout.TextStyledElement

Class Overview

A TextStyledElement provides access to the text style properties of a ContentElement.

Summary

Public Methods
static void SetBackgroundColor(long self, int red, int green, int blue)
String getFontFace()
Get the font face name used for the style
double getFontSize()
Get the font size of the style
boolean isBold()
Get the bold setting of the style
boolean isItalic()
Get the italic setting of the style
void setBackgroundColor(int red, int green, int blue)
Sets the background color for the style.
void setBold(boolean val)
Set or unset the style as 'Bold'
void setFontFace(String fontface)
Set the font face name to be used for the style
void setFontSize(double fontsize)
Set font size of the style
void setItalic(boolean val)
Set or unset the style as 'italic'
void setTextColor(int red, int green, int blue)
Set text color for the style The color values must be between 0 and 255, otherwise an exception will be thrown.
[Expand]
Inherited Methods
From class com.pdftron.layout.ContentElement
From class java.lang.Object

Public Methods

public static void SetBackgroundColor (long self, int red, int green, int blue)

public String getFontFace ()

Get the font face name used for the style

Returns
  • the font face name used for the style

public double getFontSize ()

Get the font size of the style

Returns
  • The font size of the style

public boolean isBold ()

Get the bold setting of the style

Returns
  • true if the style is set as 'Bold'

public boolean isItalic ()

Get the italic setting of the style

Returns
  • true if the style is set as 'Italic'

public void setBackgroundColor (int red, int green, int blue)

Sets the background color for the style.

Parameters
red The red component of the background color.
green The green component of the background color.
blue The blue component of the background color.

public void setBold (boolean val)

Set or unset the style as 'Bold'

Parameters
val use true to set the style as 'Bold'

public void setFontFace (String fontface)

Set the font face name to be used for the style

Parameters
fontface The font face name to use for the style

public void setFontSize (double fontsize)

Set font size of the style

Parameters
fontsize The font size to use for the style

public void setItalic (boolean val)

Set or unset the style as 'italic'

Parameters
val use true to set the style as 'Italic'

public void setTextColor (int red, int green, int blue)

Set text color for the style The color values must be between 0 and 255, otherwise an exception will be thrown.

Parameters
red The red component of the text color
green The green component of the text color
blue The blue component of the text color
Throws
IllegalArgumentException if any of the color values is out of range
PDFNetException