org.gnu.gtk

Class FontButton


public class FontButton
extends Button

Constructor Summary

FontButton()
Construct a new FontButton widget
FontButton(Handle hndl)
FontButton(String fontName)
Create a FontButton widget initialized with the provided font.

Method Summary

void
addListener(FontButtonListener listener)
Register an object to handle dialog events.
Class
getEventListenerClass(String signal)
EventType
getEventType(String signal)
String
getFont()
Returns the name of the currently selected font.
static FontButton
getFontButton(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.
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(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(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, getEventListenerClass, getEventType, 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, getType

Methods inherited from class org.gnu.gtk.Container

add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, getType, 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, getEventListenerClass, getEventType, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getType, 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, getType, sink

Constructor Details

FontButton

public FontButton()
Construct a new FontButton widget

FontButton

public FontButton(Handle hndl)

FontButton

public FontButton(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 Details

addListener

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

getEventListenerClass

public Class getEventListenerClass(String signal)
Overrides:
getEventListenerClass in interface Button

getEventType

public EventType getEventType(String signal)
Overrides:
getEventType in interface Button

getFont

public String getFont()
Returns the name of the currently selected font.
Returns:
The name of the currently selected font.

getFontButton

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

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.

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.

getTitle

public String getTitle()
Get the title for the font selection dialog.
Returns:
The title for the font selection dialog.

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.

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.

removeListener

public void removeListener(FontButtonListener listener)
Removes a listener

setFont

public void setFont(String fontName)
Sets or changes the currently selected font.
Parameters:
fontName - The name of the font to be selected.

setShowSize

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

setShowStyle

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

setTitle

public void setTitle(String title)
Set the title for the font selection dialog.
Parameters:
title - The title for the 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.

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.