| Modifier and Type | Field and Description |
|---|---|
static int |
CENTER_ALIGNMENT
Defines the center paragraph alignment.
|
static int |
JUSTIFY_ALIGNMENT
Defines the justify paragraph alignment.
|
static int |
LEFT_ALIGNMENT
Defines the left paragraph alignment.
|
static int |
RIGHT_ALIGNMENT
Defines the right paragraph alignment.
|
| Constructor and Description |
|---|
TextStyle()
Creates a default text style.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones the object.
|
int |
getAlignment()
Returns the paragraph alignment.
|
Color |
getBackground()
Returns the background color for text.
|
Font |
getFont()
Returns the font of the text.
|
Color |
getForeground()
Returns the foreground color for text.
|
int |
getSuperscript()
Returns whether the text is in superscript or not.
|
boolean |
isStrikeThrough()
Returns whether the text is in strike through mode.
|
boolean |
isUnderline()
Returns whether the text is underlined or not.
|
void |
setAlignment(int alignment)
Changes the paragraph alignment.
|
void |
setBackground(Color c)
Changes the background color for text.
|
void |
setFont(Font font)
Changes the font of the text.
|
void |
setForeground(Color c)
Changes the foreground color for text.
|
void |
setStrikeThrough(boolean set)
Sets the text in strike through mode.
|
void |
setSuperscript(int superscript)
Sets the text in superscript.
|
void |
setUnderline(boolean set)
Underlines the text.
|
public static final int LEFT_ALIGNMENT
public static final int CENTER_ALIGNMENT
public static final int RIGHT_ALIGNMENT
public static final int JUSTIFY_ALIGNMENT
public Color getForeground()
setForeground(java.awt.Color)public void setForeground(Color c)
getForeground()public Color getBackground()
setBackground(java.awt.Color)public void setBackground(Color c)
getBackground()public Font getFont()
setFont(java.awt.Font)public void setAlignment(int alignment)
alignment - One of LEFT_ALIGNMENT,
CENTER_ALIGNMENT, RIGHT_ALIGNMENT, JUSTIFY_ALIGNMENT.getAlignment()public int getAlignment()
setAlignment(int)public void setUnderline(boolean set)
isUnderline()public boolean isUnderline()
setUnderline(boolean)public void setSuperscript(int superscript)
getSuperscript()public int getSuperscript()
setSuperscript(int)public void setStrikeThrough(boolean set)
isStrikeThrough()public boolean isStrikeThrough()
setStrikeThrough(boolean)© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.