click
public void click()
Sends a clicked signal to the button. If handlers have been set up
for this event, they will be called
enter
public void enter()
Sends an enter signal to the button. If handlers have been set up
for this event, they will be called.
fireButtonEvent
protected void fireButtonEvent(ButtonEvent event)
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface Container
getEventType
public EventType getEventType(String signal)
- getEventType in interface Container
getFocusOnClick
public boolean getFocusOnClick()
getImage
public Widget getImage()
getLabel
public String getLabel()
Returns the label which is being used on the button.
getRelief
public ReliefStyle getRelief()
Returns the current relief style of the button
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Bin
getUseStock
public boolean getUseStock()
Returns true if this button is using stock items
getUseUnderline
public boolean getUseUnderline()
Returns whether an embedded underline in the button label indicates a
mnemonic.
getXAlignment
public double getXAlignment()
getYAlignment
public double getYAlignment()
gtk_button_clicked
protected static final void gtk_button_clicked(Handle button)
gtk_button_enter
protected static final void gtk_button_enter(Handle button)
gtk_button_get_alignment
protected static final void gtk_button_get_alignment(Handle button,
double[] xalign,
double[] yalign)
gtk_button_get_focus_on_click
protected static final boolean gtk_button_get_focus_on_click(Handle button)
gtk_button_get_image
protected static final Handle gtk_button_get_image(Handle button)
gtk_button_get_label
protected static final String gtk_button_get_label(Handle button)
gtk_button_get_relief
protected static final int gtk_button_get_relief(Handle button)
gtk_button_get_type
protected static final int gtk_button_get_type()
gtk_button_get_use_stock
protected static final boolean gtk_button_get_use_stock(Handle button)
gtk_button_get_use_underline
protected static final boolean gtk_button_get_use_underline(Handle button)
gtk_button_leave
protected static final void gtk_button_leave(Handle button)
gtk_button_new
protected static final Handle gtk_button_new()
gtk_button_new_from_stock
protected static final Handle gtk_button_new_from_stock(String stock_id)
gtk_button_new_with_label
protected static final Handle gtk_button_new_with_label(String label)
gtk_button_new_with_mnemonic
protected static final Handle gtk_button_new_with_mnemonic(String label)
gtk_button_pressed
protected static final void gtk_button_pressed(Handle button)
gtk_button_released
protected static final void gtk_button_released(Handle button)
gtk_button_set_alignment
protected static final void gtk_button_set_alignment(Handle button,
double xalign,
double yalign)
gtk_button_set_focus_on_click
protected static final void gtk_button_set_focus_on_click(Handle button,
boolean focus)
gtk_button_set_image
protected static final void gtk_button_set_image(Handle button,
Handle image)
gtk_button_set_label
protected static final void gtk_button_set_label(Handle button,
String label)
gtk_button_set_relief
protected static final void gtk_button_set_relief(Handle button,
int relief)
gtk_button_set_use_stock
protected static final void gtk_button_set_use_stock(Handle button,
boolean useStock)
gtk_button_set_use_underline
protected static final void gtk_button_set_use_underline(Handle button,
boolean useUnderline)
leave
public void leave()
Sends a leave signal to the button. If handlers have been set up
for this event, they will be called.
press
public void press()
Sends a pressed signal to the button. If handlers have been set
up for this event then they will be called
release
public void release()
Sends a released signal to the button. If handlers have been set
up for this event, they will be called.
setAlignment
public void setAlignment(double xalign,
double yalign)
setFocusOnClick
public void setFocusOnClick(boolean focusOnClick)
setImage
public void setImage(Widget image)
setLabel
public void setLabel(String newLabel)
Sets the text of the label of the button to newLabel.
If setUseStock has been called or this object was created using stock
buttons, then newLabel should be the name of the stock item to be used.
setRelief
public void setRelief(ReliefStyle newRelief)
Sets the relief style of the edges of the Button widget.
setUseStock
public void setUseStock(boolean useStock)
Setting this will true will make the widget try to interpret the label as
a stock item. If the stock id is unknown, it will be treated as a normal
label.
Stock items are standard icons and strings. These are included in Gtk
themes, so that the appearance of all applications follows their theme.
The use of stock items is highly recommended.
useStock
- true if this button should use stock items
setUseUnderline
public void setUseUnderline(boolean useUnderLine)
If true, an underline in the text of the button label indicates the next
character should be used for the mnemonic accelerator key.