All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.graphics.ExtendedFont
java.lang.Object
|
+----jp.kyasu.graphics.ExtendedFont
- public class ExtendedFont
- extends Object
- implements Serializable
The ExtendedFont
class implements an extended font object.
The extended font has a color attribute and an underline attribute.
The extended font is immutable.
- Version:
- 25 Nov 1997
- Author:
- Kazuki YASUMATSU
-
ExtendedFont(Font)
- Constructs an extended font with the specified font.
-
ExtendedFont(Font, boolean)
- Constructs an extended font with the specified font and underline.
-
ExtendedFont(Font, Color)
- Constructs an extended font with the specified font and color.
-
ExtendedFont(Font, Color, boolean)
- Constructs an extended font with the specified font, color and
underline.
-
ExtendedFont(String, int, int)
- Constructs an extended font with the specified name, style and size.
-
ExtendedFont(String, int, int, boolean)
- Constructs an extended font with the specified name, style, size
and underline.
-
ExtendedFont(String, int, int, Color)
- Constructs an extended font with the specified name, style, size
and color.
-
ExtendedFont(String, int, int, Color, boolean)
- Constructs an extended font with the specified name, style, size,
color and underline.
-
deriveFont(boolean)
- Creates a new font by replicating this font with a new underline
attribute associated with it.
-
deriveFont(Color)
- Creates a new font by replicating this font with a new color
object associated with it.
-
equals(Object)
- Compares two objects for equality.
-
equalsStyle(ExtendedFont)
- Compares the styles of two fonts for equality.
-
getColor()
- Returns the color of the extended font.
-
getFamily()
- Returns the platform specific family name of the font.
-
getFont()
- Returns the font object in this extended font.
-
getFontMetrics()
- Returns the font metrics for this extended font.
-
getName()
- Returns the logical name of the font.
-
getSize()
- Returns the point size of the font.
-
getStyle()
- Returns the style of the font.
-
hashCode()
- Returns a hashcode for this font.
-
isBold()
- Returns true if the font is bold.
-
isItalic()
- Returns true if the font is italic.
-
isPlain()
- Returns true if the font is plain.
-
isUnderline()
- Checks if this extended font is underlined.
-
toString()
- Returns the string representation of this extended font.
ExtendedFont
public ExtendedFont(String name,
int style,
int size)
- Constructs an extended font with the specified name, style and size.
- Parameters:
- name - the name of the font.
- style - the style of the font.
- size - the point size of the font.
ExtendedFont
public ExtendedFont(String name,
int style,
int size,
Color color)
- Constructs an extended font with the specified name, style, size
and color.
- Parameters:
- name - the name of the font.
- style - the style of the font.
- size - the point size of the font.
- color - the color of the font.
ExtendedFont
public ExtendedFont(String name,
int style,
int size,
boolean underline)
- Constructs an extended font with the specified name, style, size
and underline.
- Parameters:
- name - the name of the font.
- style - the style of the font.
- size - the point size of the font.
- underline - the font is underlined.
ExtendedFont
public ExtendedFont(String name,
int style,
int size,
Color color,
boolean underline)
- Constructs an extended font with the specified name, style, size,
color and underline.
- Parameters:
- name - the name of the font.
- style - the style of the font.
- size - the point size of the font.
- color - the color of the font.
- underline - the font is underlined.
ExtendedFont
public ExtendedFont(Font font)
- Constructs an extended font with the specified font.
- Parameters:
- font - the font object.
ExtendedFont
public ExtendedFont(Font font,
Color color)
- Constructs an extended font with the specified font and color.
- Parameters:
- font - the font object.
- color - the color of the font.
ExtendedFont
public ExtendedFont(Font font,
boolean underline)
- Constructs an extended font with the specified font and underline.
- Parameters:
- font - the font object.
- underline - the font is underlined.
ExtendedFont
public ExtendedFont(Font font,
Color color,
boolean underline)
- Constructs an extended font with the specified font, color and
underline.
- Parameters:
- font - the font object.
- color - the color of the font.
- underline - the font is underlined.
getFamily
public String getFamily()
- Returns the platform specific family name of the font.
getName
public String getName()
- Returns the logical name of the font.
getStyle
public int getStyle()
- Returns the style of the font.
- See Also:
- PLAIN, BOLD, ITALIC
getSize
public int getSize()
- Returns the point size of the font.
isPlain
public boolean isPlain()
- Returns true if the font is plain.
isBold
public boolean isBold()
- Returns true if the font is bold.
isItalic
public boolean isItalic()
- Returns true if the font is italic.
getFont
public Font getFont()
- Returns the font object in this extended font.
getFontMetrics
public FontMetrics getFontMetrics()
- Returns the font metrics for this extended font.
getColor
public Color getColor()
- Returns the color of the extended font.
isUnderline
public boolean isUnderline()
- Checks if this extended font is underlined.
deriveFont
public ExtendedFont deriveFont(Color color)
- Creates a new font by replicating this font with a new color
object associated with it.
- Parameters:
- color - the color object for the new font.
- Returns:
- a new font.
deriveFont
public ExtendedFont deriveFont(boolean underline)
- Creates a new font by replicating this font with a new underline
attribute associated with it.
- Parameters:
- underline - the underline attribute for the new font.
- Returns:
- a new font.
hashCode
public int hashCode()
- Returns a hashcode for this font.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object anObject)
- Compares two objects for equality.
- Overrides:
- equals in class Object
equalsStyle
public boolean equalsStyle(ExtendedFont exFont)
- Compares the styles of two fonts for equality.
toString
public String toString()
- Returns the string representation of this extended font.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index