java.lang.Object
omix.lang.Font
- All Implemented Interfaces:
Serializable
public final class Font extends Object implements Serializable
This class represents font in the Omix network diagrams.
Fonts consist of:
- font family name
- size
- bold
- italic
- underlined
- overlined
- strikeOut
- Author:
- Dr. Peter Droste, Omix Visualization
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description Font(String family, double size)
Equals to Font(family, size, false, false)Font(String family, double size, boolean bold, boolean italic)
Equals to Font(family, size, bold, italic, false)Font(String family, double size, boolean bold, boolean italic, boolean underlined)
Equals to Font(family, size, bold, italic, underlined, false, false)Font(String family, double size, boolean bold, boolean italic, boolean underlined, boolean overlined, boolean strikeOut)
creates a font with the given attributes. -
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
static Font
fromString(String strg)
This method is for file input purpose.String
getFamily()
double
getSize()
int
hashCode()
boolean
isBold()
boolean
isItalic()
boolean
isOverlined()
boolean
isStrikeOut()
boolean
isUnderlined()
String
toString()
static String
toString(Font font)
This method is for file output purpose.
-
Constructor Details
-
Font
@ConstructorProperties({"family","size","bold","italic","underlined","overlined","strikeOut"}) public Font(String family, double size, boolean bold, boolean italic, boolean underlined, boolean overlined, boolean strikeOut)creates a font with the given attributes.- Parameters:
family
- familysize
- sizebold
- bolditalic
- italicunderlined
- underlinedoverlined
- overlinedstrikeOut
- strikeOut
-
Font
@ConstructorProperties({"family","size","bold","underlined"}) public Font(String family, double size, boolean bold, boolean italic, boolean underlined)Equals to Font(family, size, bold, italic, underlined, false, false)- Parameters:
family
- familysize
- sizebold
- bolditalic
- italicunderlined
- underlined
-
Font
@ConstructorProperties({"family","size","bold","italic"}) public Font(String family, double size, boolean bold, boolean italic)Equals to Font(family, size, bold, italic, false)- Parameters:
family
- familysize
- sizebold
- bolditalic
- italic
-
Font
Equals to Font(family, size, false, false)- Parameters:
family
- familysize
- size
-
-
Method Details
-
isBold
public boolean isBold() -
getFamily
-
isItalic
public boolean isItalic() -
isStrikeOut
public boolean isStrikeOut() -
isOverlined
public boolean isOverlined() -
getSize
public double getSize() -
isUnderlined
public boolean isUnderlined() -
toString
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
toString
This method is for file output purpose.- Parameters:
font
- font- Returns:
- string representation of the font
-
fromString
This method is for file input purpose.- Parameters:
strg
- string representation of the font- Returns:
- the parsed font
-
hashCode
public int hashCode() -
equals
-