org.gnu.gtk
Class FontButton

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.Button
                              extended by org.gnu.gtk.FontButton

public class FontButton
extends Button


Constructor Summary
FontButton()
          Construct a new FontButton widget
FontButton(org.gnu.glib.Handle hndl)
           
FontButton(java.lang.String fontName)
          Create a FontButton widget initialized with the provided font.
 
Method Summary
 void addListener(FontButtonListener listener)
          Register an object to handle dialog events.
 java.lang.Class getEventListenerClass(java.lang.String signal)
           
 EventType getEventType(java.lang.String signal)
           
 java.lang.String getFont()
          Returns the name of the currently selected font.
static FontButton getFontButton(org.gnu.glib.Handle handle)
          Internal static factory method to be used by Java-Gnome only.
 boolean getShowSize()
          Returns whether the name of the font style will be shown in the label.
 boolean getShowStyle()
          Returns whether the name of the font style will be shown in the label.
 java.lang.String getTitle()
          Get the title for the font selection dialog.
 boolean getUseFont()
          Returns whether the selected font is used in the label.
 boolean getUseSize()
          Returns whether the selected size is used in the label.
 void removeListener(FontButtonListener listener)
          Removes a listener
 void setFont(java.lang.String fontName)
          Sets or changes the currently selected font.
 void setShowSize(boolean showSize)
          Sets whether the size of the font style will be shown in the label.
 void setShowStyle(boolean showStyle)
          Sets whether the name of the font style will be shown in the label.
 void setTitle(java.lang.String title)
          Set the title for the font selection dialog.
 void setUseFont(boolean useFont)
          Set whether the selected font is used in the label.
 void setUseSize(boolean useSize)
          Set whether the selected size is used in the label.
 
Methods inherited from class org.gnu.gtk.Button
addListener, click, enter, getButton, getFocusOnClick, getImage, getLabel, getRelief, getType, getUseStock, getUseUnderline, getXAlignment, getYAlignment, leave, press, release, removeListener, setAlignment, setFocusOnClick, setImage, setLabel, setRelief, setUseStock, setUseUnderline
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
destroy, sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontButton

public FontButton(org.gnu.glib.Handle hndl)

FontButton

public FontButton()
Construct a new FontButton widget


FontButton

public FontButton(java.lang.String fontName)
Create a FontButton widget initialized with the provided font.

Parameters:
fontName - Name of the font to display in the font selection dialog.
Method Detail

getFontButton

public static FontButton getFontButton(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only.


setTitle

public void setTitle(java.lang.String title)
Set the title for the font selection dialog.

Parameters:
title - The title for the dialog.

getTitle

public java.lang.String getTitle()
Get the title for the font selection dialog.

Returns:
The title for the font selection dialog.

setUseFont

public void setUseFont(boolean useFont)
Set whether the selected font is used in the label.

Parameters:
useFont - If true the font name will be written using the chosen font.

getUseFont

public boolean getUseFont()
Returns whether the selected font is used in the label.

Returns:
true if the selected font is used in the label.

setUseSize

public void setUseSize(boolean useSize)
Set whether the selected size is used in the label.

Parameters:
useSize - If true the font name will be written using the chosen font size.

getUseSize

public boolean getUseSize()
Returns whether the selected size is used in the label.

Returns:
true if the selected size is used in the label.

setShowStyle

public void setShowStyle(boolean showStyle)
Sets whether the name of the font style will be shown in the label.

Parameters:
showStyle -

getShowStyle

public boolean getShowStyle()
Returns whether the name of the font style will be shown in the label.

Returns:
true if the font style will be shown in the label.

setShowSize

public void setShowSize(boolean showSize)
Sets whether the size of the font style will be shown in the label.

Parameters:
showSize -

getShowSize

public boolean getShowSize()
Returns whether the name of the font style will be shown in the label.

Returns:
true if the font style will be shown in the label.

setFont

public void setFont(java.lang.String fontName)
Sets or changes the currently selected font.

Parameters:
fontName - The name of the font to be selected.

getFont

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

Returns:
The name of the currently selected font.

addListener

public void addListener(FontButtonListener listener)
Register an object to handle dialog events.

See Also:
FontButtonListener

removeListener

public void removeListener(FontButtonListener listener)
Removes a listener

See Also:
addListener(FontButtonListener)

getEventListenerClass

public java.lang.Class getEventListenerClass(java.lang.String signal)
Overrides:
getEventListenerClass in class Button

getEventType

public EventType getEventType(java.lang.String signal)
Overrides:
getEventType in class Button