Example #1
0
  public void fillForm(Member member) {

    header.setText("Mitglied bearbeiten");
    importantDisclosurePanel.setOpen(true);
    additionalDisclosurePanel.setOpen(true);
    forenameTextBox.setText(member.getForename());
    surnameTextBox.setText(member.getSurname());
    barcodeTextBox.setText("" + member.getBarcodeID());
    createMemberPanel.remove(barcodeInputPanel);
    streetTextBox.setText(member.getStreet());
    zipcodeTextBox.setText("" + member.getZipcode());
    cityTextBox.setText(member.getCity());
    birthTextBox1.setSelectedIndex(Integer.parseInt("" + member.getBirthDay()));
    birthTextBox2.setSelectedIndex(Integer.parseInt("" + member.getBirthMonth()));
    int temp = Integer.parseInt("" + (member.getBirthYear())) - 2009;
    birthTextBox3.setSelectedIndex(-temp);
    phoneTextBox.setText(member.getPhone());
    // TODO
    for (int i = 0; i < beltsizeListBox.getItemCount(); i++) {
      if (beltsizeListBox.getItemText(i).equals(member.getBeltsize())) {
        beltsizeListBox.setSelectedIndex(i);
      }
    }
    // beltsizeListBox.setSelectedIndex(i);
    // beltsizeTextBox.setText(member.getBeltsize());
    mobilephoneTextBox.setText(member.getMobilephone());
    faxTextBox.setText(member.getFax());
    emailTextBox.setText(member.getEmail());
    homepageTextBox.setText(member.getHomepage());
    diseasesTextBox.setText(member.getDiseases());
    noteTextBox.setText(member.getNote());
    imageUrl = member.getPicture();

    if (member.getAccountForename().equals(member.getForename())) {
      accountOwnerForenameTextBox.setText(constants.likeAbove());
      accountOwnerForenameTextBox.setReadOnly(true);
      likeAbove.setValue(true);
    } else {
      accountOwnerForenameTextBox.setText(member.getAccountForename());
    }

    if (member.getAccountSurname().equals(member.getSurname())) {
      accountOwnerSurnameTextBox.setText(constants.likeAbove());
      accountOwnerSurnameTextBox.setReadOnly(true);
      likeAbove2.setValue(true);
    } else {
      accountOwnerSurnameTextBox.setText(member.getAccountSurname());
    }

    accountNumberTextBox.setText(member.getAccountNumber());
    bankNameTextBox.setText(member.getBankName());
    bankNumberTextBox.setText(member.getBankNumber());
  }
  public InlineMultiSelect() {
    popup.setAutoHideEnabled(true);
    popup.addAutoHidePartner(textbox.getElement());

    multiSelect.addValueChangeHandler(
        new ValueChangeHandler<List<String>>() {

          @Override
          public void onValueChange(ValueChangeEvent<List<String>> event) {
            int size = event.getValue().size();
            textbox.setText(size + " selected");
          }
        });
    popup.add(multiSelect);

    textbox.setText("Make a selection");
    textbox.setReadOnly(true);
    panel.add(textbox);
    panel.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            popup.showRelativeTo(panel);
          }
        });

    initWidget(panel);
  }
Example #3
0
 private void initMessageUI() {
   messageBox = new TextBox();
   messageBox.setReadOnly(true);
   messageBox.setWidth(FieldCanvas.SIZE * game.getBoard().getDimension().x + "px");
   messageBox.setText("Click field to start game.");
   add(messageBox);
 }
 @Override
 public void setReadOnly(Boolean readlOnly) {
   textbox.setReadOnly(readOnly);
   if (readOnly) {
     textbox.setEnabled(false);
   }
 }
 public void edit(RecipeTO pRecipe) {
   nameTextBox.setText(pRecipe.getName());
   nameTextBox.setReadOnly(false);
   for (int i = 0; i < category.getItemCount(); i++) {
     if (pRecipe.getCategory().equals(category.getItemText(i))) {
       category.setSelectedIndex(i);
     }
   }
   for (int i = 0; i < cuisine.getItemCount(); i++) {
     if (pRecipe.getCuisine().equals(cuisine.getItemText(i))) {
       cuisine.setSelectedIndex(i);
     }
   }
   for (int i = 0; i < occasion.getItemCount(); i++) {
     if (pRecipe.getOccasion().equals(occasion.getItemText(i))) {
       occasion.setSelectedIndex(i);
     }
   }
   for (int i = 0; i < serves.getItemCount(); i++) {
     if (pRecipe.getServes().equals(serves.getItemText(i))) {
       serves.setSelectedIndex(i);
     }
   }
   ingredients.setText(pRecipe.getIngredients());
   directions.setText(pRecipe.getDirections());
 }
Example #6
0
  /**
   * Enables or disables read-only mode.
   *
   * <p>
   *
   * @param readOnly if true, enables read-only mode, else disables it
   */
  public void setReadOnly(boolean readOnly) {

    m_textbox.setReadOnly(readOnly);
    if (readOnly) {
      addStyleName(CSS.textBoxReadOnly());
    } else {
      removeStyleName(CSS.textBoxReadOnly());
    }
  }
 public void setInProgress(boolean inProgress) {
   if (inProgress) {
     searchButtonImage.addStyleName("istore-search-button-progress");
     searchBox.addStyleName("istore-search-box-progress");
   } else {
     searchButtonImage.removeStyleName("istore-search-button-progress");
     searchBox.removeStyleName("istore-search-box-progress");
   }
   searchBox.setReadOnly(inProgress);
 }
Example #8
0
 private void setOutputPathChangeEnabled(final boolean enabled) {
   if (output != null && enabled != outputPathChangeEnabled) {
     outputPathChangeEnabled = enabled;
     if (!outputPathChangeEnabled) {
       outputPathUserSpecified = false;
     }
     output.setReadOnly(!enabled);
     // Update the output location, when changes are disabled, the field gets filled automatically
     updateOutputLocation();
   }
 }
Example #9
0
  /** Constructor. */
  public AddNewModuleView() {
    super();
    initWidget(BINDER.createAndBindUi(this));

    saveButton.setText(AdminConstants.SAVE_BUTTON);
    cancelButton.setText(AdminConstants.CANCEL_BUTTON);
    saveButton.setHeight(AdminConstants.BUTTON_HEIGHT);
    cancelButton.setHeight(AdminConstants.BUTTON_HEIGHT);
    dialogBox = new DialogBox();
    name.setReadOnly(false);
    validateNameTextBox = new ValidatableWidget<TextBox>(name);

    validateNameTextBox
        .getWidget()
        .addValueChangeHandler(
            new ValueChangeHandler<String>() {

              @Override
              public void onValueChange(ValueChangeEvent<String> arg0) {
                validateNameTextBox.toggleValidDateBox();
              }
            });
    validateNameTextBox.addValidator(new EmptyStringValidator(name));
    validateDescTextBox = new ValidatableWidget<TextBox>(description);
    validateDescTextBox
        .getWidget()
        .addValueChangeHandler(
            new ValueChangeHandler<String>() {

              @Override
              public void onValueChange(ValueChangeEvent<String> event) {
                validateDescTextBox.toggleValidDateBox();
              }
            });
    validateDescTextBox.addValidator(new EmptyStringValidator(description));

    addNewModuleViewPanel.setSpacing(BatchClassManagementConstants.FIVE);

    nameLabel.setText(AdminConstants.NAME);
    descLabel.setText(AdminConstants.DESCRIPTION);

    descStar.setText(AdminConstants.STAR);
    nameStar.setText(AdminConstants.STAR);

    nameLabel.setStyleName(AdminConstants.BOLD_TEXT_STYLE);
    descLabel.setStyleName(AdminConstants.BOLD_TEXT_STYLE);

    descStar.setStyleName(AdminConstants.FONT_RED_STYLE);
    nameStar.setStyleName(AdminConstants.FONT_RED_STYLE);
    addNewModuleViewButtonsPanel.setSpacing(BatchClassManagementConstants.TEN);
  }
  @Override
  public Widget createWidget() {
    container.setStyleName("fill-layout");

    OneToOneLayout panel =
        new OneToOneLayout()
            .setTitle("JSM Policy")
            .setHeadline("JSM Policy of the server")
            .setDescription("Java Security Manager policy file used on this server.")
            .setMaster("Policy of the server", container);

    textBoxName.setReadOnly(true);
    container.add(textBoxName);

    textAreaContent.setReadOnly(true);
    textAreaContent.setHeight("200px");
    container.add(textAreaContent);

    return panel.build();
  }
Example #11
0
  /** Creates the gui. */
  private void createGUI() {

    if (editlogin == null) {
      setText(M.users.menuAddUser());
    } else {
      setText(M.users.titleEditUser());
    }
    setAnimationEnabled(true);
    setGlassEnabled(true);

    String addText = M.users.btnAdd();
    if (editlogin != null) {
      addText = M.users.btnUpdate();
    }
    Button btnAdd = new Button(addText);

    btnAdd.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            if (editlogin == null) {
              createUser();
            } else {
              updateUser();
            }
          }
        });

    Button btnCancel = new Button(M.users.btnCancel());
    btnCancel.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            EditUserDialog.this.hide();
          }
        });

    VerticalPanel vpanel = new VerticalPanel();
    // vpanel.setWidth("400px");

    FlexTable layout = new FlexTable();
    layout.setCellSpacing(6);

    layout.setHTML(0, 0, M.users.fullName());
    name = new TextBox();
    name.setText(user.getUsername());
    layout.setWidget(0, 1, name);

    layout.setHTML(1, 0, M.users.login());
    login = new TextBox();
    login.setText(user.getLogin());
    if (editlogin != null) {
      login.setReadOnly(true);
    }
    layout.setWidget(1, 1, login);

    layout.setHTML(2, 0, M.users.password());
    password = new TextBox();
    password.setText("");
    layout.setWidget(2, 1, password);

    layout.setHTML(3, 0, M.users.isactive());
    isactive = new CheckBox();
    isactive.setValue(user.isActive());
    layout.setWidget(3, 1, isactive);

    layout.setHTML(4, 0, M.users.access());

    UserRole role = user.getUserrole();

    FlexTable access = new FlexTable();
    access.setCellSpacing(6);

    access.setHTML(0, 0, M.users.isadmin());
    isadmin = new CheckBox();
    isadmin.setValue(role.isAdmin());
    access.setWidget(0, 1, isadmin);

    access.setHTML(1, 0, M.users.isdocuments());
    isdocuments = new CheckBox();
    isdocuments.setValue(role.isDocuments());
    access.setWidget(1, 1, isdocuments);

    access.setHTML(2, 0, M.users.isfinances());
    isfinances = new CheckBox();
    isfinances.setValue(role.isFinances());
    access.setWidget(2, 1, isfinances);

    access.setHTML(3, 0, M.users.ismanager());
    ismanager = new CheckBox();
    ismanager.setValue(role.isManager());
    access.setWidget(3, 1, ismanager);

    layout.setWidget(4, 1, access);

    vpanel.add(layout);

    HorizontalPanel buttons = new HorizontalPanel();
    buttons.setWidth("100%");
    buttons.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);

    HorizontalPanel bcontainer = new HorizontalPanel();
    bcontainer.add(btnAdd);
    bcontainer.add(btnCancel);
    bcontainer.setSpacing(5);
    buttons.add(bcontainer);

    vpanel.add(buttons);

    setWidget(vpanel);
    /*
     * setPopupPosition( (Ballance_autosauler_net.mainpanel.getOffsetWidth()
     * / 2 - 200), 100);
     */
    show();
  }
 private void coursePanelVisiblity(boolean isVisible) {
   createCourseBtn.setVisible(!isVisible);
   scoreTextBox.setReadOnly(!isVisible);
   coursePanel.setVisible(isVisible);
   saveEnabled(false);
 }
 public void setReadOnly(boolean readOnly) {
   textBox.setReadOnly(readOnly);
 }