Constructor and Description |
---|
Font(Device device,
FontData fontData)
Constructs a new font given a device and font data
which describes the desired font's appearance.
|
Font(Device device,
FontData[] fontData)
Constructs a new font given a device and an array
of font data which describes the desired font's
appearance.
|
Font(Device device,
java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
FontData[] |
getFontData()
Returns an array of
FontData s representing the receiver. |
int |
hashCode() |
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
dispose, getDevice, isDisposed
public Font(Device device, FontData fontData)
You must dispose the font when it is no longer required.
device
- the device to create the font onfontData
- the FontData that describes the desired font (must not be null)java.lang.IllegalArgumentException
- SWTError
- public Font(Device device, FontData[] fontData)
You must dispose the font when it is no longer required.
device
- the device to create the font onfontData
- the array of FontData that describes the desired font (must not be null)java.lang.IllegalArgumentException
- SWTError
- public Font(Device device, java.lang.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, ITALICjava.lang.IllegalArgumentException
- SWTError
- public FontData[] getFontData()
FontData
s representing the receiver.
SWTException
- public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) EclipseSource and others 2002, 2020.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0