// add contition
RubyObject cond = (RubyObject) page.getInstanceVariable("@condition");
form.addHeader("cond", new FormHeader(I18N.t("Bedingung"), "if").setColumn(8).setCollapsed(true));
// add local switch
FormCheckbox v = RubyForm.getBoolean("Local Switch", cond, "@self_switch_valid");
form.addElement("cond.ls", v);
form.addElement(
"cond.ls2",
FormHelper.setEnabeldWhenRightElementSelect(
v,
RubyForm.getComboBox("", new String[] { "A", "B", "C", "D" }, new String[] { "A", "B", "C", "D" },
cond.getInstanceVariable("@self_switch_ch")), "true"));
v.informListeners();
// add switch 1
v = RubyForm.getBoolean("Switch 1", cond, "@switch1_valid");
form.addElement("cond.s1", v);
form.addElement("cond.s12", FormHelper.setEnabeldWhenRightElementSelect(v, new FormSwitchVarSelector(project, "", cond,
"@switch1_id", Type.SWITCH), "true"));
v.informListeners();
// add switch 2
v = RubyForm.getBoolean("Switch 2", cond, "@switch2_valid");
form.addElement("cond.s2", new FormEmpty());
form.addElement("cond.s23", new FormEmpty());
form.addElement("cond.s24", v);
form.addElement("cond.s25", FormHelper.setEnabeldWhenRightElementSelect(v, new FormSwitchVarSelector(project, "", cond,
"@switch2_id", Type.SWITCH), "true"));
v.informListeners();
// add variable
v = RubyForm.getBoolean("Variable", cond, "@variable_valid");
form.addElement("cond.v3", v);
form.addElement("cond.v4", FormHelper.setEnabeldWhenRightElementSelect(v, new FormSwitchVarSelector(project, "", cond,
"@variable_id", Type.VARIABLE), "true"));
form.addElement("cond.v5",
FormHelper.setEnabeldWhenRightElementSelect(v, RubyForm.getNumber(">=", cond, "@variable_value"), "true"));
v.informListeners();
// graphic
RubyObject graph = (RubyObject) page.getInstanceVariable("@graphic");
form.addHeader("graphic", new FormHeader(I18N.t("Graphic"), "graphic").setColumn(4).setCollapsed(true));