use of com.spinyowl.legui.component.RadioButton in project legui by SpinyOwl.
the class MultipleWindowsMultipleThreadsExample method generateOnFly.
private static List<Component> generateOnFly() {
List<Component> list = new ArrayList<>();
Label label = new Label(20, 60, 200, 20);
label.getTextState().setText("Generated on fly label");
label.getStyle().setTextColor(ColorConstants.red());
RadioButtonGroup group = new RadioButtonGroup();
RadioButton radioButtonFirst = new RadioButton("First", 20, 90, 200, 20);
RadioButton radioButtonSecond = new RadioButton("Second", 20, 110, 200, 20);
radioButtonFirst.setRadioButtonGroup(group);
radioButtonSecond.setRadioButtonGroup(group);
list.add(label);
list.add(radioButtonFirst);
list.add(radioButtonSecond);
return list;
}
use of com.spinyowl.legui.component.RadioButton in project legui by SpinyOwl.
the class RadioButtonClickEventListener method process.
/**
* Used to handle {@link MouseClickEvent}
*
* @param event event to handle.
*/
@Override
public void process(MouseClickEvent event) {
if (event.getAction() == CLICK) {
RadioButton component = (RadioButton) event.getTargetComponent();
component.setChecked(true);
}
}
use of com.spinyowl.legui.component.RadioButton in project legui by SpinyOwl.
the class ExampleGui method createRadioButtons.
private void createRadioButtons() {
RadioButtonGroup radioButtonGroup = new RadioButtonGroup();
RadioButton radioButton1 = new RadioButton(250, 30, 100, 20);
RadioButton radioButton2 = new RadioButton(250, 60, 100, 20);
radioButton1.setChecked(true);
radioButton2.setChecked(false);
radioButton1.setRadioButtonGroup(radioButtonGroup);
radioButton2.setRadioButtonGroup(radioButtonGroup);
this.add(radioButton1);
this.add(radioButton2);
}
use of com.spinyowl.legui.component.RadioButton in project legui by SpinyOwl.
the class MultipleWindowsExample method generateOnFly.
private static List<Component> generateOnFly() {
List<Component> list = new ArrayList<>();
Label label = new Label(20, 60, 200, 20);
label.getTextState().setText("Generated on fly label");
label.getStyle().setTextColor(ColorConstants.red());
RadioButtonGroup group = new RadioButtonGroup();
RadioButton radioButtonFirst = new RadioButton("First", 20, 90, 200, 20);
RadioButton radioButtonSecond = new RadioButton("Second", 20, 110, 200, 20);
radioButtonFirst.setRadioButtonGroup(group);
radioButtonSecond.setRadioButtonGroup(group);
list.add(label);
list.add(radioButtonFirst);
list.add(radioButtonSecond);
return list;
}
use of com.spinyowl.legui.component.RadioButton in project legui by SpinyOwl.
the class ShaderProgram method generateOnFly.
private List<Component> generateOnFly() {
List<Component> list = new ArrayList<>();
Label label = new Label(20, 60, 200, 20);
label.getTextState().setText("Generated on fly label");
label.getStyle().setTextColor(ColorConstants.red());
RadioButtonGroup group = new RadioButtonGroup();
RadioButton radioButtonFirst = new RadioButton("First", 20, 90, 200, 20);
RadioButton radioButtonSecond = new RadioButton("Second", 20, 110, 200, 20);
radioButtonFirst.setRadioButtonGroup(group);
radioButtonSecond.setRadioButtonGroup(group);
list.add(label);
list.add(radioButtonFirst);
list.add(radioButtonSecond);
return list;
}
Aggregations