public LoginViewImpl() {
    VerticalPanel vp = new VerticalPanel();
    this.initWidget(vp);
    vp.setSize("100%", "100%");
    FlexTable grid = new FlexTable();
    grid.setStyleName(Adicionais.RESOURCES.css().login());

    Label loginLabel = new Label("Login:"******"Senha:");
    this.passwordTextBox = new PasswordTextBox();
    this.accessButton = new Button("Acessar");
    this.accessButton.setWidth("5em");

    grid.setCellSpacing(6);
    grid.setWidget(0, 0, loginLabel);
    grid.setWidget(0, 1, this.loginTextBox);
    grid.setWidget(1, 0, passwordLabel);
    grid.setWidget(1, 1, this.passwordTextBox);
    grid.setWidget(2, 0, accessButton);
    grid.getFlexCellFormatter().setColSpan(2, 0, 2);
    grid.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);

    vp.add(grid);
    vp.setCellVerticalAlignment(grid, HasVerticalAlignment.ALIGN_MIDDLE);
    vp.setCellHorizontalAlignment(grid, HasHorizontalAlignment.ALIGN_CENTER);
    this.setSize("100%", "100%");
  }
 @UiConstructor
 public IstogramWidget() {
   istogramHeight = 0;
   int paddingTop = 0;
   String potStr = "";
   String achStr = "";
   VerticalPanel vp = new VerticalPanel();
   DrawingArea canvas = new DrawingArea(AREAWIDTH, AREAHEIGTH);
   bluRect =
       new Rectangle(CANVASMARGINLEFT, paddingTop + CANVASMARGINTOP, CANVASWIDTH, istogramHeight);
   bluRect.setFillColor(CANVASCOLORBLUE);
   bluRect.setStrokeWidth(0);
   bluRect.setRoundedCorners(1);
   greenRect = new Rectangle(CANVASMARGINLEFT, paddingTop + CANVASMARGINTOP, CANVASWIDTH, 0);
   greenRect.setFillColor(CANVASCOLORGREEN);
   greenRect.setStrokeWidth(0);
   greenRect.setRoundedCorners(1);
   potText = new Text(getTextPosition(potStr), paddingTop + TEXTSIZE, potStr);
   potText.setFillColor(POTTEXTCOLOR);
   potText.setFontSize(TEXTSIZE);
   potText.setStrokeColor(POTTEXTCOLOR);
   potText.setFontFamily(TEXTFONTFAMILY);
   potText.setStrokeWidth(0);
   achText =
       new Text(
           getTextPosition(achStr),
           paddingTop + CANVASMARGINTOP + (istogramHeight + TEXTSIZE / 2) / 2,
           achStr);
   achText.setFillColor(ACHTEXTCOLOR);
   achText.setFontSize(TEXTSIZE);
   achText.setStrokeColor(ACHTEXTCOLOR);
   achText.setStrokeWidth(0);
   achText.setFontFamily(TEXTFONTFAMILY);
   productName = new HTML();
   productName.setHeight("52px");
   vp.add(productName);
   vp.add(canvas);
   vp.setCellHorizontalAlignment(productName, HasHorizontalAlignment.ALIGN_CENTER);
   vp.setCellVerticalAlignment(productName, HasVerticalAlignment.ALIGN_TOP);
   vp.setCellVerticalAlignment(canvas, HasVerticalAlignment.ALIGN_BOTTOM);
   canvas.add(bluRect);
   canvas.add(greenRect);
   canvas.add(potText);
   canvas.add(achText);
   initWidget(vp);
 }
Exemple #3
0
 public void showLoading() {
   clearLoading();
   LoadingDialog sayLoading = new LoadingDialog();
   tbPanel.add(sayLoading);
   tbPanel.setCellHorizontalAlignment(sayLoading, HasHorizontalAlignment.ALIGN_CENTER);
   tbPanel.setCellVerticalAlignment(sayLoading, HasVerticalAlignment.ALIGN_MIDDLE);
   tbPanel.setCellHeight(sayLoading, "100%");
   tbPanel.setCellWidth(sayLoading, "100%");
 }
Exemple #4
0
  public Category() {

    VerticalPanel verPanel = new VerticalPanel();
    initWidget(verPanel);
    verPanel.setSize("100%", "100%");

    FlexTable flexTable = new FlexTable();
    verPanel.add(flexTable);
    verPanel.setCellVerticalAlignment(flexTable, HasVerticalAlignment.ALIGN_MIDDLE);
    verPanel.setCellHorizontalAlignment(flexTable, HasHorizontalAlignment.ALIGN_CENTER);
    flexTable.setSize("20%", "20%");

    Label lblCategoryName = new Label("CategoryName");
    flexTable.setWidget(0, 0, lblCategoryName);

    TextBox txtCatgegoryName = new TextBox();
    flexTable.setWidget(0, 1, txtCatgegoryName);

    Label lblCategoryDescription = new Label("CategoryDescription");
    flexTable.setWidget(1, 0, lblCategoryDescription);

    TextBox txtCategoryDescription = new TextBox();
    flexTable.setWidget(1, 1, txtCategoryDescription);

    CheckBox isParentCategory = new CheckBox();
    isParentCategory.setName("isParentCategory");
    flexTable.setWidget(2, 1, isParentCategory);

    Label lblIsParentCategory = new Label("ParentCategory");
    flexTable.setWidget(2, 0, lblIsParentCategory);

    TextButton buttonCreateCategory = new TextButton("Create");
    flexTable.setWidget(3, 1, buttonCreateCategory);

    flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    flexTable.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    flexTable.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    flexTable.getCellFormatter().setHorizontalAlignment(3, 1, HasHorizontalAlignment.ALIGN_CENTER);
  }
  /** Main class */
  public void onModuleLoad() {

    // basic settings
    session.setUiElements(new UiElements(null));

    // Get web page's BODY
    RootLayoutPanel body = RootLayoutPanel.get();

    // check RPC url
    if (session.getRpcUrl().isEmpty()) {
      VerticalPanel bodyContents = new VerticalPanel();
      bodyContents.setSize("100%", "300px");
      bodyContents.add(
          new HTML(new Image(LargeIcons.INSTANCE.errorIcon()) + "<h2>RPC SERVER NOT FOUND!</h2>"));
      bodyContents.setCellHorizontalAlignment(
          bodyContents.getWidget(0), HasHorizontalAlignment.ALIGN_CENTER);
      bodyContents.setCellVerticalAlignment(
          bodyContents.getWidget(0), HasVerticalAlignment.ALIGN_BOTTOM);
      body.add(bodyContents);
      return;
    }

    // WEB PAGE SPLITTER
    body.add(bodySplitter);

    // left menu
    leftMenu = new ApplicationFormLeftMenu();

    // show loading box
    loadingBox = session.getUiElements().perunLoadingBox();
    loadingBox.show();

    // switch menu event
    JsonCallbackEvents events =
        new JsonCallbackEvents() {
          @Override
          public void onFinished(JavaScriptObject jso) {

            bodySplitter.clear();
            bodySplitter.addSouth(getFooter(), 23);
            ArrayList<Application> apps = JsonUtils.jsoAsList(jso);
            if (apps != null && !apps.isEmpty()) {
              // show menu
              bodySplitter.addWest(leftMenu, 280);
            }
            // else don't show menu
            // MAIN CONTENT
            contentPanel.setSize("100%", "100%");
            contentPanel.add(leftMenu.getContent());
            bodySplitter.add(contentPanel);

            // Append more GUI elements from UiElements class which are not part of splitted design
            // WE DON'T WANT TO CONFUSE USER WITH STATUS MESSAGES
            // bodySplitter.getElement().appendChild(session.getUiElements().getStatus().getElement()); // status

            // starts loading
            isUserMemberOfVo();

            // hides the loading box
            loadingBox.hide();
          }

          @Override
          public void onError(PerunError error) {
            // MAIN CONTENT

            bodySplitter.clear();
            bodySplitter.addSouth(getFooter(), 23);
            contentPanel.clear();
            contentPanel.setSize("100%", "100%");
            contentPanel.add(leftMenu.getContent());
            bodySplitter.add(contentPanel);

            // Append more GUI elements from UiElements class which are not part of splitted design
            // bodySplitter.getElement().appendChild(session.getUiElements().getStatus().getElement()); // status

            // starts loading
            isUserMemberOfVo();

            // hides the loading box
            loadingBox.hide();
          }
        };

    // load VO to check if exists
    loadVo(events);
  }
  public DialogListaPontoEncontro(
      final InfoCaronaServerAsync controller, final String idSessao, final String idCarona) {
    novosPontos = "";
    listaNovosPontosEncontros = new ArrayList<InfoPontoEncontro>();
    this.idCarona = idCarona;
    this.controller = controller;

    setText("Pontos de Encontro - ID: " + idCarona);
    setAnimationEnabled(true);
    setGlassEnabled(true);
    center();

    VerticalPanel panelListaPontoEncontro = new VerticalPanel();
    tabelaPontoEncontro = new CellTable<InfoPontoEncontro>();
    tabelaPontoEncontro.setWidth("400px");
    dataProvider = new ListDataProvider<InfoPontoEncontro>();

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(tabelaPontoEncontro);
    pager.setPageSize(5);

    TextColumn<InfoPontoEncontro> colunaIdPontoEncontro =
        new TextColumn<InfoPontoEncontro>() {
          @Override
          public String getValue(InfoPontoEncontro pontoEncontro) {
            return pontoEncontro.getIdPontoEncontro();
          }
        };

    TextColumn<InfoPontoEncontro> colunaPontosEncontro =
        new TextColumn<InfoPontoEncontro>() {
          @Override
          public String getValue(InfoPontoEncontro pontoEncontro) {
            return pontoEncontro.getPontoEncontro();
          }
        };

    tabelaPontoEncontro.addColumn(colunaPontosEncontro, "Pontos de Encontro");
    listaPontoEncontros = new ArrayList<InfoPontoEncontro>();
    populaTabela();

    HorizontalPanel hPanel01 = new HorizontalPanel();
    final TextBox boxNovoPontoEncontro = new TextBox();
    boxNovoPontoEncontro.setWidth("200px");
    boxNovoPontoEncontro.setStyleName("boxModificada");

    Button buttonAdicionarOutroPontoEncontro = new Button();
    buttonAdicionarOutroPontoEncontro.setStyleName("botaoModificado");
    buttonAdicionarOutroPontoEncontro.setTitle("Adicionar Sugestão");
    buttonAdicionarOutroPontoEncontro.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (boxNovoPontoEncontro.getText().trim().equals("")) {
              DialogMensagemUsuario dialogErro =
                  new DialogMensagemUsuario("Falhou", "Ponto de Encontro Inválido");
              dialogErro.show();
            } else {
              novosPontos += boxNovoPontoEncontro.getText().trim() + ";";
              InfoPontoEncontro novoPontoEncontro =
                  new InfoPontoEncontro("00", boxNovoPontoEncontro.getText().trim());
              boxNovoPontoEncontro.setText("");

              listaNovosPontosEncontros.add(novoPontoEncontro);
              listaPontoEncontros = new ArrayList<InfoPontoEncontro>();

              for (InfoPontoEncontro novoPonto : listaNovosPontosEncontros) {
                listaPontoEncontros.add(novoPonto);
              }

              populaTabela();
            }
          }
        });

    Image imageFiltro = new Image("imagens/adicionar.png");
    imageFiltro.setSize("15px", "15px");
    buttonAdicionarOutroPontoEncontro.getElement().appendChild(imageFiltro.getElement());

    Button buttonSalvarNovosPontos = new Button("Salvar");
    buttonSalvarNovosPontos.setStyleName("botaoModificado");
    buttonSalvarNovosPontos.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            controller.cadastrarNovosPontosEncontro(
                idSessao,
                idCarona,
                novosPontos,
                new AsyncCallback<String>() {

                  @Override
                  public void onFailure(Throwable caught) {
                    DialogMensagemUsuario dialogSucess =
                        new DialogMensagemUsuario("Erro", caught.getMessage());
                    dialogSucess.show();
                  }

                  @Override
                  public void onSuccess(String result) {
                    DialogMensagemUsuario dialogSucess =
                        new DialogMensagemUsuario(
                            "ID: " + result, "Pontos de Encontro Cadastrados com Sucesso!");
                    dialogSucess.show();
                    hide();
                  }
                });
          }
        });

    Button buttonFechar = new Button("Fechar");
    buttonFechar.setStyleName("botaoModificado");

    buttonFechar.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            hide();
          }
        });

    colunaPontosEncontro.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);

    hPanel01.setCellVerticalAlignment(boxNovoPontoEncontro, HasVerticalAlignment.ALIGN_BOTTOM);
    hPanel01.setCellVerticalAlignment(buttonSalvarNovosPontos, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellVerticalAlignment(
        buttonAdicionarOutroPontoEncontro, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellVerticalAlignment(buttonFechar, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellHorizontalAlignment(boxNovoPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(
        buttonSalvarNovosPontos, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(
        buttonAdicionarOutroPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(buttonFechar, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setWidth("100%");
    hPanel01.setSpacing(6);

    hPanel01.add(boxNovoPontoEncontro);
    hPanel01.add(buttonAdicionarOutroPontoEncontro);
    hPanel01.add(buttonSalvarNovosPontos);
    hPanel01.add(buttonFechar);

    panelListaPontoEncontro.add(tabelaPontoEncontro);
    panelListaPontoEncontro.add(pager);
    panelListaPontoEncontro.add(hPanel01);

    panelListaPontoEncontro.setCellVerticalAlignment(
        tabelaPontoEncontro, HasVerticalAlignment.ALIGN_MIDDLE);
    panelListaPontoEncontro.setCellVerticalAlignment(pager, HasVerticalAlignment.ALIGN_MIDDLE);

    panelListaPontoEncontro.setCellHorizontalAlignment(
        tabelaPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    panelListaPontoEncontro.setCellHorizontalAlignment(pager, HasHorizontalAlignment.ALIGN_CENTER);
    panelListaPontoEncontro.setSpacing(8);

    setWidget(panelListaPontoEncontro);
  }
Exemple #7
0
  private void initLayout() {

    table = new FlexTable();
    table.setWidth("100%");

    HTML conceptLab = new HTML(constants.exportConcept());
    HTML exportLab = new HTML(constants.exportFormat());
    HTML schemeLab = new HTML(constants.exportScheme());
    HTML dateLab = new HTML(constants.exportDate());
    HTML termCodeLab = new HTML(constants.exportTermCode());

    conceptLab.setWordWrap(false);
    exportLab.setWordWrap(false);
    schemeLab.setWordWrap(false);
    dateLab.setWordWrap(false);
    termCodeLab.setWordWrap(false);

    table.setWidget(0, 0, schemeLab);
    table.setWidget(0, 1, getScheme());
    table.setWidget(1, 0, conceptLab);
    table.setWidget(1, 1, getConcept());
    table.setWidget(2, 0, exportLab);
    table.setWidget(2, 1, getExportFormat());
    // table.setWidget(3, 0, termCodeLab);
    // table.setWidget(3, 1, getTermCode());
    // table.setWidget(4, 0, dateLab);
    // table.setWidget(4, 1, getDatePanel());

    table.getColumnFormatter().setWidth(0, "15%");
    table.getColumnFormatter().setWidth(1, "75%");

    final VerticalPanel exportOption = new VerticalPanel();
    exportOption.setSize("100%", "100%");
    exportOption.add(GridStyle.setTableRowStyle(table, "#F4F4F4", "#E8E8E8", 3));

    final Button export = new Button(constants.exportButton());
    final CheckBox chkZip = new CheckBox(constants.exportUseZip());

    HorizontalPanel bottombar = new HorizontalPanel();
    bottombar.setSpacing(5);
    bottombar.add(chkZip);
    bottombar.add(export);
    bottombar.setSize("100%", "100%");
    bottombar.setStyleName("bottombar");
    bottombar.setCellHorizontalAlignment(chkZip, HasHorizontalAlignment.ALIGN_LEFT);
    bottombar.setCellHorizontalAlignment(export, HasHorizontalAlignment.ALIGN_RIGHT);
    bottombar.setCellVerticalAlignment(export, HasVerticalAlignment.ALIGN_MIDDLE);

    // ButtonbarWidget bottomBarPanel = new ButtonbarWidget(null, bottombar);

    /*ld.setSize("100%", "100%");
    spacer.setSize("100%", "100%");
    spacer.setCellHorizontalAlignment(ld, HasHorizontalAlignment.ALIGN_CENTER);
    spacer.setCellVerticalAlignment(ld, HasVerticalAlignment.ALIGN_MIDDLE);

     Window.addResizeHandler(new ResizeHandler()
        {
        	public void onResize(ResizeEvent event) {
        		spacer.setSize("100%", "100%");
    		}
    	});*/

    VerticalPanel optionPanel = new VerticalPanel();
    optionPanel.setSize("100%", "100%");
    optionPanel.setStyleName("borderbar");
    optionPanel.add(exportOption);
    // optionPanel.add(spacer);
    optionPanel.add(bottombar);
    // optionPanel.setCellHeight(spacer, "100%");
    optionPanel.setCellVerticalAlignment(exportOption, HasVerticalAlignment.ALIGN_TOP);
    optionPanel.setCellVerticalAlignment(bottombar, HasVerticalAlignment.ALIGN_BOTTOM);

    HorizontalPanel langPanel = new HorizontalPanel();
    /*Image img = new Image("images/map-grey.gif");
    final Label lang = new Label(constants.exportSelectLang());
    lang.setSize("150", "100%");
    lang.setStyleName("displayexportLang");
    lang.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    lang.addClickHandler(new ClickHandler() {
    	public void onClick(ClickEvent event) {
    		if(selectLanguage == null || !selectLanguage.isLoaded)
    			selectLanguage = new SelectLanguage();
    		selectLanguage.show();
    	}
    });

    langPanel.setSize("10%", "100%");
    langPanel.add(img);
    langPanel.add(new HTML("&nbsp;"));
    langPanel.add(lang);
    langPanel.add(new HTML("&nbsp;"));
    langPanel.add(new HTML("&nbsp;"));
    langPanel.setCellWidth(lang, "100%");
    langPanel.setCellHeight(lang, "100%");
    langPanel.setCellVerticalAlignment(img, HasVerticalAlignment.ALIGN_MIDDLE);
    langPanel.setCellVerticalAlignment(lang, HasVerticalAlignment.ALIGN_MIDDLE);
    langPanel.setCellHorizontalAlignment(lang, HasHorizontalAlignment.ALIGN_RIGHT);
    langPanel.setSpacing(1);*/

    VerticalPanel tempmainPanel = new VerticalPanel();
    tempmainPanel.setSpacing(10);
    tempmainPanel.add(optionPanel);

    BodyPanel mainPanel = new BodyPanel(constants.exportTitle(), tempmainPanel, langPanel);

    mainBodypanel.setSize("100%", "100%");
    mainBodypanel.add(mainPanel);
    mainBodypanel.setCellHorizontalAlignment(mainPanel, HasHorizontalAlignment.ALIGN_CENTER);
    mainBodypanel.setCellVerticalAlignment(mainPanel, HasVerticalAlignment.ALIGN_TOP);
    mainBodypanel.setCellWidth(mainPanel, "100%");
    mainBodypanel.setCellHeight(mainPanel, "100%");

    panel.clear();
    panel.setSize("100%", "100%");
    panel.add(mainBodypanel);
    panel.add(loadingDialog);
    panel.setCellHorizontalAlignment(mainPanel, HasHorizontalAlignment.ALIGN_CENTER);
    panel.setCellVerticalAlignment(mainPanel, HasVerticalAlignment.ALIGN_TOP);
    showLoading(false);

    // =================

    export.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            if (!format.getValue((format.getSelectedIndex())).equals("")
                && !format.getValue(format.getSelectedIndex()).equals("--None--")) {
              exp.setFormat(format.getValue(format.getSelectedIndex()));
            } else {
              exp.setFormat(null);
            }
            String expformat = exp.getFormat();
            if (expformat == null || expformat.equals("")) {
              Window.alert(constants.exportSelectFormat());
            } else if (exp.getStartDate() != null || exp.getEndDate() != null) {
              if (exp.getStartDate() == null || exp.getEndDate() == null) {
                Window.alert(constants.exportSelectDateRange());
              }
            } else {
              showLoading(true);
              exp.setExpLanguage(userSelectedLanguage);
              exp.setTermCode(termCodeBox.getValue().equals("") ? null : termCodeBox.getValue());

              AsyncCallback<String> callback =
                  new AsyncCallback<String>() {
                    public void onSuccess(String key) {
                      String formattype = format.getValue(format.getSelectedIndex());

                      String filename =
                          "export_"
                              + formattype.toLowerCase()
                              + "_"
                              + DateTimeFormat.getFormat("ddMMyyyyhhmmss").format(new Date());

                      if (formattype.equals(ExportFormat.SKOS)
                          || formattype.equals(ExportFormat.SKOSXL)) filename += ".rdf";
                      else if (formattype.equals(ExportFormat.TBX)) filename += ".tbx";
                      else if (formattype.equals(ExportFormat.OWL_SIMPLE_FORMAT))
                        filename += ".owl";
                      else if (formattype.equals(ExportFormat.OWL_COMPLETE_FORMAT))
                        filename += ".owl";
                      else if (formattype.equals(ExportFormat.RDBMS_SQL_FORMAT)) filename += ".sql";

                      Window.open(
                          GWT.getHostPageBaseURL()
                              + "downloadExportData?filename="
                              + filename
                              + "&key="
                              + key
                              + "&size="
                              + ConfigConstants.ZIPSIZE
                              + "&forcezip="
                              + chkZip.getValue(),
                          "_download",
                          "");
                      showLoading(false);
                    }

                    public void onFailure(Throwable caught) {
                      showLoading(false);
                      ExceptionManager.showException(caught, constants.exportDataFail());
                    }
                  };
              Service.exportService.export(exp, MainApp.userId, 74, MainApp.userOntology, callback);
            }
          }
        });
  }
  public FindFolderSelectPopup() {
    // Establishes auto-close when click outside
    super(false, true);

    status = new Status();
    status.setStyleName("okm-StatusPopup");

    vPanel = new VerticalPanel();
    vPanel.setWidth("700");
    vPanel.setHeight("350");
    hPanel = new HorizontalPanel();

    scrollFolderPanel = new ScrollPanel();
    scrollFolderPanel.setStyleName("okm-Popup-text");

    cancelButton =
        new Button(
            Main.i18n("button.close"),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                hide();
              }
            });

    actionButton =
        new Button(
            Main.i18n("search.result.menu.go.folder"),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                CommonUI.openPath(folderTable.getText(selectedRow, 1), "");
                hide();
              }
            });

    keyword = new TextBox();
    keyword.setWidth("692");
    keyword.addKeyUpHandler(
        new KeyUpHandler() {
          @Override
          public void onKeyUp(KeyUpEvent event) {
            if (keyword.getText().length() >= 3) {
              GWTQueryParams gwtParams = new GWTQueryParams();
              int actualView = Main.get().mainPanel.desktop.navigator.stackPanel.getStackIndex();

              switch (actualView) {
                case UIDesktopConstants.NAVIGATOR_TAXONOMY:
                  gwtParams.setPath(Main.get().taxonomyRootFolder.getPath());
                  break;
                case UIDesktopConstants.NAVIGATOR_TEMPLATES:
                  gwtParams.setPath(Main.get().templatesRootFolder.getPath());
                  break;
                case UIDesktopConstants.NAVIGATOR_PERSONAL:
                  gwtParams.setPath(Main.get().personalRootFolder.getPath());
                  break;
                case UIDesktopConstants.NAVIGATOR_MAIL:
                  gwtParams.setPath(Main.get().mailRootFolder.getPath());
                  break;
                case UIDesktopConstants.NAVIGATOR_TRASH:
                  gwtParams.setPath(Main.get().trashRootFolder.getPath());
                  break;
              }

              gwtParams.setMimeType("");
              gwtParams.setKeywords("");
              gwtParams.setMimeType("");
              gwtParams.setName(keyword.getText() + "*"); // add wildcard at ends
              gwtParams.setAuthor("");
              gwtParams.setMailFrom("");
              gwtParams.setMailTo("");
              gwtParams.setMailSubject("");
              gwtParams.setOperator(GWTQueryParams.OPERATOR_AND);
              gwtParams.setLastModifiedFrom(null);
              gwtParams.setLastModifiedTo(null);
              gwtParams.setDomain(GWTQueryParams.FOLDER);
              gwtParams.setProperties(new HashMap<String, GWTPropertyParams>());
              find(gwtParams);
            } else {
              removeAllRows();
            }
          }
        });

    folderTable = new FlexTable();
    folderTable.setWidth("100%");
    folderTable.setCellPadding(2);
    folderTable.setCellSpacing(0);

    folderTable.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            markSelectedRow(folderTable.getCellForEvent(event).getRowIndex());
            evaluateEnableAction();
          }
        });

    folderTable.addDoubleClickHandler(
        new DoubleClickHandler() {
          @Override
          public void onDoubleClick(DoubleClickEvent event) {
            CommonUI.openPath(folderTable.getText(selectedRow, 1), "");
            hide();
          }
        });

    scrollFolderPanel.add(folderTable);
    scrollFolderPanel.setPixelSize(690, 300);

    vPanel.add(keyword);
    vPanel.add(scrollFolderPanel);
    vPanel.add(new HTML("<br>"));
    hPanel.add(cancelButton);
    HTML space = new HTML();
    space.setWidth("50");
    hPanel.add(space);
    hPanel.add(actionButton);
    vPanel.add(hPanel);
    vPanel.add(new HTML("<br>"));

    vPanel.setCellHorizontalAlignment(keyword, HasAlignment.ALIGN_CENTER);
    vPanel.setCellVerticalAlignment(keyword, HasAlignment.ALIGN_MIDDLE);
    vPanel.setCellHorizontalAlignment(scrollFolderPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(hPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHeight(keyword, "25");
    vPanel.setCellHeight(scrollFolderPanel, "300");

    cancelButton.setStyleName("okm-NoButton");
    actionButton.setStyleName("okm-YesButton");
    folderTable.setStyleName("okm-NoWrap");
    folderTable.addStyleName("okm-Table-Row");
    keyword.setStyleName("okm-Input");

    super.hide();
    setWidget(vPanel);
  }