コード例 #1
0
  @Override
  protected void updateLabels() {
    fileField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.fileField.caption"));
    activeField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.activeField.caption"));
    versionField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.versionField.caption"));
    packageNameField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.packageNameField.caption"));
    nameField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.nameField.caption"));
    idField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.KnowledgeViewForm.idField.caption"));
    descriptionField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.KnowledgeViewForm.descriptionField.caption"));

    errorMessageField.setReadOnly(true);
  }
コード例 #2
0
ファイル: Ticket2151.java プロジェクト: nelsonsilva/vaadin
  private void checkCheckBox(Class<? extends CheckBox> class1) {
    boolean ok = false;
    CheckBox b;
    try {
      b = class1.newInstance();
    } catch (Exception e1) {
      e1.printStackTrace();
      return;
    }

    b.setCaption("Button of type " + class1.getSimpleName());
    status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + ": OK");
  }
コード例 #3
0
  private Component toggleRequired() {
    CheckBox requiredToggle = new CheckBox();
    requiredToggle.setImmediate(true);
    requiredToggle.setCaption("Required");
    requiredToggle.addListener(
        new ValueChangeListener() {

          @Override
          public void valueChange(ValueChangeEvent event) {
            setRequired((Boolean) event.getProperty().getValue());
          }
        });
    return requiredToggle;
  }
コード例 #4
0
  private Component toggleIcon() {
    CheckBox iconToggle = new CheckBox();
    iconToggle.setImmediate(true);
    iconToggle.setCaption("Icons");
    iconToggle.addListener(
        new ValueChangeListener() {

          @Override
          public void valueChange(ValueChangeEvent event) {
            setIcon((Boolean) event.getProperty().getValue());
          }
        });
    return iconToggle;
  }
コード例 #5
0
  public SpecialAccessControl() {
    setMargin(true);
    setSpacing(true);

    addComponent(userList());

    allowedBackwardInputAttendance.setCaption("Allow user to enter previous attendance.");
    allowedBackwardInputAttendance.addListener(
        new ClickListener() {

          @Override
          public void buttonClick(Button.ClickEvent event) {
            if (event.getButton().booleanValue()) {
              val = 1;
            } else {
              val = 0;
            }
          }
        });
    allowedBackwardInputAttendance.setImmediate(true);
    addComponent(allowedBackwardInputAttendance);

    Button button = new Button("UPDATE");
    button.setWidth("200px");
    button.addListener(
        new ClickListener() {

          @Override
          public void buttonClick(Button.ClickEvent event) {
            if (users.getValue() == null) {
              getWindow()
                  .showNotification("Select a User!", Window.Notification.TYPE_WARNING_MESSAGE);
              return;
            }

            boolean isUserAllowed =
                service.updateUserAllowedToEnterPreviousAttendance(
                    util.convertStringToInteger(users.getValue().toString()), isAllowed());
            if (isUserAllowed) {
              getWindow()
                  .showNotification(
                      "User is allowed to Enter Previous Attendance!",
                      Window.Notification.TYPE_TRAY_NOTIFICATION);
            }
          }
        });
    button.setImmediate(true);
    addComponent(button);
  }
コード例 #6
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // textAreaDescription
    textAreaDescription = new TextArea();
    textAreaDescription.setCaption("Enter A Description");
    textAreaDescription.setImmediate(false);
    textAreaDescription.setWidth("50.0%");
    textAreaDescription.setHeight("-1px");
    horizontalLayout_1.addComponent(textAreaDescription);

    // textFieldFilter
    textFieldFilter = new TextField();
    textFieldFilter.setCaption("Filter Function By ID");
    textFieldFilter.setImmediate(false);
    textFieldFilter.setWidth("-1px");
    textFieldFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(textFieldFilter);
    horizontalLayout_1.setComponentAlignment(textFieldFilter, new Alignment(9));

    // comboBoxDatatypeFilter
    comboBoxDatatypeFilter = new ComboBox();
    comboBoxDatatypeFilter.setCaption("Filter By Data Type");
    comboBoxDatatypeFilter.setImmediate(false);
    comboBoxDatatypeFilter.setWidth("-1px");
    comboBoxDatatypeFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
    horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter, new Alignment(9));

    // checkBoxFilterIsBag
    checkBoxFilterIsBag = new CheckBox();
    checkBoxFilterIsBag.setCaption("Is Bag Filter");
    checkBoxFilterIsBag.setImmediate(false);
    checkBoxFilterIsBag.setWidth("-1px");
    checkBoxFilterIsBag.setHeight("-1px");
    horizontalLayout_1.addComponent(checkBoxFilterIsBag);
    horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag, new Alignment(9));

    return horizontalLayout_1;
  }
コード例 #7
0
ファイル: JobViewForm.java プロジェクト: coderhelps/konekti
  @Override
  protected void updateLabels() {
    jobNameField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.jobNameField.caption"));
    jobGroupField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.jobGroupField.caption"));
    startTimeField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.startTimeField.caption"));
    endTimeField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.endTimeField.caption"));
    areaField.setCaption(
        getI18N().getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.areaField.caption"));
    descriptionField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.descriptionField.caption"));
    jobTriggerTypeField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.jobTriggerTypeField.caption"));
    jobTriggerPriorityField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.jobTriggerPriorityField.caption"));
    future_timeField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.future_timeField.caption"));
    futureField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.futureField.caption"));
    jobIntervalField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.jobIntervalField.caption"));
    repeatCountField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.JobViewForm.repeatCountField.caption"));
    // jobCalendarField.setCaption(getI18N().getMessage("com.thingtrack.konekti.view.web.form.JobViewForm.jobCalendarField.caption"));

  }
コード例 #8
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayoutHeader() {
    // common part: create layout
    horizontalLayoutHeader = new HorizontalLayout();
    horizontalLayoutHeader.setImmediate(false);
    horizontalLayoutHeader.setWidth("100.0%");
    horizontalLayoutHeader.setHeight("-1px");
    horizontalLayoutHeader.setMargin(true);
    horizontalLayoutHeader.setSpacing(true);

    // codeField
    codeField = new TextField();
    codeField.setCaption("Código");
    codeField.setImmediate(false);
    codeField.setWidth("100px");
    codeField.setHeight("-1px");
    codeField.setRequired(true);
    horizontalLayoutHeader.addComponent(codeField);

    // nameField
    nameField = new TextField();
    nameField.setCaption("Nombre Comercial");
    nameField.setImmediate(false);
    nameField.setWidth("100.0%");
    nameField.setHeight("-1px");
    nameField.setRequired(true);
    horizontalLayoutHeader.addComponent(nameField);
    horizontalLayoutHeader.setExpandRatio(nameField, 1.0f);

    // activeField
    activeField = new CheckBox();
    activeField.setCaption("Activo");
    activeField.setImmediate(false);
    activeField.setWidth("80px");
    activeField.setHeight("-1px");
    activeField.setRequired(true);
    horizontalLayoutHeader.addComponent(activeField);
    horizontalLayoutHeader.setComponentAlignment(activeField, new Alignment(10));

    return horizontalLayoutHeader;
  }
コード例 #9
0
ファイル: JobViewForm.java プロジェクト: coderhelps/konekti
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("650px");
    mainLayout.setHeight("220px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("650px");
    setHeight("220px");

    // jobGroupField
    jobGroupField = new TextField();
    jobGroupField.setCaption("Grupo");
    jobGroupField.setImmediate(false);
    jobGroupField.setWidth("140px");
    jobGroupField.setHeight("-1px");
    jobGroupField.setRequired(true);
    mainLayout.addComponent(jobGroupField, "top:20.0px;left:180.0px;");

    // jobIntervalField
    jobIntervalField = new TextField();
    jobIntervalField.setCaption("Intervalo");
    jobIntervalField.setImmediate(false);
    jobIntervalField.setWidth("60px");
    jobIntervalField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalField, "top:180.0px;left:20.0px;");

    // jobNameField
    jobNameField = new TextField();
    jobNameField.setCaption("Nombre");
    jobNameField.setImmediate(false);
    jobNameField.setWidth("140px");
    jobNameField.setHeight("-1px");
    jobNameField.setRequired(true);
    mainLayout.addComponent(jobNameField, "top:20.0px;left:20.0px;");

    // jobTriggerPriorityField
    jobTriggerPriorityField = new TextField();
    jobTriggerPriorityField.setCaption("Job Trigger Priority");
    jobTriggerPriorityField.setImmediate(false);
    jobTriggerPriorityField.setWidth("160px");
    jobTriggerPriorityField.setHeight("-1px");
    mainLayout.addComponent(jobTriggerPriorityField, "top:140.0px;left:200.0px;");

    // jobTriggerTypeField
    jobTriggerTypeField = new ComboBox();
    jobTriggerTypeField.setCaption("Tipo Disparador");
    jobTriggerTypeField.setImmediate(true);
    jobTriggerTypeField.setWidth("160px");
    jobTriggerTypeField.setHeight("-1px");
    jobTriggerTypeField.setRequired(true);
    mainLayout.addComponent(jobTriggerTypeField, "top:140.0px;left:20.0px;");

    // cronExpressionField
    cronExpressionField = new TextField();
    cronExpressionField.setCaption("Expresión Cron ");
    cronExpressionField.setImmediate(false);
    cronExpressionField.setWidth("340px");
    cronExpressionField.setHeight("-1px");
    mainLayout.addComponent(cronExpressionField, "top:180.0px;left:20.0px;");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("620px");
    descriptionField.setHeight("-1px");
    mainLayout.addComponent(descriptionField, "top:100.0px;left:20.0px;");

    // endTimeField
    endTimeField = new DateField();
    endTimeField.setCaption("Fecha Finalización");
    endTimeField.setImmediate(false);
    endTimeField.setWidth("-1px");
    endTimeField.setHeight("-1px");
    endTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(endTimeField, "top:60.0px;left:225.0px;");

    // futureField
    futureField = new CheckBox();
    futureField.setCaption("Futuro");
    futureField.setImmediate(false);
    futureField.setWidth("-1px");
    futureField.setHeight("-1px");
    mainLayout.addComponent(futureField, "top:140.0px;left:585.0px;");

    // future_timeField
    future_timeField = new TextField();
    future_timeField.setCaption("Future_time");
    future_timeField.setImmediate(false);
    future_timeField.setWidth("160px");
    future_timeField.setHeight("-1px");
    mainLayout.addComponent(future_timeField, "top:140.0px;left:400.0px;");

    // repeatCountField
    repeatCountField = new TextField();
    repeatCountField.setCaption("Repeticiones");
    repeatCountField.setImmediate(false);
    repeatCountField.setWidth("60px");
    repeatCountField.setHeight("24px");
    mainLayout.addComponent(repeatCountField, "top:180.0px;right:290.0px;");

    // startTimeField
    startTimeField = new DateField();
    startTimeField.setCaption("Fecha Comienzo");
    startTimeField.setImmediate(false);
    startTimeField.setWidth("-1px");
    startTimeField.setHeight("-1px");
    startTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(startTimeField, "top:60.0px;left:20.0px;");

    // areaField
    areaField = new ComboBox();
    areaField.setCaption("Area Trabajo");
    areaField.setImmediate(false);
    areaField.setWidth("-1px");
    areaField.setHeight("-1px");
    areaField.setRequired(true);
    mainLayout.addComponent(areaField, "top:60.0px;left:420.0px;");

    // jobCalendarField
    jobCalendarField = new JobTriggerCalendarField();
    jobCalendarField.setImmediate(false);
    jobCalendarField.setWidth("-1px");
    jobCalendarField.setHeight("-1px");
    mainLayout.addComponent(jobCalendarField, "top:167.0px;left:397.0px;");

    // jobIntervalTypeField
    jobIntervalTypeField = new ComboBox();
    jobIntervalTypeField.setCaption("Tipo Intervalo");
    jobIntervalTypeField.setImmediate(false);
    jobIntervalTypeField.setWidth("175px");
    jobIntervalTypeField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalTypeField, "top:180.0px;left:100.0px;");

    return mainLayout;
  }
コード例 #10
0
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("580px");
    mainLayout.setHeight("360px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("580px");
    setHeight("360px");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("380px");
    descriptionField.setHeight("-1px");
    mainLayout.addComponent(descriptionField, "top:112.0px;left:180.0px;");

    // idField
    idField = new TextField();
    idField.setCaption("Id");
    idField.setImmediate(false);
    idField.setWidth("400px");
    idField.setHeight("-1px");
    idField.setRequired(true);
    mainLayout.addComponent(idField, "top:20.0px;left:20.0px;");

    // nameField
    nameField = new TextField();
    nameField.setCaption("Nombre");
    nameField.setImmediate(false);
    nameField.setWidth("140px");
    nameField.setHeight("-1px");
    nameField.setRequired(true);
    mainLayout.addComponent(nameField, "top:112.0px;left:20.0px;");

    // packageNameField
    packageNameField = new TextField();
    packageNameField.setCaption("Paquete");
    packageNameField.setImmediate(false);
    packageNameField.setWidth("400px");
    packageNameField.setHeight("-1px");
    packageNameField.setRequired(true);
    mainLayout.addComponent(packageNameField, "top:64.0px;left:20.0px;");

    // versionField
    versionField = new TextField();
    versionField.setCaption("Versión");
    versionField.setImmediate(false);
    versionField.setWidth("120px");
    versionField.setHeight("-1px");
    versionField.setRequired(true);
    mainLayout.addComponent(versionField, "top:64.0px;left:440.0px;");

    // activeField
    activeField = new CheckBox();
    activeField.setCaption("Activo");
    activeField.setImmediate(false);
    activeField.setWidth("-1px");
    activeField.setHeight("-1px");
    activeField.setRequired(true);
    mainLayout.addComponent(activeField, "top:20.0px;left:507.0px;");

    // fileField
    fileField = new FileField();
    fileField.setImmediate(false);
    fileField.setWidth("540px");
    fileField.setHeight("-1px");
    mainLayout.addComponent(fileField, "top:160.0px;left:20.0px;");

    // errorMessageField
    errorMessageField = new TextArea();
    errorMessageField.setCaption("Mensaje Error");
    errorMessageField.setImmediate(false);
    errorMessageField.setWidth("540px");
    errorMessageField.setHeight("120px");
    mainLayout.addComponent(errorMessageField, "top:220.0px;left:20.0px;");

    return mainLayout;
  }
コード例 #11
0
  @Override
  protected void updateLabels() {
    tabSheetClient
        .getTab(TAB_GENERAL)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.generalTab"));
    tabSheetClient
        .getTab(TAB_ADDRESS)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.addressTab"));
    tabSheetClient
        .getTab(TAB_SECURITY)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.securityTab"));
    tabSheetClient
        .getTab(TAB_ORGANIZATION)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.organizationTab"));
    tabSheetClient
        .getTab(TAB_APPLICATION)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.applicationTab"));
    tabSheetClient
        .getTab(TAB_ROL)
        .setCaption(
            getI18N()
                .getMessage(
                    "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.roleTab"));

    codeField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.codeField.caption"));
    nameField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.nameField.caption"));
    activeField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.activeField.caption"));
    vatField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.vatField.caption"));
    clientTypeField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.ClientViewForm.clientTypeField.caption"));
    clientGroupField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.ClientViewForm.clientGroupField.caption"));
    phoneField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.phoneField.caption"));
    faxField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.faxField.caption"));
    facebookIdField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.ClientViewForm.facebookIdField.caption"));
    mobileField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.mobileField.caption"));
    descriptionField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.ClientViewForm.descriptionField.caption"));
    commentField.setCaption(
        getI18N()
            .getMessage(
                "com.thingtrack.konekti.view.web.form.ClientViewForm.commentField.caption"));
    emailField.setCaption(
        getI18N()
            .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.emailField.caption"));
  }