public final class Font extends Object
Provides a font.
Constructor and Description |
---|
Font(boolean isItalic,
boolean isBold)
Initializes a new instance of the
Font class. |
Font(String name,
double size,
boolean isItalic,
boolean isBold)
Initializes a new instance of the
Font class. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Font other)
Indicates whether the current object is equal to another object of the same type.
|
boolean |
equals(Object obj)
Determines whether the specified object is equal to the current object.
|
String |
getName()
Gets a name of the font.
|
double |
getSize()
Gets a size of the text.
|
int |
hashCode()
Serves as a hash function for a particular type.
|
boolean |
isBold()
Gets a value indicating whether text is bold.
|
boolean |
isItalic()
Gets a value indicating whether text is italic.
|
public static final Font EMPTY
An empty font.
public Font(boolean isItalic, boolean isBold)
Initializes a new instance of the Font
class.
isItalic
- A value indicating whether the text is italic; otherwise, false.isBold
- A value indicating whether the text is bold; otherwise, false.public Font(String name, double size, boolean isItalic, boolean isBold)
Initializes a new instance of the Font
class.
name
- A name of the font.size
- A size of the font.isItalic
- A value indicating whether the text is italic; otherwise, false.isBold
- A value indicating whether the text is bold; otherwise, false.public String getName()
Gets a name of the font.
public double getSize()
Gets a size of the text.
public boolean isItalic()
Gets a value indicating whether text is italic.
public boolean isBold()
Gets a value indicating whether text is bold.
public boolean equals(Font other)
Indicates whether the current object is equal to another object of the same type.
other
- An object to compare with this object.public boolean equals(Object obj)
Determines whether the specified object is equal to the current object.
Copyright © 2019. All rights reserved.