public class FontProfile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FontProfile.FontSize
Font sizes.
|
Constructor and Description |
---|
FontProfile()
Creates a font profile.
|
FontProfile(java.lang.String family,
FontProfile.FontSize size,
int style)
Creates a font profile specifying its attributes.
|
FontProfile(java.lang.String family,
int size,
int style)
Creates a font profile specifying its attributes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getFamily()
Gets the font family.
|
FontProfile.FontSize |
getSize()
Gets the font size.
|
int |
getSizeValue()
Gets the font size value.
|
int |
getStyle()
Gets the font style.
|
int |
hashCode() |
void |
setFamily(java.lang.String family)
Sets the family.
|
void |
setSize(FontProfile.FontSize size)
Sets the size.
|
void |
setSizeValue(int sizeValue)
Sets the size value.
|
void |
setStyle(int style)
Sets the style.
|
public FontProfile()
public FontProfile(java.lang.String family, FontProfile.FontSize size, int style)
family
- the font family to set.size
- the size to set.style
- the style to set.java.lang.IllegalArgumentException
- if the given size is FontProfile.FontSize.LENGTH
.public FontProfile(java.lang.String family, int size, int style)
The size FontProfile.FontSize.LENGTH
is used associated with the given size in pixels.
family
- the font family to set.size
- the size in pixels.style
- the style to set.public java.lang.String getFamily()
public void setFamily(java.lang.String family)
Font.getDescriptor()
.family
- the family to set.public FontProfile.FontSize getSize()
public void setSize(FontProfile.FontSize size)
size
- the size to set.public int getSizeValue()
Used only if size is one of FontProfile.FontSize.LENGTH
.
public void setSizeValue(int sizeValue)
sizeValue
- the size value to set.public int getStyle()
public void setStyle(int style)
style
- the style to set.public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object