|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.graphics.Font
Safe:
Field Summary | |
(package private) Device |
device
the device where this font was created |
int |
handle
Suppressed: the handle to the OS font resource (Warning: This field is platform dependent) |
Constructor Summary | |
(package private) |
Font()
Prevents uninitialized instances from being created outside the package. |
|
Font(Device device,
FontData fd)
Enabled: Constructs a new font given a device and font data which describes the desired font's appearance. |
|
Font(Device device,
FontData[] fds)
Suppressed: 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)
Enabled: 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()
Enabled: Disposes of the operating system resources associated with the font. |
boolean |
equals(Object object)
Suppressed: Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
FontData[] |
getFontData()
Enabled: Returns an array of FontData s representing the receiver. |
int |
hashCode()
Suppressed: Returns an integer hash code for the receiver. |
(package private) void |
init(Device device,
FontData fd)
|
boolean |
isDisposed()
Enabled: Returns true if the font has been disposed,
and false otherwise. |
String |
toString()
Suppressed: Returns a string containing a concise, human-readable description of the receiver. |
static Font |
win32_new(Device device,
int handle)
Suppressed: 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
Device device
Constructor Detail |
Font()
public Font(Device device, FontData fd)
You must dispose the font when it is no longer required.
device
- the device to create the font onfd
- the FontData that describes the desired font (must not be null)public Font(Device device, FontData[] fds)
You must dispose the font when it is no longer required.
device
- the device to create the font onfds
- the array of FontData that describes the desired font (must not be null)public Font(Device device, String name, int height, int style)
You must dispose the font when it is no longer required.
device
- the device to create the font onname
- the name of the font (must not be null)height
- the font height in pointsstyle
- a bit or combination of NORMAL, BOLD, ITALICMethod Detail |
public void dispose()
public boolean equals(Object object)
equals
in class Object
object
- the object to compare with this object
true
if the object is the same as this object and false
otherwisehashCode()
public FontData[] getFontData()
FontData
s representing the receiver.
On Windows, only one FontData will be returned per font. On X however,
a Font
object may be composed of multiple X
fonts. To support this case, we return an array of font data objects.
public int hashCode()
true
when passed to
equals
must return the same value for this
method.
hashCode
in class Object
equals(java.lang.Object)
void init(Device device, FontData fd)
public boolean isDisposed()
true
if the font has been disposed,
and false
otherwise.
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.
true
when the font is disposed and false
otherwisepublic String toString()
toString
in class Object
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.
device
- the device on which to allocate the colorhandle
- the handle for the font
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |