FontData object which encapsulates this data.
Application code must explicitly invoke the Font.dispose()
method to release the operating system resources managed by each instance
when those instances are no longer required.
FontData, Font snippets, SWT Examples: GraphicsExample, PaintExample, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| public long | handle
the handle to the OS font resource (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public | |
| public | |
| public | Font(Device
the device to create the font on device, String the name of the font (must not be null) name, int the font height in points height, int a bit or combination of NORMAL, BOLD, ITALIC style)Constructs a new font given a device, a font name, the height of the desired font in points, and a font style. |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public boolean | Returns: true if the object is the same as this object and false otherwisethe object to compare with this object object)Overrides java. |
| public FontData[] | Returns: an array of font data objects describing the receiverReturns an array of |
| public static Font | |
| public int | Returns: the receiver's hashOverrides java. |
| pack-priv void | |
| public boolean | Returns: true when the font is disposed and false otherwiseImplements abstract org. true if the font has been disposed,
and false otherwise.
|
| public String | Returns: a string representation of the receiverOverrides java. |
| handle | back to summary |
|---|---|
| public long handle the handle to the OS font resource (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. | |
| Font | back to summary |
|---|---|
| pack-priv Font(Device device) | |
| Font | back to summary |
|---|---|
| public Font(Device device, FontData fd) Constructs a new font given a device and font data which describes the desired font's appearance. You must dispose the font when it is no longer required.
| |
| Font | back to summary |
|---|---|
| public Font(Device device, FontData[] fds) Constructs a new font given a device and an array of font data which describes the desired font's appearance. You must dispose the font when it is no longer required.
| |
| Font | back to summary |
|---|---|
| public Font(Device device, String name, int height, int style) Constructs a new font given a device, a font name, the height of the desired font in points, and a font style. You must dispose the font when it is no longer required.
| |
| Font | back to summary |
|---|---|
| pack-priv Font(Device device, String name, float height, int style) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() Overrides org.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. | |
| getFontData | back to summary |
|---|---|
| public FontData[] getFontData() Returns an array of
| |
| gtk_new | back to summary |
|---|---|
| public static Font gtk_new(Device device, long handle) Invokes platform specific functionality to allocate a new font. Important Note This method is not part of the public
API for
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns an integer hash code for the receiver. Any two
objects that return | |
| init | back to summary |
|---|---|
| pack-priv void init(String name, float height, int style, byte[] fontString) | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements abstract org. Returns
This method gets the dispose state for the font.
When a font has been disposed, it is an error to
invoke any other method (except
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |