|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.graphics.FontData
Safe:
Field Summary | |
(package private) String |
country
The locales of the font (Warning: These fields are platform dependent) |
org.eclipse.swt.internal.win32.LOGFONT |
data
Suppressed: A Win32 LOGFONT struct (Warning: This field is platform dependent) |
int |
height
Suppressed: The height of the font data in points (Warning: This field is platform dependent) |
(package private) String |
lang
The locales of the font (Warning: These fields are platform dependent) |
(package private) String |
variant
The locales of the font (Warning: These fields are platform dependent) |
Constructor Summary | |
|
FontData()
Enabled: Constructs a new un-initialized font data. |
(package private) |
FontData(org.eclipse.swt.internal.win32.LOGFONT data,
int height)
Constructs a new font data given the Windows LOGFONT
that it should represent. |
|
FontData(String string)
Enabled: Constructs a new FontData given a string representation in the form generated by the FontData.toString
method. |
|
FontData(String name,
int height,
int style)
Enabled: Constructs a new font data given a font name, the height of the desired font in points, and a font style. |
Method Summary | |
(package private) int |
EnumLocalesProc(int lpLocaleString)
|
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. |
int |
getHeight()
Enabled: Returns the height of the receiver in points. |
String |
getName()
Enabled: Returns the name of the receiver. |
int |
getStyle()
Enabled: 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()
Suppressed: Returns an integer hash code for the receiver. |
void |
setHeight(int height)
Enabled: Sets the height of the receiver. |
void |
setLocale(String locale)
Enabled: Sets the locale of the receiver. |
void |
setName(String name)
Enabled: Sets the name of the receiver. |
void |
setStyle(int style)
Enabled: Sets the style of the receiver to the argument which must be a bitwise OR of one or more of the SWT
constants NORMAL, BOLD and ITALIC. |
String |
toString()
Suppressed: Returns a string representation of the receiver which is suitable for constructing an equivalent instance using the FontData(String) constructor. |
static FontData |
win32_new(org.eclipse.swt.internal.win32.LOGFONT data,
int height)
Suppressed: Invokes platform specific functionality to allocate a new font data. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public org.eclipse.swt.internal.win32.LOGFONT data
public int height
String lang
String country
String variant
Constructor Detail |
public FontData()
FontData(org.eclipse.swt.internal.win32.LOGFONT data, int height)
LOGFONT
that it should represent.
data
- the LOGFONT
for the resultpublic FontData(String string)
FontData.toString
method.
Note that the representation varies between platforms, and a FontData can only be created from a string that was generated on the same platform.
string
- the string representation of a FontData
(must not be null)toString()
public FontData(String name, int height, int style)
name
- 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 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()
int EnumLocalesProc(int lpLocaleString)
public int getHeight()
setHeight(int)
public String getName()
FontData
setName(java.lang.String)
public int getStyle()
SWT
constants NORMAL, BOLD
and ITALIC.
FontData
setStyle(int)
public int hashCode()
true
when passed to
equals
must return the same value for this
method.
hashCode
in class Object
equals(java.lang.Object)
public void setHeight(int height)
height
- the height of the FontData
getHeight()
public void setLocale(String locale)
The locale determines which platform character set this font is going to use. Widgets and graphics operations that use this font will convert UNICODE strings to the platform character set of the specified locale.
On platforms which there are multiple character sets for a given language/country locale, the variant portion of the locale will determine the character set.
locale
- the String
representing a Locale objectjava.util.Locale#toString
public void setName(String name)
Some platforms support font foundries. On these platforms, the name of the font specified in setName() may have one of the following forms:
On platforms that do not support font foundries, only the face name
(for example, "courier") is used in setName()
and
getName()
.
name
- the name of the font data (must not be null)getName()
public void setStyle(int style)
SWT
constants NORMAL, BOLD and ITALIC.
style
- the new style for this FontData
getStyle()
public String toString()
FontData(String)
constructor.
toString
in class Object
FontData
public static FontData win32_new(org.eclipse.swt.internal.win32.LOGFONT data, int height)
IMPORTANT: This method is not part of the public
API for FontData
. 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.
data
- the LOGFONT
for the font data
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |