public class FontChange extends Object
Modifier and Type | Field and Description |
---|---|
String |
newName
The new font name - if null it will not be changed.
|
double |
sizeConstant
This will be added to the current size multiplied by sizeFactor.
|
double |
sizeFactor
This will be multiplied by the current size.
|
int |
stylesToClear
If this is not null the specified style will be cleared.
|
int |
stylesToSet
If this is not null the specified style will be set.
|
int |
stylesToToggle
If this is not null the specified style will be toggled.
|
Constructor and Description |
---|
FontChange() |
Modifier and Type | Method and Description |
---|---|
FontChange |
apply(FontChange other)
Modify this FontChange so that it acts as it would if the other FontChange had been applied after this one
was applied.
|
FontChange |
changeName(String name) |
FontChange |
changeSize(double newSize) |
FontChange |
changeSize(double sizeFactor,
double sizeConstant) |
FontChange |
changeSizeFactor(double factor) |
FontChange |
changeStyle(int stylesToSet,
int stylesToClear,
int stylesToToggle) |
FontChange |
clear()
Sets the newName to null, the sizeFactor to 1 and sizeConstant to 0 and stylesToSet, stylesToClear and
stylesToToggle to 0.
|
boolean |
hasChange()
Returns true if this FontChange actually specifies a change, false if it does not.
|
public String newName
public double sizeFactor
public double sizeConstant
public int stylesToSet
public int stylesToClear
public int stylesToToggle
public FontChange apply(FontChange other)
other
- the other FontChange.public FontChange clear()
public FontChange changeName(String name)
public FontChange changeStyle(int stylesToSet, int stylesToClear, int stylesToToggle)
public FontChange changeSizeFactor(double factor)
public FontChange changeSize(double newSize)
public FontChange changeSize(double sizeFactor, double sizeConstant)
public boolean hasChange()