Search in sources :

Example 1 with RadioButtonGroup

use of com.spinyowl.legui.component.RadioButtonGroup 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;
}
Also used : ArrayList(java.util.ArrayList) Label(com.spinyowl.legui.component.Label) RadioButtonGroup(com.spinyowl.legui.component.RadioButtonGroup) RadioButton(com.spinyowl.legui.component.RadioButton) Component(com.spinyowl.legui.component.Component)

Example 2 with RadioButtonGroup

use of com.spinyowl.legui.component.RadioButtonGroup 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);
}
Also used : RadioButtonGroup(com.spinyowl.legui.component.RadioButtonGroup) RadioButton(com.spinyowl.legui.component.RadioButton)

Example 3 with RadioButtonGroup

use of com.spinyowl.legui.component.RadioButtonGroup 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;
}
Also used : ArrayList(java.util.ArrayList) Label(com.spinyowl.legui.component.Label) RadioButtonGroup(com.spinyowl.legui.component.RadioButtonGroup) RadioButton(com.spinyowl.legui.component.RadioButton) Component(com.spinyowl.legui.component.Component)

Example 4 with RadioButtonGroup

use of com.spinyowl.legui.component.RadioButtonGroup 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;
}
Also used : ArrayList(java.util.ArrayList) Label(com.spinyowl.legui.component.Label) RadioButtonGroup(com.spinyowl.legui.component.RadioButtonGroup) RadioButton(com.spinyowl.legui.component.RadioButton) Component(com.spinyowl.legui.component.Component)

Aggregations

RadioButton (com.spinyowl.legui.component.RadioButton)4 RadioButtonGroup (com.spinyowl.legui.component.RadioButtonGroup)4 Component (com.spinyowl.legui.component.Component)3 Label (com.spinyowl.legui.component.Label)3 ArrayList (java.util.ArrayList)3