public final class Font extends Object
Provides a font.
Constructor and Description |
---|
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) |
boolean |
equals(Object obj) |
String |
getName()
Gets a name of the font.
|
double |
getSize()
Gets a size of the text.
|
int |
hashCode() |
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(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)
Copyright © 2018. All rights reserved.