public class TextStyle extends Object implements Serializable
Constructor and Description |
---|
TextStyle(float fontSize) |
TextStyle(float fontSize,
boolean bold,
boolean italic) |
TextStyle(String fontName,
float fontSize,
boolean bold,
boolean italic)
Creates a text style from its font's name, its size and style.
|
Modifier and Type | Method and Description |
---|---|
TextStyle |
deriveBoldStyle(boolean bold)
Returns a derived style of this text style with a given bold style.
|
TextStyle |
deriveItalicStyle(boolean italic)
Returns a derived style of this text style with a given italic style.
|
TextStyle |
deriveStyle(float fontSize)
Returns a derived style of this text style with a given font size.
|
TextStyle |
deriveStyle(String fontName)
Returns a derived style of this text style with a given font name.
|
boolean |
equals(Object object)
Returns
true if this text style is equal to object . |
String |
getFontName()
Returns the font name of this text style.
|
float |
getFontSize()
Returns the font size of this text style.
|
int |
hashCode()
Returns a hash code for this text style.
|
boolean |
isBold()
Returns whether this text style is bold or not.
|
boolean |
isItalic()
Returns whether this text style is italic or not.
|
public TextStyle(float fontSize)
public TextStyle(float fontSize, boolean bold, boolean italic)
public TextStyle(String fontName, float fontSize, boolean bold, boolean italic)
public String getFontName()
public float getFontSize()
public boolean isBold()
public boolean isItalic()
public TextStyle deriveStyle(String fontName)
public TextStyle deriveStyle(float fontSize)
public TextStyle deriveBoldStyle(boolean bold)
public TextStyle deriveItalicStyle(boolean italic)
public boolean equals(Object object)
true
if this text style is equal to object
.
© Copyrights 2006-2016 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License