コード例 #1
0
 private void create(final String id) {
   dialog
       .getTitleText()
       .setText(
           i18n.t(
               searchOnlyUsers
                   ? "Type the name of the user and select him/her:"
                   : "Type the name of the user or group and select it:"),
           i18n.getDirection());
   final MultivalueSuggestBox multivalueSBox =
       SearchBoxFactory.create(i18n, searchOnlyUsers, true, id, callback);
   suggestBox = multivalueSBox.getSuggestBox();
   searchTextBox = suggestBox.getTextBox();
   dialog.getInnerPanel().add(multivalueSBox);
   setTextSearchSmallImpl();
 }
コード例 #2
0
 public EntitySearchPanel(final CoreResources img, final I18nUITranslationService i18n) {
   this.i18n = i18n;
   dialog =
       new BasicTopDialog.Builder(DIALOG_ID, false, true, i18n.getDirection())
           .autoscroll(false)
           .firstButtonId(OK_ID)
           .tabIndexStart(1)
           .build();
   dialog.setFirstBtnText(i18n.t("Close"));
   dialog.setSecondBtnVisible(false);
   dialog
       .getFirstBtn()
       .addClickHandler(
           new ClickHandler() {
             @Override
             public void onClick(final ClickEvent event) {
               dialog.hide();
             }
           });
 }