org.gnu.gtk

Class FontSelection

public class FontSelection extends VBox

A widget that lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the FontSelectionDialog widget to provide a dialog box for selecting fonts.

See Also: FontSelectionDialog

Constructor Summary
FontSelection()
Creates a new font selection widget
FontSelection(Handle handle)
Construct a new FontSelection from a handle to a native resource.
Method Summary
StringgetFont()
Returns the name of the currently selected font.
static FontSelectiongetFontSelection(Handle handle)
Internal static factory method to be used by Java-Gnome only.
StringgetPreviewText()
Returns the text which appears in the preview box.
voidgetPreviewText(String previewText)
Sets the text to appear in the preview box.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidsetFont(String font)
Sets the currently-selected font.

Constructor Detail

FontSelection

public FontSelection()
Creates a new font selection widget

FontSelection

public FontSelection(Handle handle)
Construct a new FontSelection from a handle to a native resource.

Method Detail

getFont

public String getFont()
Returns the name of the currently selected font.

Returns: The name of the selected font.

getFontSelection

public static FontSelection getFontSelection(Handle handle)
Internal static factory method to be used by Java-Gnome only.

getPreviewText

public String getPreviewText()
Returns the text which appears in the preview box.

getPreviewText

public void getPreviewText(String previewText)
Sets the text to appear in the preview box.

Parameters: previewText The text which should appear in the preview box

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.

setFont

public void setFont(String font)
Sets the currently-selected font.

Parameters: font The name of the font to be selected