/** * Constructs a new font given a device and font data * which describes the desired font's appearance. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fd the FontData that describes the desired font (must not be null) * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fd argument is null</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given font data</li> * </ul> * * @see #dispose() */ public Font(Device device, FontData fd) { super(device); init(fd); init(); }
/** * Constructs a new font given a device, a font name, * the height of the desired font in points, and a font * style. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param name the name of the font (must not be null) * @param height the font height in points * @param style a bit or combination of NORMAL, BOLD, ITALIC * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the name argument is null</li> * <li>ERROR_INVALID_ARGUMENT - if the height is negative</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given arguments</li> * </ul> * * @see #dispose() */ public Font(Device device, String name, int height, int style) { super(device); init(name, height, style, null); init(); }
/** * Constructs a new font given a device, a font name, * the height of the desired font in points, and a font * style. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param name the name of the font (must not be null) * @param height the font height in points * @param style a bit or combination of NORMAL, BOLD, ITALIC * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the name argument is null</li> * <li>ERROR_INVALID_ARGUMENT - if the height is negative</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given arguments</li> * </ul> * * @see #dispose() */ public Font(Device device, String name, int height, int style) { super(device); init(name, height, style, null); init(); }
/** * Constructs a new font given a device, a font name, * the height of the desired font in points, and a font * style. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param name the name of the font (must not be null) * @param height the font height in points * @param style a bit or combination of NORMAL, BOLD, ITALIC * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the name argument is null</li> * <li>ERROR_INVALID_ARGUMENT - if the height is negative</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given arguments</li> * </ul> * * @see #dispose() */ public Font(Device device, String name, int height, int style) { super(device); init(name, height, style, null); init(); }
/** * Constructs a new font given a device and font data * which describes the desired font's appearance. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fd the FontData that describes the desired font (must not be null) * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fd argument is null</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given font data</li> * </ul> * * @see #dispose() */ public Font(Device device, FontData fd) { super(device); if (fd == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.string); init(); }
/** * Constructs a new font given a device and font data * which describes the desired font's appearance. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fd the FontData that describes the desired font (must not be null) * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fd argument is null</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given font data</li> * </ul> * * @see #dispose() */ public Font(Device device, FontData fd) { super(device); if (fd == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.string); init(); }
/** * Constructs a new font given a device and font data * which describes the desired font's appearance. * <p> * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fd the FontData that describes the desired font (must not be null) * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fd argument is null</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given font data</li> * </ul> * * @see #dispose() */ public Font(Device device, FontData fd) { super(device); if (fd == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.string); init(); }