|
|
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Component Model}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Specific type of {{ScoutLink|Concepts|Button}} (one of the {{ScoutLink|Concepts|Field|Scout Form Field}})
| + | |
− | | + | |
− | * extends: {{ScoutJavadoc|AbstractToggleButton|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | The ToggleButton is a Button with 2 states (selected booleean).
| + | |
− | | + | |
− | If the user clicks on the ToggleButton then the button will be selected as long as the user clicks on it again.
| + | |
− | | + | |
− | == Screenshot ==
| + | |
− | {|{{BMTableStyle}}
| + | |
− | |-{{BMTHStyle}}
| + | |
− | ! State
| + | |
− | ! RAP
| + | |
− | ! SWT
| + | |
− | ! Swing
| + | |
− | ! Swing Rayo
| + | |
− | |-
| + | |
− | | Normal || [[Image:Scout_3.8_ToggleButton_Normal_RAP.png]] || [[Image:Scout_3.8_ToggleButton_Normal_SWT.png]] || [[Image:Scout_3.8_ToggleButton_Normal_Swing.png]] || [[Image:Scout_3.8_ToggleButton_Normal_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | | Selected || [[Image:Scout_3.8_ToggleButton_Selected_RAP.png]] || [[Image:Scout_3.8_ToggleButton_Selected_SWT.png]] || [[Image:Scout_3.8_ToggleButton_Selected_Swing.png]] || [[Image:Scout_3.8_ToggleButton_Selected_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | |}
| + | |
− | | + | |
− | == Code Example ==
| + | |
− | <source lang="java">
| + | |
− | @Order(10.0)
| + | |
− | public class ToggleButtonDefaultField extends AbstractButton {
| + | |
− | | + | |
− | @Override
| + | |
− | protected int getConfiguredDisplayStyle() {
| + | |
− | return DISPLAY_STYLE_TOGGLE;
| + | |
− | }
| + | |
− | | + | |
− | @Override
| + | |
− | protected String getConfiguredLabel() {
| + | |
− | return TEXTS.get("PushToSelect");
| + | |
− | }
| + | |
− | | + | |
− | @Override
| + | |
− | protected boolean getConfiguredProcessButton() {
| + | |
− | return false;
| + | |
− | }
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | == Properties ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also the {{ScoutLink|Concepts|Field|Field}} page for the properties that all fields have in common.
| + | |
− | | + | |
− | * {{ScoutProp|DisplayStyle}} needs to be configured to <tt>DISPLAY_STYLE_TOGGLE</tt>.
| + | |
− | | + | |
− | == Events ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also the {{ScoutLink|Concepts|Field|Field}} page for the events that all fields have in common.
| + | |
− | | + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|Field|Field}}
| + | |
Latest revision as of 07:20, 18 March 2024
The Scout documentation has been moved to https://eclipsescout.github.io/.