FontUnit
Inheritance: java.lang.Object
public class FontUnit
Represents the size of a font.
Constructors
Constructor | Description |
---|---|
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
Field | Description |
---|---|
Empty | Specifies an empty FontUnit. |
Large | Specifies a FontUnit with LARGE font. |
Larger | Specifies a FontUnit with Larger font. |
Medium | Specifies a FontUnit with MEDIUM font. |
Small | Specifies a FontUnit with SMALL font. |
Smaller | Specifies a FontUnit with Smaller font. |
XLarge | Specifies a FontUnit with X_LARGE font. |
XSmall | Specifies a FontUnit with X_SMALL font. |
XXLarge | Specifies a FontUnit with XX_LARGE font. |
XXSmall | Specifies a FontUnit with XX_SMALL font. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
value | int |
FontUnit(double value)
public FontUnit(double value)
Initializes a new instance of the FontUnit class with the specified font size in points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
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:
Parameter | Type | Description |
---|---|---|
value | double | |
type | int |
FontUnit(Unit value)
public FontUnit(Unit value)
Initializes a new instance of the FontUnit class with the specified Unit.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Unit |
FontUnit(String value)
public FontUnit(String value)
Initializes a new instance of the FontUnit class with the specified string.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
s | java.lang.String |
Returns: FontUnit
point(int n)
public static FontUnit point(int n)
Creates a FontUnit of type Point from an integer value.
Parameters:
Parameter | Type | Description |
---|---|---|
n | int |
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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |