Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Rich Ajax Platform
Release 1.2

org.eclipse.swt.graphics
Class FontData

java.lang.Object
  extended by
org.eclipse.swt.graphics.FontData

public final class FontData
extends Object

Instances of this class describe fonts.

Application code does not need to explicitly release the resources managed by each instance when those instances are no longer required, and thus no dispose() method is provided.

Since:
1.0
See Also:
Font

Constructor Summary
FontData ( String string)
          Constructs a new FontData given a string representation in the form generated by the FontData.toString method.
FontData ( String name, int height, int style)
          Constructs a new font data given a font name, the height of the desired font in points, and a font style.
 
Method Summary
 boolean equals ( Object obj)
          Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
 int getHeight ()
          Returns the height of the receiver in points.
  String getName ()
          Returns the name of the receiver.
 int getStyle ()
          Returns the style of the receiver which is a bitwise OR of one or more of the SWT constants NORMAL, BOLD and ITALIC.
 int hashCode ()
          Returns an integer hash code for the receiver.
  String toString ()
          Returns a string representation of the receiver which is suitable for constructing an equivalent instance using the FontData(String) constructor.
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FontData

public FontData(
String name,
                int height,
                int style)
Constructs a new font data given a font name, the height of the desired font in points, and a font style.

Parameters:
name - the name of the font (must not be null)
height - the font height in points
style - a bit or combination of NORMAL, BOLD, ITALIC
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - when the font name is null
  • ERROR_INVALID_ARGUMENT - if the height is negative

FontData

public FontData(
String string)
Constructs a new FontData given a string representation in the form generated by the FontData.toString method.

Parameters:
string - the string representation of a FontData (must not be null)
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the argument is null
  • ERROR_INVALID_ARGUMENT - if the argument does not represent a valid description
See Also:
toString()
Method Detail

toString

public 
String toString()
Returns a string representation of the receiver which is suitable for constructing an equivalent instance using the FontData(String) constructor.

Returns:
a string representation of the FontData

getHeight

public int getHeight()
Returns the height of the receiver in points.

Returns:
the height of this FontData

getName

public 
String getName()
Returns the name of the receiver.

Returns:
the name of this FontData

getStyle

public int getStyle()
Returns the style of the receiver which is a bitwise OR of one or more of the SWT constants NORMAL, BOLD and ITALIC.

Returns:
the style of this FontData

equals

public boolean equals(
Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.

Parameters:
obj - the object to compare with this object
Returns:
true if the object is the same as this object and false otherwise
See Also:
hashCode()

hashCode

public int hashCode()
Returns an integer hash code for the receiver. Any two objects that return true when passed to equals must return the same value for this method.

Returns:
the receiver's hash
See Also:
equals(java.lang.Object)

Eclipse Rich Ajax Platform
Release 1.2

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire