Note
Only one of the styles ARROW, CHECK, PUSH, RADIO, and TOGGLE may be specified.
Note
Only one of the styles LEFT, RIGHT, and CENTER may be specified.
Note
Only one of the styles UP, DOWN, LEFT, and RIGHT may be specified when the ARROW style is specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv GdkRGBA | |
| pack-priv long | |
| pack-priv static final int | |
| pack-priv Image | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv Image | |
| pack-priv long | |
| pack-priv static final int | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv String | |
| pack-priv boolean | toggleButtonTheming
True iff this toggle button requires special theme handling. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private void | |
| public void | addSelectionListener(SelectionListener
the listener which should be notified listener)Adds the listener to the collection of listeners who will
be notified when the control is selected by the user, by sending
it one of the messages defined in the |
| pack-priv void | |
| pack-priv static int | |
| pack-priv Point | computeSizeInPixels(int wHint, int hHint, boolean changed)
Overrides org. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| pack-priv long | |
| pack-priv long | |
| public int | Returns: the alignmentReturns a value which describes the position of the text or image in the receiver. |
| pack-priv GtkBorder | |
| pack-priv GdkRGBA | |
| public boolean | Returns: the grayed state of the checkboxReturns |
| public Image | Returns: the receiver's imageReturns the receiver's image if it has one, or null if it does not. |
| pack-priv String | |
| public boolean | Returns: the selection stateReturns |
| public String | Returns: the receiver's textReturns the receiver's text, which will be an empty
string if it has never been set or if the receiver is
an |
| pack-priv boolean | gtk4_key_press_event(long
the corresponding controller responsible for capturing the event controller, int the pressed key keyval, int raw code of the pressed key keycode, int the bitmask, representing the state of the modifier keys and pointer buttons state, long the GdkEvent captured event)Overrides org. |
| pack-priv long | gtk_button_press_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | gtk_focus_in_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_focus_out_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_key_press_event(long widget, long event)
Overrides org. |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | mustBeVisibleOnInitBounds()
Overrides org. true if the widget must be visible during call to
setInitialBounds().
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | removeSelectionListener(SelectionListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the control is selected by the user. |
| pack-priv void | |
| pack-priv void | |
| public void | setAlignment(int
the new alignment alignment)Controls how text, images and arrows will be displayed in the receiver. |
| pack-priv void | setBackgroundGdkRGBA(long context, long handle, GdkRGBA rgba)
Overrides org. |
| pack-priv int | setBounds(int x, int y, int width, int height, boolean move, boolean resize)
Overrides org. |
| public void | setEnabled(boolean
the new enabled state enabled)Overrides org. true,
and disables it otherwise.
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | setForegroundGdkRGBA(long handle, GdkRGBA rgba)
Overrides org. |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv boolean | |
| public void | setSelection(boolean
the new selection state selected)Sets the selection state of the receiver, if it is of type |
| public void | |
| pack-priv void | |
| pack-priv int | |
| private void | |
| pack-priv long | windowProc(long handle, long arg0, long user_data)
Overrides org. |
| arrowHandle | back to summary |
|---|---|
| pack-priv long arrowHandle | |
| background | back to summary |
|---|---|
| pack-priv GdkRGBA background | |
| boxHandle | back to summary |
|---|---|
| pack-priv long boxHandle | |
| DEFAULT_BORDER | back to summary |
|---|---|
| pack-priv static final int DEFAULT_BORDER | |
| defaultDisableImage | back to summary |
|---|---|
| pack-priv Image defaultDisableImage | |
| enabled | back to summary |
|---|---|
| pack-priv boolean enabled | |
| grayed | back to summary |
|---|---|
| pack-priv boolean grayed | |
| groupHandle | back to summary |
|---|---|
| pack-priv long groupHandle | |
| image | back to summary |
|---|---|
| pack-priv Image image | |
| imageHandle | back to summary |
|---|---|
| pack-priv long imageHandle | |
| INNER_BORDER | back to summary |
|---|---|
| pack-priv static final int INNER_BORDER | |
| labelHandle | back to summary |
|---|---|
| pack-priv long labelHandle | |
| selected | back to summary |
|---|---|
| pack-priv boolean selected | |
| text | back to summary |
|---|---|
| pack-priv String text | |
| toggleButtonTheming | back to summary |
|---|---|
| pack-priv boolean toggleButtonTheming True iff this toggle button requires special theme handling. See bug 546552. | |
| Button | back to summary |
|---|---|
| public Button(Composite parent, int style) Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class
| |
| _setAlignment | back to summary |
|---|---|
| pack-priv void _setAlignment(int alignment) | |
| _setImage | back to summary |
|---|---|
| private void _setImage(Image image) | |
| addSelectionListener | back to summary |
|---|---|
| public void addSelectionListener(SelectionListener listener) Adds the listener to the collection of listeners who will
be notified when the control is selected by the user, by sending
it one of the messages defined in the
When the
| |
| checkBackground | back to summary |
|---|---|
| pack-priv void checkBackground() Overrides org.
| |
| checkStyle | back to summary |
|---|---|
| pack-priv static int checkStyle(int style) | |
| computeSizeInPixels | back to summary |
|---|---|
| pack-priv Point computeSizeInPixels(int wHint, int hHint, boolean changed) Overrides org.
| |
| createHandle | back to summary |
|---|---|
| pack-priv void createHandle(int index) Overrides org.
| |
| createWidget | back to summary |
|---|---|
| pack-priv void createWidget(int index) Overrides org.
| |
| deregister | back to summary |
|---|---|
| pack-priv void deregister() Overrides org.
| |
| disposeDefaultDisabledImage | back to summary |
|---|---|
| private void disposeDefaultDisabledImage() | |
| dpiChanged | back to summary |
|---|---|
| pack-priv long dpiChanged(long object, long arg0) Overrides org.
| |
| fontHandle | back to summary |
|---|---|
| pack-priv long fontHandle() Overrides org.
| |
| getAlignment | back to summary |
|---|---|
| public int getAlignment() Returns a value which describes the position of the
text or image in the receiver. The value will be one of
| |
| getBorder | back to summary |
|---|---|
| pack-priv GtkBorder getBorder(byte[] border, long handle, int defaultBorder) | |
| getContextBackgroundGdkRGBA | back to summary |
|---|---|
| pack-priv GdkRGBA getContextBackgroundGdkRGBA() Overrides org.
| |
| getGrayed | back to summary |
|---|---|
| public boolean getGrayed() Returns
| |
| getImage | back to summary |
|---|---|
| public Image getImage() Returns the receiver's image if it has one, or null if it does not.
| |
| getNameText | back to summary |
|---|---|
| pack-priv String getNameText() Overrides org.
| |
| getSelection | back to summary |
|---|---|
| public boolean getSelection() Returns
When the receiver is of type
| |
| getText | back to summary |
|---|---|
| public String getText() Returns the receiver's text, which will be an empty
string if it has never been set or if the receiver is
an
| |
| gtk4_key_press_event | back to summary |
|---|---|
| pack-priv boolean gtk4_key_press_event(long controller, int keyval, int keycode, int state, long event) Overrides org.
| |
| gtk_button_press_event | back to summary |
|---|---|
| pack-priv long gtk_button_press_event(long widget, long event) Overrides org.
| |
| gtk_clicked | back to summary |
|---|---|
| pack-priv long gtk_clicked(long widget) Overrides org.
| |
| gtk_draw | back to summary |
|---|---|
| pack-priv long gtk_draw(long widget, long cairo) Overrides org.
| |
| gtk_focus_in_event | back to summary |
|---|---|
| pack-priv long gtk_focus_in_event(long widget, long event) Overrides org.
| |
| gtk_focus_out_event | back to summary |
|---|---|
| pack-priv long gtk_focus_out_event(long widget, long event) Overrides org.
| |
| gtk_key_press_event | back to summary |
|---|---|
| pack-priv long gtk_key_press_event(long widget, long event) Overrides org.
| |
| hookEvents | back to summary |
|---|---|
| pack-priv void hookEvents() Overrides org.
| |
| isDescribedByLabel | back to summary |
|---|---|
| pack-priv boolean isDescribedByLabel() Overrides org.
| |
| mnemonicHit | back to summary |
|---|---|
| pack-priv boolean mnemonicHit(char key) Overrides org.
| |
| mnemonicMatch | back to summary |
|---|---|
| pack-priv boolean mnemonicMatch(char key) Overrides org.
| |
| mustBeVisibleOnInitBounds | back to summary |
|---|---|
| pack-priv boolean mustBeVisibleOnInitBounds() Overrides org. Doc from org. Widgets with unusual bounds calculation behavior can override this method
to return
| |
| register | back to summary |
|---|---|
| pack-priv void register() Overrides org.
| |
| releaseHandle | back to summary |
|---|---|
| pack-priv void releaseHandle() Overrides org.
| |
| releaseWidget | back to summary |
|---|---|
| pack-priv void releaseWidget() Overrides org.
| |
| removeSelectionListener | back to summary |
|---|---|
| public void removeSelectionListener(SelectionListener listener) Removes the listener from the collection of listeners who will be notified when the control is selected by the user.
| |
| resizeHandle | back to summary |
|---|---|
| pack-priv void resizeHandle(int width, int height) Overrides org.
| |
| selectRadio | back to summary |
|---|---|
| pack-priv void selectRadio() | |
| setAlignment | back to summary |
|---|---|
| public void setAlignment(int alignment) Controls how text, images and arrows will be displayed
in the receiver. The argument should be one of
| |
| setBackgroundGdkRGBA | back to summary |
|---|---|
| pack-priv void setBackgroundGdkRGBA(long context, long handle, GdkRGBA rgba) Overrides org.
| |
| setBounds | back to summary |
|---|---|
| pack-priv int setBounds(int x, int y, int width, int height, boolean move, boolean resize) Overrides org.
| |
| setEnabled | back to summary |
|---|---|
| public void setEnabled(boolean enabled) Overrides org. Enables the receiver if the argument is A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.
| |
| setFontDescription | back to summary |
|---|---|
| pack-priv void setFontDescription(long fontDesc) Overrides org.
| |
| setForegroundGdkRGBA | back to summary |
|---|---|
| pack-priv void setForegroundGdkRGBA(GdkRGBA rgba) Overrides org.
| |
| setForegroundGdkRGBA | back to summary |
|---|---|
| pack-priv void setForegroundGdkRGBA(long handle, GdkRGBA rgba) Overrides org.
| |
| setGrayed | back to summary |
|---|---|
| public void setGrayed(boolean grayed) Sets the grayed state of the receiver. This state change only applies if the control was created with the SWT.CHECK style.
| |
| setImage | back to summary |
|---|---|
| public void setImage(Image image) Sets the receiver's image to the argument, which may be
Note that a Button can display an image and text simultaneously.
| |
| setOrientation | back to summary |
|---|---|
| pack-priv void setOrientation(boolean create) Overrides org.
| |
| setRadioSelection | back to summary |
|---|---|
| pack-priv boolean setRadioSelection(boolean value) Overrides org.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(boolean selected) Sets the selection state of the receiver, if it is of type
When the receiver is of type
| |
| setText | back to summary |
|---|---|
| public void setText(String string) Sets the receiver's text. This method sets the button label. The label may include the mnemonic character but must not contain line delimiters. Mnemonics are indicated by an '&' that causes the next character to be the mnemonic. When the user presses a key sequence that matches the mnemonic, a selection event occurs. On most platforms, the mnemonic appears underlined but may be emphasized in a platform specific manner. The mnemonic indicator character '&' can be escaped by doubling it in the string, causing a single '&' to be displayed. Note that a Button can display an image and text simultaneously on Windows (starting with XP), GTK+ and OSX. On other platforms, a Button that has an image and text set into it will display the image or text that was set most recently. Also note, if control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
| |
| showWidget | back to summary |
|---|---|
| pack-priv void showWidget() Overrides org.
| |
| traversalCode | back to summary |
|---|---|
| pack-priv int traversalCode(int key, long event) Overrides org.
| |
| updateWidgetsVisibility | back to summary |
|---|---|
| private void updateWidgetsVisibility() | |
| windowProc | back to summary |
|---|---|
| pack-priv long windowProc(long handle, long arg0, long user_data) Overrides org.
| |