org.gnu.gtk

Class FontSelectionDialog

public class FontSelectionDialog extends Dialog

The FontSelectionDialog widget is a dialog for selecting a font. Filters can be used to limit the fonts shown. There are 2 filters in the FileSelectionDialog - a base filter and a user filter. The base filter cannot be changed by the user, so this can be used when the user must choose from the restricted set of fonts. The user filter can be changed or reset by the user, using the 'Reset Filter' button or changing the options on the 'Filter' page of the dialog.
Constructor Summary
FontSelectionDialog(String title)
Construct a new FontSelectionDialog object.
FontSelectionDialog(Handle handle)
Construct a FontSelectionDialog using a handle to a native resource.
Method Summary
ButtongetApplyButton()
Return the Apply Button widget for this Dialog.
ButtongetCancelButton()
Return the Cancel Button widget for this dialog.
StringgetFontName()
Gets the currently selected font name.
static FontSelectionDialoggetFontSelectionDialog(Handle handle)
Internal static factory method to be used by Java-Gnome only.
ButtongetOKButton()
Return the OK Button widget for this Dialog.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidsetFontname(String fontName)
Sets the currently selected font.
voidsetPreviewText(String text)
Sets the text displayed in the preview area.

Constructor Detail

FontSelectionDialog

public FontSelectionDialog(String title)
Construct a new FontSelectionDialog object.

Parameters: title The title for the dialog.

FontSelectionDialog

public FontSelectionDialog(Handle handle)
Construct a FontSelectionDialog using a handle to a native resource.

Method Detail

getApplyButton

public Button getApplyButton()
Return the Apply Button widget for this Dialog.

Returns: The Apply Button.

getCancelButton

public Button getCancelButton()
Return the Cancel Button widget for this dialog.

Returns: The Cancel Button.

getFontName

public String getFontName()
Gets the currently selected font name.

Returns: The name of the currently selected font.

getFontSelectionDialog

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

getOKButton

public Button getOKButton()
Return the OK Button widget for this Dialog.

Returns: The OK Button.

getType

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

setFontname

public void setFontname(String fontName)
Sets the currently selected font.

Parameters: fontName The name of the font to set as the currently selected font.

setPreviewText

public void setPreviewText(String text)
Sets the text displayed in the preview area.

Parameters: text The text to display in the preview area.