org.gnu.gtk

Class FontSelection

public class FontSelection extends VBox

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.FontSelection. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

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:

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()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new font selection widget

FontSelection

public FontSelection(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Construct a new FontSelection from a handle to a native resource.

Method Detail

getFont

public String getFont()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the name of the currently selected font.

Returns: The name of the selected font.

getFontSelection

public static FontSelection getFontSelection(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Internal static factory method to be used by Java-Gnome only.

getPreviewText

public String getPreviewText()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the text which appears in the preview box.

getPreviewText

public void getPreviewText(String previewText)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

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()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

setFont

public void setFont(String font)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the currently-selected font.

Parameters: font The name of the font to be selected