FontUnit

Inheritance: java.lang.Object

public class FontUnit

Represents the size of a font.

Constructors

ConstructorDescription
FontUnit()The default constructor .
FontUnit(int value)Initializes a new instance of the FontUnit class with the specified font size.
FontUnit(double value)Initializes a new instance of the FontUnit class with the specified font size in points.
FontUnit(double value, int type)Initializes a new instance of the FontUnit class with the specified font size and UnitType value.
FontUnit(Unit value)Initializes a new instance of the FontUnit class with the specified Unit.
FontUnit(String value)Initializes a new instance of the FontUnit class with the specified string.

Fields

FieldDescription
EmptySpecifies an empty FontUnit.
LargeSpecifies a FontUnit with LARGE font.
LargerSpecifies a FontUnit with Larger font.
MediumSpecifies a FontUnit with MEDIUM font.
SmallSpecifies a FontUnit with SMALL font.
SmallerSpecifies a FontUnit with Smaller font.
XLargeSpecifies a FontUnit with X_LARGE font.
XSmallSpecifies a FontUnit with X_SMALL font.
XXLargeSpecifies a FontUnit with XX_LARGE font.
XXSmallSpecifies a FontUnit with XX_SMALL font.

Methods

MethodDescription
equals(Object arg0)
getClass()
getType()returns the font size type.
getUnit()Gets a Unit that represents the font size.
hashCode()
isEmpty()check whether the font size is empty or not.
notify()
notifyAll()
parse(String s)Converts the specified string to its FontUnit equivalent.
point(int n)Creates a FontUnit of type Point from an integer value.
toString()Converts the FontUnit object to a string representation.
wait()
wait(long arg0)
wait(long arg0, int arg1)

FontUnit()

public FontUnit()

The default constructor .

FontUnit(int value)

public FontUnit(int value)

Initializes a new instance of the FontUnit class with the specified font size.

Parameters:

ParameterTypeDescription
valueint

FontUnit(double value)

public FontUnit(double value)

Initializes a new instance of the FontUnit class with the specified font size in points.

Parameters:

ParameterTypeDescription
valuedouble

FontUnit(double value, int type)

public FontUnit(double value, int type)

Initializes a new instance of the FontUnit class with the specified font size and UnitType value.

Parameters:

ParameterTypeDescription
valuedouble
typeint

FontUnit(Unit value)

public FontUnit(Unit value)

Initializes a new instance of the FontUnit class with the specified Unit.

Parameters:

ParameterTypeDescription
valueUnit

FontUnit(String value)

public FontUnit(String value)

Initializes a new instance of the FontUnit class with the specified string.

Parameters:

ParameterTypeDescription
valuejava.lang.String

Empty

public static FontUnit Empty

Specifies an empty FontUnit.

Large

public static FontUnit Large

Specifies a FontUnit with LARGE font.

Larger

public static FontUnit Larger

Specifies a FontUnit with Larger font.

Medium

public static FontUnit Medium

Specifies a FontUnit with MEDIUM font.

Small

public static FontUnit Small

Specifies a FontUnit with SMALL font.

Smaller

public static FontUnit Smaller

Specifies a FontUnit with Smaller font.

XLarge

public static FontUnit XLarge

Specifies a FontUnit with X_LARGE font.

XSmall

public static FontUnit XSmall

Specifies a FontUnit with X_SMALL font.

XXLarge

public static FontUnit XXLarge

Specifies a FontUnit with XX_LARGE font.

XXSmall

public static FontUnit XXSmall

Specifies a FontUnit with XX_SMALL font.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getType()

public int getType()

returns the font size type.

Returns: int -

getUnit()

public Unit getUnit()

Gets a Unit that represents the font size.

Returns: Unit

hashCode()

public native int hashCode()

Returns: int

isEmpty()

public boolean isEmpty()

check whether the font size is empty or not.

Returns: boolean - bool value

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

parse(String s)

public static FontUnit parse(String s)

Converts the specified string to its FontUnit equivalent.

Parameters:

ParameterTypeDescription
sjava.lang.String

Returns: FontUnit

point(int n)

public static FontUnit point(int n)

Creates a FontUnit of type Point from an integer value.

Parameters:

ParameterTypeDescription
nint

Returns: FontUnit

toString()

public String toString()

Converts the FontUnit object to a string representation.

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int