org.gnu.gnome

Class FontPicker


public class FontPicker
extends Button

The FontPicker widget is a button that, when selected, presents a window that enables the user to select from among the many available fonts.

Constructor Summary

FontPicker()
Creates a new font picker.
FontPicker(Handle handle)
Construct a FontPicker using a handle to a native resource.

Method Summary

void
addListener(FontPickerListener listener)
Register an object to handle FontPicker events.
void
enableFontPreview(boolean enable, int size)
Enables/Disables thre rendering of the font's name in its font.
void
enableSize(boolean showSize)
Enable/Disable the display of font sizes.
protected void
fireFontPickerEvent(FontPickerEvent event)
Class
getEventListenerClass(String signal)
EventType
getEventType(String signal)
String
getFontName()
Get the name of the selected font.
FontPickerMode
getMode()
Get the mode.
String
getPreviewText()
Get the text showen in the preview.
String
getTitle()
Get the title of the dialog.
static Type
getType()
Retrieve the runtime type used by the GLib library.
Widget
getUserWidget()
Get the user defined widget.
protected static void
gnome_font_picker_fi_set_show_size(Handle gfp, boolean showSize)
protected static void
gnome_font_picker_fi_set_use_font_in_label(Handle gfp, boolean use_font_in_label, int size)
protected static String
gnome_font_picker_get_font_name(Handle gfp)
protected static int
gnome_font_picker_get_mode(Handle gfp)
protected static String
gnome_font_picker_get_preview_text(Handle gfp)
protected static String
gnome_font_picker_get_title(Handle gfp)
protected static int
gnome_font_picker_get_type()
protected static Handle
gnome_font_picker_new()
protected static boolean
gnome_font_picker_set_font_name(Handle gfp, String fontname)
protected static void
gnome_font_picker_set_mode(Handle gfp, int mode)
protected static void
gnome_font_picker_set_preview_text(Handle gfp, String text)
protected static void
gnome_font_picker_set_title(Handle gfp, String title)
protected static Handle
gnome_font_picker_uw_get_widget(Handle gfp)
protected static void
gnome_font_picker_uw_set_widget(Handle gfp, Handle widget)
void
removeListener(FontPickerListener listener)
Removes a listener
void
setFontName(String fontName)
Set the name of the font to be selected.
void
setMode(FontPickerMode mode)
Set the mode.
void
setPreviewText(String text)
Set the text to show in the preview.
void
setTitle(String title)
Set the title of the dialog.
void
setUserWidget(Widget widget)
Set the user defined widget.

Constructor Details

FontPicker

public FontPicker()
Creates a new font picker.


FontPicker

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

Method Details

addListener

public void addListener(FontPickerListener listener)
Register an object to handle FontPicker events.

See Also:
FontPickerListener


enableFontPreview

public void enableFontPreview(boolean enable,
                              int size)
Enables/Disables thre rendering of the font's name in its font.

Parameters:
enable - True if the font name should be rendered in its font. False otherwise.
size - The font size to use when rendering the font names.


enableSize

public void enableSize(boolean showSize)
Enable/Disable the display of font sizes.

Parameters:
showSize - True if font sizes should be shown. False otherwise.


fireFontPickerEvent

protected void fireFontPickerEvent(FontPickerEvent event)


getEventListenerClass

public Class getEventListenerClass(String signal)


getEventType

public EventType getEventType(String signal)


getFontName

public String getFontName()
Get the name of the selected font.

Returns:
The name of the selected font.


getMode

public FontPickerMode getMode()
Get the mode.

Returns:
The mode.


getPreviewText

public String getPreviewText()
Get the text showen in the preview.

Returns:
The text in the preview.


getTitle

public String getTitle()
Get the title of the dialog.

Returns:
The title.


getType

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


getUserWidget

public Widget getUserWidget()
Get the user defined widget. For use with USER_WIDGET mode.

Returns:
The widget.

See Also:
getMode(), setMode(FontPickerMode)


gnome_font_picker_fi_set_show_size

protected static final void gnome_font_picker_fi_set_show_size(Handle gfp,
                                                               boolean showSize)


gnome_font_picker_fi_set_use_font_in_label

protected static final void gnome_font_picker_fi_set_use_font_in_label(Handle gfp,
                                                                       boolean use_font_in_label,
                                                                       int size)


gnome_font_picker_get_font_name

protected static final String gnome_font_picker_get_font_name(Handle gfp)


gnome_font_picker_get_mode

protected static final int gnome_font_picker_get_mode(Handle gfp)


gnome_font_picker_get_preview_text

protected static final String gnome_font_picker_get_preview_text(Handle gfp)


gnome_font_picker_get_title

protected static final String gnome_font_picker_get_title(Handle gfp)


gnome_font_picker_get_type

protected static final int gnome_font_picker_get_type()


gnome_font_picker_new

protected static final Handle gnome_font_picker_new()


gnome_font_picker_set_font_name

protected static final boolean gnome_font_picker_set_font_name(Handle gfp,
                                                               String fontname)


gnome_font_picker_set_mode

protected static final void gnome_font_picker_set_mode(Handle gfp,
                                                       int mode)


gnome_font_picker_set_preview_text

protected static final void gnome_font_picker_set_preview_text(Handle gfp,
                                                               String text)


gnome_font_picker_set_title

protected static final void gnome_font_picker_set_title(Handle gfp,
                                                        String title)


gnome_font_picker_uw_get_widget

protected static final Handle gnome_font_picker_uw_get_widget(Handle gfp)


gnome_font_picker_uw_set_widget

protected static final void gnome_font_picker_uw_set_widget(Handle gfp,
                                                            Handle widget)


removeListener

public void removeListener(FontPickerListener listener)
Removes a listener

See Also:
addListener(FontPickerListener)


setFontName

public void setFontName(String fontName)
Set the name of the font to be selected. (Select the specified font)

Parameters:
fontName - The name of the font to select.


setMode

public void setMode(FontPickerMode mode)
Set the mode.

Parameters:
mode - The mode.


setPreviewText

public void setPreviewText(String text)
Set the text to show in the preview.

Parameters:
text - The text to preview.


setTitle

public void setTitle(String title)
Set the title of the dialog.

Parameters:
title - The title.


setUserWidget

public void setUserWidget(Widget widget)
Set the user defined widget. For use with USER_WIDGET mode.

Parameters:
widget - The widget.

See Also:
getMode(), setMode(FontPickerMode)