Jump to: navigation, search

Scout/Concepts/ToggleButton


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitter
Bugzilla
Bugzilla


Specific type of Button (one of the Scout Form Field)

  • extends: C obj.pngAbstractToggleButton

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

State RAP SWT Swing Swing Rayo
Normal Scout 3.8 ToggleButton Normal RAP.png Scout 3.8 ToggleButton Normal SWT.png Scout 3.8 ToggleButton Normal Swing.png Scout 3.8 ToggleButton Normal Swing Rayo.png
Selected Scout 3.8 ToggleButton Selected RAP.png Scout 3.8 ToggleButton Selected SWT.png Scout 3.8 ToggleButton Selected Swing.png Scout 3.8 ToggleButton Selected Swing Rayo.png

Code Example

@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; 
  } 
}

Properties

Defined with getConfiguredXxxxxx() methods.

See also the Field page for the properties that all fields have in common.

  • DisplayStyle needs to be configured to DISPLAY_STYLE_TOGGLE.

Events

Defined with execXxxxxx() methods.

See also the Field page for the events that all fields have in common.


See Also