org.gnu.gtk
Class FontSelection

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gtk.GtkObject
              |
              +--org.gnu.gtk.Widget
                    |
                    +--org.gnu.gtk.Container
                          |
                          +--org.gnu.gtk.Box
                                |
                                +--org.gnu.gtk.VBox
                                      |
                                      +--org.gnu.gtk.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(int handle)
          Construct a new FontSelection from a handle to a native resource.
 
Method Summary
 java.lang.String getFont()
          Returns the name of the currently selected font.
 java.lang.String getPreviewText()
          Returns the text which appears in the preview box.
 void getPreviewText(java.lang.String previewText)
          Sets the text to appear in the preview box.
static Type getType()
          Retrieve the runtime type used by the GLib library.
 void setFont(java.lang.String font)
          Sets the currently-selected font.
 
Methods inherited from class org.gnu.gtk.Box
getHomogeneous, getSpacing, packEnd, packEnd, packStart, packStart, reorderChild, setHomogeneous, setSpacing
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getEventListenerClass, getEventType, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, createContext, createLayout, destroy, draw, drawArea, drawArea, getAccessible, getColormap, getContext, getModifierStyle, getName, getParent, getParentWindow, getPointer, getSensitive, getStyle, getToplevel, grabDefault, grabFocus, hasFocus, hide, hideAll, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontSelection

public FontSelection()
Creates a new font selection widget


FontSelection

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

Method Detail

setFont

public void setFont(java.lang.String font)
             throws org.gnu.gtk.FontSelection.FontNotFoundException
Sets the currently-selected font.

Parameters:
font - The name of the font to be selected
org.gnu.gtk.FontSelection.FontNotFoundException

getFont

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

Returns:
The name of the selected font.

getPreviewText

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


getPreviewText

public void getPreviewText(java.lang.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.


Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net