|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.graphics.Font
Instances of this class manage operating system resources that define how text looks when it is displayed. Fonts may be constructed by providing a device and either name, size and style information or a 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.
Field Summary | |
int | handle
the handle to the OS font resource (Warning: This field is platform dependent) |
Constructor Summary | |
Font(Device device,
FontData fd)
Constructs a new font given a device and font data which describes the desired font's appearance. | |
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. | |
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. |
Method Summary | |
void | dispose()
Disposes of the operating system resources associated with the font. |
boolean | equals(Object object)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
FontData[] | getFontData()
Returns an array of FontDatas representing the receiver. |
int | hashCode()
Returns an integer hash code for the receiver. |
boolean | isDisposed()
Returns true if the font has been disposed, and false otherwise. |
String | toString()
Returns a string containing a concise, human-readable description of the receiver. |
static Font | win32_new(Device device,
int handle)
Invokes platform specific functionality to allocate a new font. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public int handle
Constructor Detail |
public Font(Device device, FontData fd)
You must dispose the font when it is no longer required.
public Font(Device device, FontData[] fds)
You must dispose the font when it is no longer required.
public Font(Device device, String name, int height, int style)
You must dispose the font when it is no longer required.
Method Detail |
public void dispose()
public boolean equals(Object object)
public FontData[] getFontData()
public int hashCode()
public boolean isDisposed()
This method gets the dispose state for the font. When a font has been disposed, it is an error to invoke any other method using the font.
public String toString()
public static Font win32_new(Device device, int handle)
IMPORTANT: This method is not part of the public API for Font. 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 called from application code.
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.