org.gnu.gtk

Class Label

Known Direct Subclasses:
AccelLabel

public class Label
extends Misc

The Label widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a Button, a MenuItem, or a OptionMenu.

Mnemonics

Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing a string with an underscore before the mnemonic character, such as "_File", to the constructor or setText method, with the hadMnemonic parameter true.

Mnemonics automatically activate any activatable widget the label is inside, such as a Button; if the label is not inside the mnemonic's target widget, you have to tell the label about the target using setMnemonicWidget.

Markup (Styled Text)

To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format. Here's how to create a label with a small font:

 label = new Label("");
 label.setMarkup("Small text");
 
(See complete documentation of available tags in the Pango manual.)

The markup passed to setMarkup must be valid; for example, literal </>/& characters must be escaped as &lt;, &gt;, and &amp;. If you pass text obtained from the user, file, or a network to setMarkup, you'll want to escape it with g_markup_escape_text().

Markup strings are just a convenient way to set the PangoAttrList on a label; setAttributes may be a simpler way to set attributes in some cases. Be careful though; PangoAttrList tends to cause internationalization problems, unless you're applying attributes to the entire string . The reason is that specifying the startIndex and endIndex for a PangoAttribute requires knowledge of the exact string being displayed, so translations will cause problems.

Selectable labels

Labels can be made selectable with setSelectable. Selectable labels allow the user to copy the label contents to the clipboard. Only labels that contain useful-to-copy information - such as error messages - should be made selectable.

Text Layout

A label can contain any number of paragraphs, but will have performance problems if it contains more than a small number. Paragraphs are separated by newlines or other paragraph separators understood by Pango.

Labels can automatically wrap text if you call setLineWrap.

setJustify sets how the lines in a label align with one another. If you want to set how the label as a whole aligns in its available space, see gtk.Misc.setAlignment.

Field Summary

Fields inherited from class org.gnu.glib.GObject

eventsInitialized

Constructor Summary

Label(String caption)
Creates a new label widget displaying the given caption.
Label(String caption, boolean hasMnemonic)
Creates a new label widget displaying the given caption.
Label(Handle handle)
Construct a label using a handle to a native resource.

Method Summary

double
getAngle()
Gets the angle of rotation for the label.
AttrList
getAttributes()
Gets the attribute list that was set on the label using setAttributes, if any.
EllipsizeMode
getEllipsize()
Returns the ellipsizing position.
Justification
getJustification()
Returns the justification of the label.
String
getLabel()
Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup.
boolean
getLineWrap()
Returns whether lines in the label are automatically wrapped.
int
getMaxWidthChars()
Retrieves the desired maximum width of label, in characters.
Widget
getMnemonicWidget()
Retrieves the target of the mnemonic (keyboard shortcut) of this label
boolean
getSelectable()
Gets the value set by setSelectable.
boolean
getSelected()
Returns true if any part of the label is selected
int
getSelectionEnd()
Returns the index of the end of the selected test.
int
getSelectionStart()
Returns the index of the start of the selected text.
boolean
getSingleLineMode()
Returns whether the label is in single line mode.
String
getText()
Returns the text which is being displayed on this label.
static Type
getType()
Retrieve the runtime type used by the GLib library.
boolean
getUseMarkup()
Returns whether the label's text is interpreted as marked up with the Pango text markup language.
boolean
getUseMnemonic()
Returns whether an embedded underline in the label indicates a mnemonic.
int
getWidthChars()
Retrieves the desired width of label, in characters.
protected static Handle
gtk_label_get_attributes(Handle label)
protected static int
gtk_label_get_justify(Handle label)
protected static String
gtk_label_get_label(Handle label)
protected static Handle
gtk_label_get_layout(Handle label)
protected static void
gtk_label_get_layout_offsets(int label, int[] x, int[] y)
protected static boolean
gtk_label_get_line_wrap(Handle label)
protected static int
gtk_label_get_mnemonic_keyval(Handle label)
protected static Handle
gtk_label_get_mnemonic_widget(Handle label)
protected static boolean
gtk_label_get_selectable(Handle label)
protected static boolean
gtk_label_get_selection_bounds(Handle label, int[] start, int[] end)
protected static String
gtk_label_get_text(Handle label)
protected static int
gtk_label_get_type()
protected static boolean
gtk_label_get_use_markup(Handle label)
protected static boolean
gtk_label_get_use_underline(Handle label)
protected static Handle
gtk_label_new(String str)
protected static Handle
gtk_label_new_with_mnemonic(String str)
protected static void
gtk_label_select_region(Handle label, int startOffset, int endOffset)
protected static void
gtk_label_set_attributes(Handle label, Handle attrs)
protected static void
gtk_label_set_justify(Handle label, int jtype)
protected static void
gtk_label_set_label(Handle label, String str)
protected static void
gtk_label_set_line_wrap(Handle label, boolean wrap)
protected static void
gtk_label_set_markup(Handle label, String str)
protected static void
gtk_label_set_markup_with_mnemonic(Handle label, String str)
protected static void
gtk_label_set_mnemonic_widget(Handle label, Handle widget)
protected static void
gtk_label_set_pattern(Handle label, String pattern)
protected static void
gtk_label_set_selectable(Handle label, boolean setting)
protected static void
gtk_label_set_text(Handle label, String str)
protected static void
gtk_label_set_text_with_mnemonic(Handle label, String str)
protected static void
gtk_label_set_use_markup(Handle label, boolean setting)
protected static void
gtk_label_set_use_underline(Handle label, boolean setting)
void
select(int startOffset, int endOffset)
Selects a range of characters in the label, if the label is selectable.
void
setAngle(double angle)
Sets the angle of rotation for the label.
void
setAttributes(AttrList attributes)
Sets a PangoAttrList; the attributes in the list are applied to the label text.
void
setEllipsize(EllipsizeMode mode)
Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string.
void
setJustification(Justification justification)
Sets the alignment of the lines in the text of the label relative to each other.
void
setLabel(String label)
Sets the text of the label.
void
setLineWrap(boolean wrap)
Toggles line wrapping within the Label widget.
void
setMarkup(String markup)
Parses markup which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results.
void
setMarkup(String markup, boolean hasMnemonic)
Parses markup which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results.
void
setMaxWidthChars(int chars)
Sets the desired maximum width in characters to chars.
void
setMnemonicWidget(Widget widget)
If the label has been set so that it has an mnemonic key, the label can be associated with a widget that is the target of the mnemonic.
void
setSelectable(boolean setting)
Selectable labels allow the user to select text from the label, for copy-and-paste.
void
setSingleLineMode(boolean singleLineMode)
Sets whether the label is in single line mode.
void
setText(String caption)
Changes the text to be displayed in the label widget.
void
setUnderlinePattern(String pattern)
The pattern of underlines you want under the existing text within the Label widget.
void
setUseMarkup(boolean setting)
Sets whether the text of the label contains markup in Pango's text markup language.
void
setUseMnemonic(boolean setting)
If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
void
setWidthChars(int chars)
Sets the desired width in characters of label to chars.

Methods inherited from class org.gnu.gtk.Misc

getType, getXAlign, getXPadding, getYAlign, getYPadding, gtk_misc_get_alignment, gtk_misc_get_padding, gtk_misc_get_type, gtk_misc_set_alignment, gtk_misc_set_padding, setAlignment, setPadding

Methods inherited from class org.gnu.gtk.Widget

activate, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, destroy, draw, drawArea, drawArea, findListener, finish, fireBooleanLifeCycleEvent, fireDragDestinationEvent, fireDragSourceEvent, fireExposeEvent, fireFocusEvent, fireKeyEvent, fireLifeCycleEvent, fireMouseEvent, fireMouseMotionEvent, getAccessible, getColormap, getContext, getData, getDisplay, getEventListenerClass, getEventType, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getType, getWindow, grabDefault, grabFocus, gtk_drag_dest_set, gtk_drag_dest_unset, gtk_drag_finish, gtk_drag_get_data, gtk_drag_highlight, gtk_drag_source_set, gtk_drag_source_set_icon, gtk_drag_source_set_icon_pixbuf, gtk_drag_source_set_icon_stock, gtk_drag_source_unset, gtk_drag_unhighlight, gtk_widget_activate, gtk_widget_add_accelerator, gtk_widget_add_events, gtk_widget_add_mnemonic_label, gtk_widget_can_activate_accel, gtk_widget_child_focus, gtk_widget_child_notify, gtk_widget_class_path, gtk_widget_create_pango_context, gtk_widget_create_pango_layout, gtk_widget_destroy, gtk_widget_destroyed, gtk_widget_ensure_style, gtk_widget_event, gtk_widget_freeze_child_notify, gtk_widget_get_accessible, gtk_widget_get_ancestor, gtk_widget_get_child_requisition, gtk_widget_get_child_visible, gtk_widget_get_colormap, gtk_widget_get_composite_name, gtk_widget_get_default_colormap, gtk_widget_get_default_direction, gtk_widget_get_default_style, gtk_widget_get_default_visual, gtk_widget_get_direction, gtk_widget_get_display, gtk_widget_get_events, gtk_widget_get_extension_events, gtk_widget_get_modifier_style, gtk_widget_get_name, gtk_widget_get_pango_context, gtk_widget_get_parent, gtk_widget_get_parent_window, gtk_widget_get_pointer, gtk_widget_get_root_window, gtk_widget_get_screen, gtk_widget_get_sensitive, gtk_widget_get_settings, gtk_widget_get_size_request, gtk_widget_get_style, gtk_widget_get_toplevel, gtk_widget_get_type, gtk_widget_get_visual, gtk_widget_get_window, gtk_widget_grab_default, gtk_widget_grab_focus, gtk_widget_has_screen, gtk_widget_hide, gtk_widget_hide_all, gtk_widget_hide_on_delete, gtk_widget_intersect, gtk_widget_is_ancestor, gtk_widget_is_focus, gtk_widget_list_accel_closures, gtk_widget_list_mnemonic_labels, gtk_widget_map, gtk_widget_mnemonic_activate, gtk_widget_modify_base, gtk_widget_modify_bg, gtk_widget_modify_fg, gtk_widget_modify_font, gtk_widget_modify_style, gtk_widget_modify_text, gtk_widget_path, gtk_widget_pop_colormap, gtk_widget_pop_composite_child, gtk_widget_push_colormap, gtk_widget_push_composite_child, gtk_widget_queue_draw, gtk_widget_queue_draw_area, gtk_widget_queue_resize, gtk_widget_realize, gtk_widget_ref, gtk_widget_region_intersect, gtk_widget_remove_accelerator, gtk_widget_remove_mnemonic_label, gtk_widget_render_icon, gtk_widget_reparent, gtk_widget_reset_rc_styles, gtk_widget_send_expose, gtk_widget_set_accel_path, gtk_widget_set_app_paintable, gtk_widget_set_child_visible, gtk_widget_set_colormap, gtk_widget_set_composite_name, gtk_widget_set_default_colormap, gtk_widget_set_default_direction, gtk_widget_set_direction, gtk_widget_set_double_buffered, gtk_widget_set_events, gtk_widget_set_extension_events, gtk_widget_set_name, gtk_widget_set_parent, gtk_widget_set_parent_window, gtk_widget_set_redraw_on_allocate, gtk_widget_set_scroll_adjustments, gtk_widget_set_sensitive, gtk_widget_set_size_request, gtk_widget_set_state, gtk_widget_set_style, gtk_widget_shape_combine_mask, gtk_widget_show, gtk_widget_show_all, gtk_widget_show_now, gtk_widget_size_allocate, gtk_widget_size_request, gtk_widget_style_get_property, gtk_widget_thaw_child_notify, gtk_widget_translate_coordinates, gtk_widget_unmap, gtk_widget_unparent, gtk_widget_unrealize, gtk_widget_unref, handleButtonPressed, handleButtonReleased, handleDelete, handleDragDataGet, handleDragDestination, handleExpose, handleFocusIn, handleFocusOut, handleHide, handleKeyPressed, handleKeyReleased, handleMap, handleMouseEnter, handleMouseLeave, handleMouseMotion, handleNoExpose, handleRealize, handleScroll, handleShow, handleUnmap, hasFocus, hasScreen, hide, hideAll, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight

Methods inherited from class org.gnu.gtk.GtkObject

destroy, getFlags, getType, gtk_object_destroy, gtk_object_get_type, gtk_object_sink, setFlags, sink

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hasProperty, hashCode, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

Label

public Label(String caption)
Creates a new label widget displaying the given caption. Mnemonic characters are not interpreted if this constructor is used.

Parameters:
caption - The default text to be displayed on the label


Label

public Label(String caption,
             boolean hasMnemonic)
Creates a new label widget displaying the given caption.

Parameters:
caption - The default text to be displayed on the label
hasMnemonic - If true, the caption is interpreted to have mnemonic characters. See the description for this class for more details.


Label

public Label(Handle handle)
Construct a label using a handle to a native resource.

Method Details

getAngle

public double getAngle()
Gets the angle of rotation for the label.

Returns:
the angle of rotation for the label

Since:
2.6

See Also:
setAngle(double)


getAttributes

public AttrList getAttributes()
Gets the attribute list that was set on the label using setAttributes, if any. This function does not reflect attributes that come from the labels markup (see setMarkup). If you want to get the effective attributes for the label, use pango.layout.getAttribute

Returns:
the Pango Attributes list


getEllipsize

public EllipsizeMode getEllipsize()
Returns the ellipsizing position.

Since:
2.6


getJustification

public Justification getJustification()
Returns the justification of the label.

Returns:
the justification of the label

See Also:
setJustification(Justification)


getLabel

public String getLabel()
Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup.

Returns:
The entrie text of the label.


getLineWrap

public boolean getLineWrap()
Returns whether lines in the label are automatically wrapped.

Returns:
True if lines are automatically wrapped


getMaxWidthChars

public int getMaxWidthChars()
Retrieves the desired maximum width of label, in characters.

Returns:
the maximum width of the label in characters.

Since:
2.6

See Also:
setMaxWidthChars(int)


getMnemonicWidget

public Widget getMnemonicWidget()
Retrieves the target of the mnemonic (keyboard shortcut) of this label

Returns:
Target Widget


getSelectable

public boolean getSelectable()
Gets the value set by setSelectable.

Returns:
TRUE if the user can copy text from the label.


getSelected

public boolean getSelected()
Returns true if any part of the label is selected


getSelectionEnd

public int getSelectionEnd()
Returns the index of the end of the selected test. If no text is selected, this returns -1.


getSelectionStart

public int getSelectionStart()
Returns the index of the start of the selected text. If the text is not selected, this returns -1;


getSingleLineMode

public boolean getSingleLineMode()
Returns whether the label is in single line mode.

Returns:
true when the label is in single line mode.

Since:
2.6


getText

public String getText()
Returns the text which is being displayed on this label.

Returns:
the text which is being displayed.


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.
Overrides:
getType in interface Misc


getUseMarkup

public boolean getUseMarkup()
Returns whether the label's text is interpreted as marked up with the Pango text markup language.

Returns:
TRUE if the label's text will be parsed for markup.

See Also:
setUseMarkup(boolean)


getUseMnemonic

public boolean getUseMnemonic()
Returns whether an embedded underline in the label indicates a mnemonic.

Returns:
Whether an embedded underline in the label indicates the mnemonic accelerator keys.

See Also:
setUseMnemonic(boolean)


getWidthChars

public int getWidthChars()
Retrieves the desired width of label, in characters.

Returns:
the width of the label in characters.

Since:
2.6

See Also:
setWidthChars(int)


gtk_label_get_attributes

protected static final Handle gtk_label_get_attributes(Handle label)


gtk_label_get_justify

protected static final int gtk_label_get_justify(Handle label)


gtk_label_get_label

protected static final String gtk_label_get_label(Handle label)


gtk_label_get_layout

protected static final Handle gtk_label_get_layout(Handle label)


gtk_label_get_layout_offsets

protected static final void gtk_label_get_layout_offsets(int label,
                                                         int[] x,
                                                         int[] y)


gtk_label_get_line_wrap

protected static final boolean gtk_label_get_line_wrap(Handle label)


gtk_label_get_mnemonic_keyval

protected static final int gtk_label_get_mnemonic_keyval(Handle label)


gtk_label_get_mnemonic_widget

protected static final Handle gtk_label_get_mnemonic_widget(Handle label)


gtk_label_get_selectable

protected static final boolean gtk_label_get_selectable(Handle label)


gtk_label_get_selection_bounds

protected static final boolean gtk_label_get_selection_bounds(Handle label,
                                                              int[] start,
                                                              int[] end)


gtk_label_get_text

protected static final String gtk_label_get_text(Handle label)


gtk_label_get_type

protected static final int gtk_label_get_type()


gtk_label_get_use_markup

protected static final boolean gtk_label_get_use_markup(Handle label)


gtk_label_get_use_underline

protected static final boolean gtk_label_get_use_underline(Handle label)


gtk_label_new

protected static final Handle gtk_label_new(String str)


gtk_label_new_with_mnemonic

protected static final Handle gtk_label_new_with_mnemonic(String str)


gtk_label_select_region

protected static final void gtk_label_select_region(Handle label,
                                                    int startOffset,
                                                    int endOffset)


gtk_label_set_attributes

protected static final void gtk_label_set_attributes(Handle label,
                                                     Handle attrs)


gtk_label_set_justify

protected static final void gtk_label_set_justify(Handle label,
                                                  int jtype)


gtk_label_set_label

protected static final void gtk_label_set_label(Handle label,
                                                String str)


gtk_label_set_line_wrap

protected static final void gtk_label_set_line_wrap(Handle label,
                                                    boolean wrap)


gtk_label_set_markup

protected static final void gtk_label_set_markup(Handle label,
                                                 String str)


gtk_label_set_markup_with_mnemonic

protected static final void gtk_label_set_markup_with_mnemonic(Handle label,
                                                               String str)


gtk_label_set_mnemonic_widget

protected static final void gtk_label_set_mnemonic_widget(Handle label,
                                                          Handle widget)


gtk_label_set_pattern

protected static final void gtk_label_set_pattern(Handle label,
                                                  String pattern)


gtk_label_set_selectable

protected static final void gtk_label_set_selectable(Handle label,
                                                     boolean setting)


gtk_label_set_text

protected static final void gtk_label_set_text(Handle label,
                                               String str)


gtk_label_set_text_with_mnemonic

protected static final void gtk_label_set_text_with_mnemonic(Handle label,
                                                             String str)


gtk_label_set_use_markup

protected static final void gtk_label_set_use_markup(Handle label,
                                                     boolean setting)


gtk_label_set_use_underline

protected static final void gtk_label_set_use_underline(Handle label,
                                                        boolean setting)


select

public void select(int startOffset,
                   int endOffset)
Selects a range of characters in the label, if the label is selectable. If the label is not selectable, this function has no effect. If startOffset or endOffset are -1, then the end of the label will be substituted.

Parameters:
startOffset - The start offset in characters
endOffset - The end offset in characters

See Also:
setSelectable(boolean)


setAngle

public void setAngle(double angle)
Sets the angle of rotation for the label. An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom. The angle setting for the label is ignored if the label is selectable, wrapped, or ellipsized.

Parameters:
angle - the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise

Since:
2.6


setAttributes

public void setAttributes(AttrList attributes)
Sets a PangoAttrList; the attributes in the list are applied to the label text. The attributes set with this function will be ignored if Mnemonics or markup are being used.

Parameters:
attributes - Pange attrlist attributes to use

See Also:
AttrList


setEllipsize

public void setEllipsize(EllipsizeMode mode)
Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string.

Since:
2.6


setJustification

public void setJustification(Justification justification)
Sets the alignment of the lines in the text of the label relative to each other. Justification.LEFT is the default value when the widget is first created. If you instead want to set the alignment of the label as a whole, use Misc.setAlignment instead. setJustify has no effect on labels containing only a single line.


setLabel

public void setLabel(String label)
Sets the text of the label.

Parameters:
label - The new text to set for the label


setLineWrap

public void setLineWrap(boolean wrap)
Toggles line wrapping within the Label widget. TRUE makes it break lines if text exceeds the widget's size. FALSE lets the text get cut off by the edge of the widget if it exceeds the widget size.

Parameters:
wrap - New line wrap setting.


setMarkup

public void setMarkup(String markup)
Parses markup which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results. The markup should not contain mnemonic characters if this method is used.

Parameters:
markup - String containg pango markup


setMarkup

public void setMarkup(String markup,
                      boolean hasMnemonic)
Parses markup which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results.

Parameters:
markup - String containg pango markup
hasMnemonic - If True, the markup string will be interpreted to contain mnemonic characters, for use as keyboard accelerators


setMaxWidthChars

public void setMaxWidthChars(int chars)
Sets the desired maximum width in characters to chars.

Parameters:
chars - the new desired maximum width, in characters.

Since:
2.6


setMnemonicWidget

public void setMnemonicWidget(Widget widget)
If the label has been set so that it has an mnemonic key, the label can be associated with a widget that is the target of the mnemonic. When the label is inside a widget (like a Button or a Notebook tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is an Entry next to the label) you need to set it explicitly using this function.

The target widget will be accelerated by emitting "mnemonic_activate" on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise.

Parameters:
widget - The target widget


setSelectable

public void setSelectable(boolean setting)
Selectable labels allow the user to select text from the label, for copy-and-paste.

Parameters:
setting - TRUE to allow selecting text in the label


setSingleLineMode

public void setSingleLineMode(boolean singleLineMode)
Sets whether the label is in single line mode.

Parameters:
singleLineMode - true if the label should be in single line mode

Since:
2.6


setText

public void setText(String caption)
Changes the text to be displayed in the label widget.

Parameters:
caption - the new text to be displayed.


setUnderlinePattern

public void setUnderlinePattern(String pattern)
The pattern of underlines you want under the existing text within the Label widget. For example if the current text of the label says "FooBarBaz" passing a pattern of "___ ___" will underline "Foo" and "Baz" but not "Bar".

Parameters:
pattern - The pattern as described above.


setUseMarkup

public void setUseMarkup(boolean setting)
Sets whether the text of the label contains markup in Pango's text markup language.

Parameters:
setting - TRUE if the label's text should be parsed for markup.

See Also:
setMarkup(String,boolean)


setUseMnemonic

public void setUseMnemonic(boolean setting)
If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key.

Parameters:
setting - TRUE if underlines in the text indicate mnemonics


setWidthChars

public void setWidthChars(int chars)
Sets the desired width in characters of label to chars.

Parameters:
chars - the new desired width, in characters.

Since:
2.6