yu.ac.bg.etf.javaqx.qswing.graphics
Class Font

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.graphics.Font
All Implemented Interfaces:
Disposable

public class Font
extends java.lang.Object
implements Disposable

Font Class.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static int BOLD
          The bold style constant.
static int ITALIC
          The italic style constant.
static int OVERLINE
          The overline style constant.
static int PLAIN
          The plain style constant.
static int STRIKEOUT
          The strikeout style constant.
static int UNDERLINE
          The underline style constant.
 
Constructor Summary
Font(java.lang.String name, int style, int size)
          Constructs new Font object.
 
Method Summary
 Font deriveFont(int style)
          Constructs new Font object using this font and specified style.
 void dispose()
          Disposes the object.
 boolean equals(java.lang.Object obj)
          
protected  void finalize()
          
 java.lang.String getName()
          Returns font name.
 int getSize()
          Returns font size.
 int getStyle()
          Returns font style.
 int hashCode()
          
 boolean isBold()
          Returns true if font is bold.
 boolean isDisposed()
          Returns true if the object is disposed.
 boolean isItalic()
          Returns true if font is italic.
 boolean isOverline()
          Returns true if font is overline.
 boolean isPlain()
          Returns true if font is plane.
 boolean isStrikeOut()
          Returns true if font is overline.
 boolean isUnderline()
          Returns true if font is underline.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PLAIN

public static final int PLAIN
The plain style constant.

See Also:
Constant Field Values

BOLD

public static final int BOLD
The bold style constant.

See Also:
Constant Field Values

ITALIC

public static final int ITALIC
The italic style constant.

See Also:
Constant Field Values

UNDERLINE

public static final int UNDERLINE
The underline style constant.

See Also:
Constant Field Values

OVERLINE

public static final int OVERLINE
The overline style constant.

See Also:
Constant Field Values

STRIKEOUT

public static final int STRIKEOUT
The strikeout style constant.

See Also:
Constant Field Values
Constructor Detail

Font

public Font(java.lang.String name,
            int style,
            int size)
Constructs new Font object.

Parameters:
name - the font name
style - the font style
size - the font size
Method Detail

getName

public java.lang.String getName()
Returns font name.

Returns:
font name

getStyle

public int getStyle()
Returns font style.

Returns:
font style

getSize

public int getSize()
Returns font size.

Returns:
font size

isPlain

public boolean isPlain()
Returns true if font is plane.

Returns:
true if font is plane

isBold

public boolean isBold()
Returns true if font is bold.

Returns:
true if font is bold

isItalic

public boolean isItalic()
Returns true if font is italic.

Returns:
true if font is italic

isUnderline

public boolean isUnderline()
Returns true if font is underline.

Returns:
true if font is underline

isOverline

public boolean isOverline()
Returns true if font is overline.

Returns:
true if font is overline

isStrikeOut

public boolean isStrikeOut()
Returns true if font is overline.

Returns:
true if font is overline

deriveFont

public Font deriveFont(int style)
Constructs new Font object using this font and specified style.

Parameters:
style - font style
Returns:
derived font

isDisposed

public final boolean isDisposed()
Returns true if the object is disposed.

Specified by:
isDisposed in interface Disposable
Returns:
true if the object is disposed

dispose

public final void dispose()
Disposes the object.

Specified by:
dispose in interface Disposable

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()


toString

public java.lang.String toString()


finalize

protected final void finalize()



Copyright © 2007 ETF and contributors. All Rights Reserved.