Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
GObject
public class Button
extends Bin
Constructor Summary | |
| |
| |
| |
| |
|
Method Summary | |
void |
|
void |
|
void |
|
static Button |
|
Class |
|
EventType |
|
boolean | |
Widget |
|
String |
|
ReliefStyle |
|
static org.gnu.glib.Type |
|
boolean |
|
boolean |
|
double | |
double | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
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 |
public Button()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a new Button widget
public Button(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a button using a handle to a native resource.
public Button(String stockItem)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Constructs a button using a String that represents a stock item. Stock items are standard icons and text strings. The use of these is highly encouraged as they allow gtk themes to have greater control over applications and so give a more consistent interface to the user.
Example:Button myButton = new Button( StockItem.NO; )
- Parameters:
stockItem
- A String representing a stock item
- See Also:
GtkStockItem
public Button(String label, boolean hasMnemonic)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a button widget with a gtk.Label child containing the given text. IfhasMnemonic
is true, the label will be interpreted as containing Mnemonic characters (keyboard accelerators). If characters in label are proceeded by an underscore character, they will be underlined. The first underlined character will be taken as the mnemonic - pressingAlt
and that character will activate the button.
- Parameters:
label
- Text to appear on the buttonhasMnemonic
- See above description
public Button(GtkStockItem stockItem)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Constructs a button using a stock item. Stock items are standard icons and text strings. The use of these is highly encouraged as they allow gtk themes to have greater control over applications and so give a more consistent interface to the user.
Example:Button myButton = new Button( new StockItem( StockItem.NO ); )
- Parameters:
stockItem
- A gtk stock item
- See Also:
GtkStockItem
public void addListener(ButtonListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Register an object to handle button events.
- See Also:
ButtonListener
public void click()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sends a clicked signal to the button. If handlers have been set up for this event, they will be called
public void enter()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sends an enter signal to the button. If handlers have been set up for this event, they will be called.
public static Button getButton(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a button using a handle to a native resource.
public Class getEventListenerClass(String signal)
- Overrides:
- getEventListenerClass in interface Container
public EventType getEventType(String signal)
- Overrides:
- getEventType in interface Container
public boolean getFocusOnClick()
public String getLabel()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the label which is being used on the button.
public ReliefStyle getRelief()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the current relief style of the button
public static org.gnu.glib.Type getType()
Deprecated. Superceeded by java-gnome 4.0.
Retrieve the runtime type used by the GLib library.
public boolean getUseStock()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns true if this button is using stock items
public boolean getUseUnderline()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether an embedded underline in the button label indicates a mnemonic.
public double getXAlignment()
public double getYAlignment()
public void leave()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sends a leave signal to the button. If handlers have been set up for this event, they will be called.
public void press()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sends a pressed signal to the button. If handlers have been set up for this event then they will be called
public void release()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sends a released signal to the button. If handlers have been set up for this event, they will be called.
public void removeListener(ButtonListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Removes a listener
- See Also:
addListener(ButtonListener)
public void setAlignment(double xalign, double yalign)
public void setFocusOnClick(boolean focusOnClick)
public void setLabel(String newLabel)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
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.
public void setRelief(ReliefStyle newRelief)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the relief style of the edges of the Button widget.
public void setUseStock(boolean useStock)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
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.
- Parameters:
useStock
- true if this button should use stock items
public void setUseUnderline(boolean useUnderLine)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
If true, an underline in the text of the button label indicates the next character should be used for the mnemonic accelerator key.