Examples of CheckBoxElement


Examples of com.vaadin.testbench.elements.CheckBoxElement

    @Test
    public void numberOfRpcCallsIsEqualToClicks() {
        openTestURL();

        CheckBoxElement checkBoxElement = $(CheckBoxElement.class).first();
        WebElement labelElem = checkBoxElement.findElement(By.tagName("label"));
        WebElement inputElem = checkBoxElement.findElement(By.tagName("input"));
        final WebElement countElem = $(LabelElement.class).id("count-label");

        // Click on the actual checkbox.
        inputElem.click();
        // Have to use waitUntil to make this test more stable.
View Full Code Here

Examples of com.vaadin.testbench.elements.CheckBoxElement

        // Spacing on, not hiding empty rows/columns
        // There should be 3 * 6px spacing (red) above the csslayout
        verifySpacingAbove(3 * 6, gridLayout, component);

        CheckBoxElement spacingCheckbox = $(CheckBoxElement.class).caption(
                "spacing").first();
        check(spacingCheckbox);

        // Spacing off, not hiding empty rows/columns
        // There should not be any spacing (red) above the csslayout
        verifySpacingAbove(0, gridLayout, component);

        CheckBoxElement hideRowsColumnsCheckbox = $(CheckBoxElement.class)
                .caption("hide empty rows/columns").first();
        check(hideRowsColumnsCheckbox);

        // Spacing off, hiding empty rows/columns
        // There should not be any spacing (red) above the csslayout
View Full Code Here

Examples of com.vaadin.testbench.elements.CheckBoxElement

    @Test
    public void testViewportUnchanged() throws IOException {
        openTestURL();

        CheckBoxElement checkbox = $(CheckBoxElement.class).first();

        WebElement row = $(TableElement.class).first().getCell(190, 0);
        final WebElement scrollPositionDisplay = getDriver().findElement(
                By.className("v-table-scrollposition"));
        waitUntilNot(new ExpectedCondition<Boolean>() {

            @Override
            public Boolean apply(WebDriver input) {
                return scrollPositionDisplay.isDisplayed();
            }
        }, 10);

        int rowLocation = row.getLocation().getY();

        // use click x,y with non-zero offset to actually toggle the checkbox. (#13763)
        checkbox.click(5, 5);
        int newRowLocation = row.getLocation().getY();

        assertThat(newRowLocation, is(rowLocation));

    }
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

        PasswordElement pe = (PasswordElement) fe;
        renderPasswordElement(f, pe, sb);
      } else if (fe instanceof TextElement) {
        renderTextElement(f, (TextElement) fe, sb, ubu);
      } else if (fe instanceof CheckBoxElement) {
        CheckBoxElement cbe = (CheckBoxElement) fe;
        renderCheckBox(f, cbe, sb, translator);
      } else if (fe instanceof RadioButtonGroupElement) {
        RadioButtonGroupElement rbe = (RadioButtonGroupElement) fe;
        renderRadioButtonGroup(f, rbe, translator, sb);
      } else if (fe instanceof SingleSelectionElement) {
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

    String[] skipKeys = new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
    String[] skipValues = new String[] { translate("yes"), translate("no") };
    sendMailSwitchElem = new StaticSingleSelectionElement("mailtemplateform.sendMailSwitchElem", skipKeys, skipValues);
    sendMailSwitchElem.select(Boolean.TRUE.toString(), true);
    addFormElement("sendMailSwitchElem", sendMailSwitchElem);
    ccSender = new CheckBoxElement(NLS_CONTACT_SEND_CP_FROM, true);
    addFormElement("tcpfrom", ccSender);
    String value = template.getSubjectTemplate();
    subjectElem = new TextElement("mailtemplateform.subject", value, true, 60, 128);
    addFormElement("subjectElem", subjectElem);
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

   * @param name  Name of the form
   */
  public VarForm(String name, Translator translator, boolean showMenu, boolean showNavButtons, String height, boolean isAssessable, int cutValue) {
    super(name, translator);

    showMenuEl = new CheckBoxElement("showmenu.label", showMenu);
    addFormElement("showmenu", showMenuEl);

    showNavButtonsEl = new CheckBoxElement("shownavbuttons.label", showNavButtons);
    addFormElement("shownavbuttons", showNavButtonsEl);

    String[] keys = new String[]{ ScormEditController.CONFIG_HEIGHT_AUTO, "460", "480",
        "500", "520", "540", "560", "580",
        "600", "620", "640", "660", "680",
        "700", "720", "730", "760", "780",
        "800", "820", "840", "860", "880",
        "900", "920", "940", "960", "980",
        "1000", "1020", "1040", "1060", "1080",
        "1100", "1120", "1140", "1160", "1180",
        "1200", "1220", "1240", "1260", "1280",
        "1300", "1320", "1340", "1360", "1380" };
    String[] values = new String[]{ translator.translate("height.auto"), "460px", "480px",
        "500px", "520px", "540px", "560px", "580px",
        "600px", "620px", "640px", "660px", "680px",
        "700px", "720px", "730px", "760px", "780px",
        "800px", "820px", "840px", "860px", "880px",
        "900px", "920px", "940px", "960px", "980px",
        "1000px", "1020px", "1040px", "1060px", "1080px",
        "1100px", "1120px", "1140px", "1160px", "1180px",
        "1200px", "1220px", "1240px", "1260px", "1280px",
        "1300px", "1320px", "1340px", "1360px", "1380px" };
   
    heightEl = new StaticSingleSelectionElement("height.label", keys, values);
    addFormElement("height", heightEl);
    // preselect given height. Check first if this height is selectable,
    // otherwhise just use the auto height (in case this list is modified somewhen later)
    if (Arrays.asList(keys).contains(height)) {
      heightEl.select(height, true);
    } else {
      heightEl.select(ScormEditController.CONFIG_HEIGHT_AUTO, true);
    }
   
    isAssessableEl = new CheckBoxElement("assessable.label", isAssessable);
    addFormElement("isassessable", isAssessableEl);
   
    cutValueEl = new IntegerElement("cutvalue.label", cutValue);
    addFormElement("cutvalue", cutValueEl);

View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

   * @param name Name of the form
   */
  public AjaxForm(String name, Translator translator, boolean ajaxOn, boolean ajaxOnGlobally) {
    super(name, translator);

    CheckBoxElement ajaxOnGloballyEl = new CheckBoxElement("ajaxon.global.label", ajaxOnGlobally);
    ajaxOnGloballyEl.setReadOnly(true);
    addFormElement("ajaxonglobal", ajaxOnGloballyEl);

    ajaxOnByPreferences = new CheckBoxElement("ajaxon.label", ajaxOn);
    addFormElement("ajaxon", ajaxOnByPreferences);
    addSubmitKey("save", "save");
  }
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

   * @param name Name of the form
   */
  public AccessibilityForm(String name, Translator translator, boolean web2aModeOn) {
    super(name, translator);

    web2aModePreferences = new CheckBoxElement("accessibility.web2aMode.label", web2aModeOn);
    addFormElement("web2aModeOn", web2aModePreferences);
    addSubmitKey("save", "save");
  }
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

/**
*
* @see org.olat.user.propertyhandlers.UserPropertyHandler#getFormElement(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean)
*/
  public FormElement getFormElement(Locale locale, User user, String usageIdentifyer, boolean isAdministrativeUser) {
    CheckBoxElement ui = null;
    UserManager um = UserManager.getInstance();
   
    String value = getInternalValue(user);
    boolean isEnabled = value != null && value.equals("true") ? Boolean.TRUE : Boolean.FALSE;
    ui = new CheckBoxElement(i18nFormElementLabelKey(), isEnabled);
    if ( um.isUserViewReadOnly(usageIdentifyer, this) && ! isAdministrativeUser) {
      ui.setReadOnly(true);
    }
    if (um.isMandatoryUserProperty(usageIdentifyer, this)) {
      ui.setMandatory(true);
    }
    return ui;
  }
View Full Code Here

Examples of org.olat.core.gui.formelements.CheckBoxElement

  public BulkReplayUserFrom(String name, Translator translator) {
    super(name, translator);
    tuser = new TextAreaElement("bulkuserreplay.tt", 10, 60, null);
    addFormElement("bulkuserreplay.tt", tuser);
    isOn = new CheckBoxElement("bulkuserreplay.chkbx.onoff", true);
    addFormElement("isOn", isOn);
   
    addOlatPasswordAuthentication = new PasswordElement("bulkuserreplay.addOlatPasswordAuthentication", 255);
    addFormElement("addOlatPasswordAuthentication", addOlatPasswordAuthentication);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.