Switch

Overview

Switch is a element that chooses between two proportions

SwitchSample.java
 // Instance a simple switch
subtitles = new Switch();

 // Set the colors up
subtitles.colorBallOn = Color.getRGB(0,150,136);
subtitles.colorBarOn = Colors.P_700;
subtitles.colorBallOn = Color.getRGB(241,241,241);
subtitles.colorBarOff = Colors.P_200;

 // Positions the switch 
add(subtitles, RIGHT-hGap, SAME+lsfx.getHeight()/2, PREFERRED, PREFERRED);

This sample code is only from the Switch, to see the complete sample, including the Slider, go to github

Attributes

Methods

References

Last updated