A container which can hide its child.
An Expander allows the user to hide or show its child by clicking on an expander
triangle similar to the triangles used in a
TreeView
.
fireExpanderEvent
protected void fireExpanderEvent(ExpanderEvent event)
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface Container
getEventType
public EventType getEventType(String signal)
- getEventType in interface Container
getExpanded
public boolean getExpanded()
Queries an Expander and returns its current state. Returns TRUE
if the child widget is revealed.
- the current state of the expander
getExpanded()
getLabel
public String getLabel()
Fetches the text from the label of the Expander, as set by
setLabel(String)
.
If the label text has not been set the return value will be
NULL
.
This will be the case if you create an empty button with
Button.Button()
to use as a container.
- the text of the label widget
getLabelWidget
public Widget getLabelWidget()
Retrieves the label widget for the frame.
- the label widget, or
NULL
if there is none
setLabelWidget(Widget)
getSpacing
public int getSpacing()
- spacing between the expander and child in pixels
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Bin
getUseMarkup
public boolean getUseMarkup()
Returns whether the label's text is interpreted as marked up with the Pango
text markup language.
TRUE
if the label's text will be parsed for markup
setUseMarkup(boolean)
getUseUnderline
public boolean getUseUnderline()
Returns whether an embedded underline in the Expander label indicates a mnemonic.
TRUE
if an embedded underline in the Expander label indicates the mnemonic accelerator keys.
setUseUnderline(boolean)
gtk_expander_get_expanded
protected static final boolean gtk_expander_get_expanded(Handle expander)
gtk_expander_get_label
protected static final String gtk_expander_get_label(Handle expander)
gtk_expander_get_label_widget
protected static final Handle gtk_expander_get_label_widget(Handle expander)
gtk_expander_get_spacing
protected static final int gtk_expander_get_spacing(Handle expander)
gtk_expander_get_type
protected static final int gtk_expander_get_type()
gtk_expander_get_use_markup
protected static final boolean gtk_expander_get_use_markup(Handle expander)
gtk_expander_get_use_underline
protected static final boolean gtk_expander_get_use_underline(Handle expander)
gtk_expander_new
protected static final Handle gtk_expander_new(String label)
gtk_expander_new_with_mnemonic
protected static final Handle gtk_expander_new_with_mnemonic(String label)
gtk_expander_set_expanded
protected static final void gtk_expander_set_expanded(Handle expander,
boolean expanded)
gtk_expander_set_label
protected static final void gtk_expander_set_label(Handle expander,
String label)
gtk_expander_set_label_widget
protected static final void gtk_expander_set_label_widget(Handle expander,
Handle label)
gtk_expander_set_spacing
protected static final void gtk_expander_set_spacing(Handle expander,
int spacing)
gtk_expander_set_use_markup
protected static final void gtk_expander_set_use_markup(Handle expander,
boolean useMarkup)
gtk_expander_set_use_underline
protected static final void gtk_expander_set_use_underline(Handle expander,
boolean useUnderline)
setExpanded
public void setExpanded(boolean expanded)
Sets the state of the expander. Set to TRUE
, if you want the
child widget to be revealed, and FALSE
if you want the child
widget to be hidden.
expanded
- whether the child widget is revealed
setLabel
public void setLabel(String label)
Sets the text of the label of the expander to label
.
This will also clear any previously set labels.
label
- a string
setLabelWidget
public void setLabelWidget(Widget label)
Set the label widget for the Expander. This is the widget that will appear
embedded alongside the Expander arrow.
label
- the new label widget
setSpacing
public void setSpacing(int spacing)
Sets the spacing field of Expander, which is the number of pixels to place
between Expander and the child.
spacing
- distance between the Expander and child in pixels
setUseMarkup
public void setUseMarkup(boolean useMarkup)
Sets whether the text of the label contains markup in Pango's text markup
language.
useMarkup
- TRUE
if the label's text should be parsed for markup
Label.setMarkup(String)
setUseUnderline
public void setUseUnderline(boolean useUnderline)
If true, an underline in the text of the Expander label indicates the next
character should be used for the mnemonic accelerator key.
useUnderline
- TRUE if underlines in the text indicate mnemonics