org.gnu.gtk

Class FontButton

public class FontButton extends Button

Constructor Summary
FontButton(Handle hndl)
FontButton()
Construct a new FontButton widget
FontButton(String fontName)
Create a FontButton widget initialized with the provided font.
Method Summary
voidaddListener(FontButtonListener listener)
Register an object to handle dialog events.
ClassgetEventListenerClass(String signal)
EventTypegetEventType(String signal)
StringgetFont()
Returns the name of the currently selected font.
static FontButtongetFontButton(Handle handle)
Internal static factory method to be used by Java-Gnome only.
booleangetShowSize()
Returns whether the name of the font style will be shown in the label.
booleangetShowStyle()
Returns whether the name of the font style will be shown in the label.
StringgetTitle()
Get the title for the font selection dialog.
booleangetUseFont()
Returns whether the selected font is used in the label.
booleangetUseSize()
Returns whether the selected size is used in the label.
voidremoveListener(FontButtonListener listener)
Removes a listener
voidsetFont(String fontName)
Sets or changes the currently selected font.
voidsetShowSize(boolean showSize)
Sets whether the size of the font style will be shown in the label.
voidsetShowStyle(boolean showStyle)
Sets whether the name of the font style will be shown in the label.
voidsetTitle(String title)
Set the title for the font selection dialog.
voidsetUseFont(boolean useFont)
Set whether the selected font is used in the label.
voidsetUseSize(boolean useSize)
Set whether the selected size is used in the label.

Constructor Detail

FontButton

public FontButton(Handle hndl)

FontButton

public FontButton()
Construct a new FontButton widget

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 Detail

addListener

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

See Also: FontButtonListener

getEventListenerClass

public Class getEventListenerClass(String signal)

getEventType

public EventType getEventType(String signal)

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

See Also: addListener

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.