Example usage for com.vaadin.ui VerticalLayout setSizeFull

List of usage examples for com.vaadin.ui VerticalLayout setSizeFull

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout setSizeFull.

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:edu.cornell.qatarmed.planrnaseq.PlanRNAseq.java

private void initLayout() {

    /* Root of the user interface component tree is set */
    HorizontalSplitPanel splitPanel = new HorizontalSplitPanel();
    setContent(splitPanel);/*from   ww  w  . java  2s.  com*/

    /* Build the component tree */
    VerticalLayout leftLayout = new VerticalLayout();
    VerticalLayout rightLayout = new VerticalLayout();

    splitPanel.addComponent(leftLayout);
    splitPanel.addComponent(rightLayout);

    //make form asking parameters and add it to leftLaayout
    VerticalLayout formLayout = new VerticalLayout();
    TextField studyName = new TextField("Name of RNAseq Study");
    formLayout.addComponent(studyName);
    List replist = new ArrayList();
    ComboBox numReplicates = new ComboBox("Replicates", replist);
    formLayout.addComponent(numReplicates);
    leftLayout.addComponent(formLayout);
    /* Set the contents in the left of the split panel to use all the space */
    leftLayout.setSizeFull();

    VerticalLayout resultLayout = new VerticalLayout();
    rightLayout.addComponent(resultLayout);
    VerticalLayout chartLayout = new VerticalLayout();
    rightLayout.addComponent(chartLayout);

    chartLayout.setVisible(false);

}

From source file:edu.cornell.qatarmed.planrnaseq.SimpleLoginView.java

public SimpleLoginView() {
    setSizeFull();/* w w  w.  j a  va 2s. co  m*/

    // Create the user input field
    user = new TextField("User:");
    user.setWidth("300px");
    user.setRequired(true);
    user.setInputPrompt("Your username (eg. joe@email.com)");
    user.addValidator(new EmailValidator("Username must be an email address"));
    user.setInvalidAllowed(false);

    // Create the password input field
    password = new PasswordField("Password:");
    password.setWidth("300px");
    password.addValidator(new PasswordValidator());
    password.setRequired(true);
    password.setValue("");
    password.setNullRepresentation("");

    // Create login button
    loginButton = new Button("Login", this);

    // Add both to a panel
    VerticalLayout fields = new VerticalLayout(user, password, loginButton);
    fields.setCaption("Please login to access the application. (test@test.com/passw0rd)");
    fields.setSpacing(true);
    fields.setMargin(new MarginInfo(true, true, true, false));
    fields.setSizeUndefined();

    // The view root layout
    VerticalLayout viewLayout = new VerticalLayout(fields);
    viewLayout.setSizeFull();
    viewLayout.setComponentAlignment(fields, Alignment.MIDDLE_CENTER);
    viewLayout.setStyleName(Reindeer.LAYOUT_BLUE);
    setCompositionRoot(viewLayout);
}

From source file:edu.kit.dama.ui.admin.administration.user.MembershipRoleEditorWindow.java

License:Apache License

/**
 * Get the main layout./*w  w  w .j a  v a2 s. c om*/
 *
 * @return The main layout.
 */
private GridLayout getMainLayout() {
    if (mainPanel == null) {
        String id = "mainPanel";
        LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ...");

        UIUtils7.GridLayoutBuilder builder = new UIUtils7.GridLayoutBuilder(2, 2);

        builder.addComponent(getMembershipsTable(), 0, 0);
        Label l = new Label(
                "To update the membership role of the selected group(s) select the new role below and click <i>'Apply New Role'</i>. The new role is limited by the user's maximum role.",
                ContentMode.HTML);
        Label spacer = new Label("<br/>", ContentMode.HTML);

        Button closeButton = new Button("Close");
        closeButton.addClickListener((event) -> {
            close();
        });

        VerticalLayout actionLayout = new VerticalLayout(l, spacer, getRoleComboBox(), getCommitChangeButton());
        actionLayout.setComponentAlignment(l, Alignment.TOP_CENTER);
        actionLayout.setComponentAlignment(getRoleComboBox(), Alignment.TOP_RIGHT);
        actionLayout.setComponentAlignment(getCommitChangeButton(), Alignment.TOP_RIGHT);
        actionLayout.setComponentAlignment(getCommitChangeButton(), Alignment.TOP_RIGHT);
        actionLayout.setSpacing(true);
        actionLayout.setSizeFull();

        builder.addComponent(actionLayout, 1, 0);
        builder.addComponent(closeButton, Alignment.BOTTOM_RIGHT, 1, 1, 1, 1);

        mainPanel = builder.getLayout();
        mainPanel.setId(DEBUG_ID_PREFIX + id);
        mainPanel.setSizeFull();

        mainPanel.setColumnExpandRatio(0, .7f);
        mainPanel.setColumnExpandRatio(1, .3f);
        mainPanel.setRowExpandRatio(0, .99f);
        mainPanel.setRowExpandRatio(1, .01f);
        mainPanel.setSpacing(true);
        mainPanel.setMargin(true);
        updateMainPanel();
    }
    return mainPanel;
}

From source file:edu.kit.dama.ui.admin.administration.usergroup.GroupMembershipEditorWindow.java

License:Apache License

private GridLayout getMainLayout() throws AuthorizationException, UnsupportedEnumException {
    if (mainPanel == null) {
        String id = "mainPanel";
        LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ...");
        UIUtils7.GridLayoutBuilder builder = new UIUtils7.GridLayoutBuilder(2, 2);
        //add table and exclude button
        builder.addComponent(getMembersTable(), 0, 0).addComponent(getExcludeMembersButton(),
                Alignment.BOTTOM_LEFT, 0, 1, 1, 1);

        Label l = new Label(
                "To add members select them in the list below and click <i>'Add Member(s)'</i>. To exclude members select them in the table and click <i>'Exclude Member(s)'</i>",
                ContentMode.HTML);

        Button closeButton = new Button("Close");
        closeButton.addClickListener((event) -> {
            close();/* www  .  ja va  2s. com*/
        });

        VerticalLayout actionLayout = new VerticalLayout(l, getUserSelector(), getAddMembersButton());
        actionLayout.setComponentAlignment(l, Alignment.TOP_CENTER);
        actionLayout.setComponentAlignment(getUserSelector(), Alignment.TOP_RIGHT);
        actionLayout.setComponentAlignment(getAddMembersButton(), Alignment.TOP_RIGHT);
        actionLayout.setExpandRatio(getUserSelector(), 1.0f);
        actionLayout.setSpacing(true);
        actionLayout.setSizeFull();

        builder.addComponent(actionLayout, 1, 0, 1, 1).addComponent(closeButton, Alignment.BOTTOM_RIGHT, 1, 1,
                1, 1);

        mainPanel = builder.getLayout();
        mainPanel.setId(DEBUG_ID_PREFIX + id);
        mainPanel.setSizeFull();

        mainPanel.setColumnExpandRatio(0, .7f);
        mainPanel.setColumnExpandRatio(1, .3f);
        mainPanel.setRowExpandRatio(0, .99f);
        mainPanel.setRowExpandRatio(1, .01f);
        mainPanel.setSpacing(true);
        mainPanel.setMargin(true);

        updateMainPanel();
    }
    return mainPanel;
}

From source file:edu.kit.dama.ui.commons.util.UIUtils7.java

License:Apache License

public static void openResourceSubWindow(File sourceFile) {
    boolean fileAccessible = sourceFile != null && sourceFile.exists() && sourceFile.canRead();

    // Set subwindow for displaying file resource
    final Window window = new Window(fileAccessible ? sourceFile.getName() : "Information");
    window.center();/*from www.j a  v  a  2s .  com*/
    // Set window layout
    VerticalLayout windowLayout = new VerticalLayout();
    windowLayout.setSizeFull();

    if (fileAccessible) {
        // Set resource that has to be embedded
        final Embedded resource = new Embedded(null, new FileResource(sourceFile));
        if ("application/octet-stream".equals(resource.getMimeType())) {
            window.setWidth("570px");
            window.setHeight("150px");
            windowLayout.setMargin(true);

            Label attentionNote = new Label(
                    "A file preview is not possible as the file type is not supported by your browser.");
            attentionNote.setContentMode(ContentMode.HTML);
            Link fileURL = new Link("Click here for downloading the file.", new FileResource(sourceFile));

            windowLayout.addComponent(attentionNote);
            windowLayout.addComponent(fileURL);
            windowLayout.setComponentAlignment(attentionNote, Alignment.MIDDLE_CENTER);
            windowLayout.setComponentAlignment(fileURL, Alignment.MIDDLE_CENTER);
        } else {
            window.setResizable(true);
            window.setWidth("800px");
            window.setHeight("500px");
            final Image image = new Image(null, new FileResource(sourceFile));
            image.setSizeFull();
            windowLayout.addComponent(image);
        }
    } else {
        //file is not accessible
        window.setWidth("570px");
        window.setHeight("150px");
        windowLayout.setMargin(true);
        Label attentionNote = new Label("Provided file cannot be accessed.");
        attentionNote.setContentMode(ContentMode.HTML);
        windowLayout.addComponent(attentionNote);
        windowLayout.setComponentAlignment(attentionNote, Alignment.MIDDLE_CENTER);
    }

    window.setContent(windowLayout);
    UI.getCurrent().addWindow(window);
}

From source file:edu.kit.dama.ui.repo.MyVaadinUI.java

License:Apache License

/**
 * Build the search view and execute the provided query immediately.
 *
 * @param pQuery The query to execute or null if an empty view should be
 * shown.//from www. j av a  2 s. co  m
 */
private void buildSearchView(String pQuery) {
    loginButton.setWidth("70px");
    loginButton.setStyleName(BaseTheme.BUTTON_LINK);
    logoutButton.setWidth("70px");
    logoutButton.setStyleName(BaseTheme.BUTTON_LINK);
    adminButton.setWidth("70px");
    adminButton.setStyleName(BaseTheme.BUTTON_LINK);

    logoutButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            loggedInUser = UserData.NO_USER;
            refreshMainLayout();
        }
    });

    adminButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            Page.getCurrent()
                    .open(DataManagerSettings.getSingleton().getStringProperty(
                            DataManagerSettings.GENERAL_BASE_URL_ID, "http://localhost:8889/BaReDemo")
                            + "/admin", "_blank");
        }
    });

    searchField = UIUtils7.factoryTextField(null, "Search for...");
    searchField.setWidth("920px");
    searchField.setHeight("60px");
    searchField.addStyleName("searchField");

    paginationPanel = new PaginationPanel(this);
    paginationPanel.setSizeFull();
    paginationPanel.setAllEntries(new LinkedList<DigitalObjectId>());

    searchProvider = new FulltextElasticSearchProvider(
            DataManagerSettings.getSingleton()
                    .getStringProperty(DataManagerSettings.ELASTIC_SEARCH_DEFAULT_CLUSTER_ID, "KITDataManager"),
            DataManagerSettings.getSingleton()
                    .getStringProperty(DataManagerSettings.ELASTIC_SEARCH_DEFAULT_HOST_ID, "localhost"),
            DataManagerSettings.getSingleton().getStringProperty(
                    DataManagerSettings.ELASTIC_SEARCH_DEFAULT_INDEX_ID,
                    ElasticsearchHelper.ELASTICSEARCH_TYPE),
            ElasticsearchHelper.ELASTICSEARCH_TYPE);
    NativeButton goButton = new NativeButton();
    goButton.setIcon(new ThemeResource("img/24x24/search.png"));
    goButton.setWidth("60px");
    goButton.setHeight("60px");
    goButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            doSearch();
        }
    });
    goButton.setClickShortcut(KeyCode.ENTER);

    setupLoginForm();
    loginForm.setWidth("320px");
    loginForm.setHeight("150px");
    final PopupView loginPopup = new PopupView(null, loginForm);
    loginPopup.setHideOnMouseOut(false);
    loginButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            //mainLayout.replaceComponent(searchLayout, loginForm);
            loginPopup.setPopupVisible(true);
        }
    });

    Label filler = new Label();
    memberLayout = new HorizontalLayout(filler, adminButton, loginButton, loginPopup);
    memberLayout.setComponentAlignment(loginButton, Alignment.TOP_RIGHT);
    memberLayout.setComponentAlignment(adminButton, Alignment.TOP_RIGHT);
    memberLayout.setComponentAlignment(loginPopup, Alignment.TOP_RIGHT);

    memberLayout.setExpandRatio(filler, 1.0f);
    memberLayout.setMargin(false);
    memberLayout.setSpacing(false);
    memberLayout.setWidth("100%");
    memberLayout.setHeight("30px");

    Label spacer = new Label("<hr/>", ContentMode.HTML);
    spacer.setHeight("20px");

    searchLayout = new UIUtils7.GridLayoutBuilder(3, 4)
            .addComponent(searchField, Alignment.TOP_LEFT, 0, 0, 2, 1)
            .addComponent(goButton, Alignment.TOP_RIGHT, 2, 0, 1, 1).fillRow(spacer, 0, 1, 1)
            .addComponent(paginationPanel, Alignment.MIDDLE_CENTER, 0, 2, 3, 2).getLayout();
    searchLayout.addStyleName("paper");
    searchLayout.setSpacing(true);
    searchLayout.setMargin(true);
    paginationPanel.setWidth("980px");
    //wrapper
    Label icon8Link = new Label("<a href=\"http://icons8.com\">Icons by icon8.com</a>", ContentMode.HTML);
    mainLayout = new VerticalLayout(memberLayout, searchLayout, icon8Link);
    mainLayout.setComponentAlignment(memberLayout, Alignment.TOP_CENTER);
    mainLayout.setComponentAlignment(searchLayout, Alignment.TOP_CENTER);
    mainLayout.setComponentAlignment(icon8Link, Alignment.BOTTOM_RIGHT);
    mainLayout.setExpandRatio(memberLayout, .05f);
    mainLayout.setExpandRatio(searchLayout, .93f);
    mainLayout.setExpandRatio(icon8Link, .02f);

    VerticalLayout fullscreen = new VerticalLayout(mainLayout);
    fullscreen.setComponentAlignment(mainLayout, Alignment.TOP_CENTER);
    fullscreen.setSizeFull();
    setContent(fullscreen);

    mainLayout.setWidth("1024px");
    mainLayout.setHeight("768px");

    if (pQuery != null) {
        searchField.setValue(pQuery);
        doSearch();
    }
}

From source file:edu.nps.moves.mmowgli.components.AvatarChooser.java

License:Open Source License

@SuppressWarnings("serial")
@Override/*from w w  w.ja  v  a2  s .  c o m*/
public void initGui() {
    VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    mainLayout.setMargin(true); //test
    mainLayout.setSpacing(true);
    MediaLocator medLoc = Mmowgli2UI.getGlobals().getMediaLocator();
    Label sp;
    setContent(mainLayout);

    Panel p = new Panel(imgLay = new HorizontalLayout());
    imgLay.setSpacing(true);

    p.setWidth("100%");
    mainLayout.addComponent(p);

    Collection<?> lis = Avatar.getContainer().getItemIds();
    avIdArr = new Object[lis.size()];

    int idx = 0;

    for (Object id : lis) {
        avIdArr[idx++] = id;
        if (initSelectedID == null)
            initSelectedID = id; // sets first one
        Avatar a = Avatar.getTL(id);
        Image em = new Image(null, medLoc.locate(a.getMedia()));
        em.setWidth("95px");
        em.setHeight("95px");
        em.addClickListener(new ImageClicked());

        if (id.equals(initSelectedID)) {
            em.addStyleName("m-orangeborder5");
            lastSel = em;
        } else
            em.addStyleName("m-greyborder5");
        imgLay.addComponent(em);
    }

    butts = new HorizontalLayout();
    butts.setWidth("100%");
    butts.setSpacing(true);
    mainLayout.addComponent(butts);

    butts.addComponent(sp = new Label());
    sp.setWidth("1px");
    butts.setExpandRatio(sp, 1.0f);

    NativeButton cancelButt = new NativeButton();
    medLoc.decorateCancelButton(cancelButt);
    butts.addComponent(cancelButt);

    NativeButton selectButt = new NativeButton();
    medLoc.decorateSelectButton(selectButt);
    butts.addComponent(selectButt);

    butts.addComponent(sp = new Label(""));
    sp.setWidth("20px");

    mainLayout.addComponent(sp = new Label(""));
    sp.setHeight("1px");
    mainLayout.setExpandRatio(sp, 1.0f);
    ;

    cancelButt.addClickListener(new ClickListener() {
        @Override
        @MmowgliCodeEntry
        public void buttonClick(ClickEvent event) {
            cancelClick();
        }
    });
    selectButt.addClickListener(new ClickListener() {
        @Override
        @MmowgliCodeEntry
        public void buttonClick(ClickEvent event) {
            selectClick();
        }
    });
}

From source file:edu.nps.moves.mmowgli.components.SignupsTable.java

License:Open Source License

@SuppressWarnings("serial")
public static void showDialog(String title) {
    final Button bulkMailButt = new Button("Initiate bulk mail job sending to filtered list");

    final Button emailButt = new Button("Compose email");
    emailButt.setDescription("Opens editing dialog to compose an email message to the selected individuals");
    final Button displayButt = new Button("Display as plain text");
    Button closeButt;/*from  www  .  ja  v  a2  s  . c  o m*/

    final SignupsTable tab = new SignupsTable(null, null, new ValueChangeListener() // selected
    {
        @Override
        public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
            emailButt.setEnabled(true);
        }
    });

    final Window dialog = new Window(title);
    dialog.setWidth("950px");
    dialog.setHeight("650px");

    VerticalLayout vl = new VerticalLayout();
    dialog.setContent(vl);
    vl.setSizeFull();
    vl.setMargin(true);
    vl.setSpacing(true);
    addFilterCheckBoxes(vl);
    vl.addComponent(new Label("Individuals who have established game accounts are shown faintly"));

    tab.setSizeFull();
    vl.addComponent(tab);
    vl.setExpandRatio(tab, 1.0f);

    HorizontalLayout buttHL = new HorizontalLayout();
    buttHL.setSpacing(true);

    buttHL.addComponent(bulkMailButt);
    bulkMailButt.setImmediate(true);
    ;
    Label lab = new Label("");
    buttHL.addComponent(lab);
    buttHL.setExpandRatio(lab, 1.0f);

    buttHL.addComponent(emailButt);
    emailButt.setImmediate(true);
    buttHL.addComponent(displayButt);
    displayButt.setImmediate(true);
    buttHL.addComponent(closeButt = new Button("Close"));
    closeButt.setImmediate(true);

    emailButt.setEnabled(false);

    closeButt.addClickListener(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            dialog.close();
        }
    });

    emailButt.addClickListener(new ClickListener() {
        @SuppressWarnings("rawtypes")
        @Override
        public void buttonClick(ClickEvent event) {
            HSess.init();
            Set set = (Set) tab.getValue();
            ArrayList<String> emails = new ArrayList<String>(set.size());
            Iterator itr = set.iterator();
            while (itr.hasNext()) {
                QueryWrapper wrap = (QueryWrapper) itr.next();
                emails.add(wrap.getEmail());
            }
            new SendMessageWindow(emails);
            HSess.close();
        }
    });

    displayButt.addClickListener(new ClickListener() {
        @Override
        @MmowgliCodeEntry
        @HibernateOpened
        @HibernateClosed
        public void buttonClick(ClickEvent event) {
            HSess.init();
            dumpSignupsTL();
            HSess.close();
        }
    });

    bulkMailButt.addClickListener(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            BulkMailHandler.showDialog((QueryContainer) tab.getContainerDataSource());
        }
    });

    vl.addComponent(buttHL);
    vl.setComponentAlignment(buttHL, Alignment.MIDDLE_RIGHT);

    UI.getCurrent().addWindow(dialog);
    dialog.center();
}

From source file:edu.nps.moves.mmowgli.export.BaseExporter.java

License:Open Source License

protected void getMetaStringOrCancel(final MetaListener lis, String title, final Map<String, String> params) {
    final Window dialog = new Window(title);
    final TextField[] parameterFields;

    dialog.setModal(true);//from   www  .j  a va2s.  co  m

    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.setSizeFull();
    dialog.setContent(layout);

    final TextArea ta = new TextArea();
    ta.setWidth("100%");
    ta.setInputPrompt("Type a description of this data, or the game which generated this data (optional)");

    ta.setImmediate(true);
    layout.addComponent(ta);

    Set<String> keySet = params.keySet();
    parameterFields = new TextField[keySet.size()];
    int i = 0;
    GridLayout pGL = new GridLayout();
    pGL.addStyleName("m-greyborder");
    pGL.setColumns(2);
    Label hdr = new HtmlLabel("<b>Parameters</b>");
    hdr.addStyleName("m-textaligncenter");
    pGL.addComponent(hdr, 0, 0, 1, 0); // top row
    pGL.setComponentAlignment(hdr, Alignment.MIDDLE_CENTER);
    pGL.setSpacing(false);
    for (String key : keySet) {
        pGL.addComponent(new HtmlLabel("&nbsp;" + key + "&nbsp;&nbsp;"));
        pGL.addComponent(parameterFields[i] = new TextField());
        parameterFields[i++].setValue(params.get(key));
    }
    if (i > 0) {
        layout.addComponent(pGL);
        layout.setComponentAlignment(pGL, Alignment.TOP_CENTER);
    }

    HorizontalLayout hl = new HorizontalLayout();
    hl.setSpacing(true);
    @SuppressWarnings("serial")
    Button cancelButt = new Button("Cancel", new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            dialog.close();
            lis.continueOrCancel(null);
        }
    });

    @SuppressWarnings("serial")
    Button exportButt = new Button("Export", new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            dialog.close();

            Set<String> keySet = params.keySet();
            int i = 0;
            for (String key : keySet)
                params.put(key, parameterFields[i++].getValue().toString());

            lis.continueOrCancel(ta.getValue().toString());
        }
    });
    hl.addComponent(cancelButt);
    hl.addComponent(exportButt);
    hl.setComponentAlignment(cancelButt, Alignment.MIDDLE_RIGHT);
    hl.setExpandRatio(cancelButt, 1.0f);

    // The components added to the window are actually added to the window's
    // layout; you can use either. Alignments are set using the layout
    layout.addComponent(hl);
    dialog.setWidth("385px");
    dialog.setHeight("310px");
    hl.setWidth("100%");
    ta.setWidth("100%");
    ta.setHeight("100%");
    layout.setExpandRatio(ta, 1.0f);

    UI.getCurrent().addWindow(dialog);
}

From source file:edu.nps.moves.mmowgli.hibernate.SearchPopup.java

License:Open Source License

@SuppressWarnings("serial")
public SearchPopup(String startingText) {
    super("Search for Players, Action Plans, Idea Cards");
    //setModal(true);   better not to be model

    this.initialText = startingText;
    setWidth("635px");
    setHeight("600px");
    center();/*  ww w.j  av  a  2 s.  c om*/

    VerticalLayout vLay = new VerticalLayout();
    vLay.setSizeFull();
    vLay.setMargin(true);
    vLay.setSpacing(true);
    setContent(vLay);

    WordCloudPanel wcPan = new WordCloudPanel(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WordButton wb = (WordButton) event.getButton();
            tf.setValue(wb.word.text);
            searchButt.fireClick();
        }
    });
    wcPan.setImmediate(true);

    TermInfo[] tinfo = SearchManager.getHighFrequencyTerms();
    List<Word> wdLis = new ArrayList<Word>(tinfo.length);

    for (TermInfo inf : tinfo) {
        String txt = inf.term.text();
        Word wd = new Word(txt, inf.docFreq);
        wdLis.add(wd);
    }

    // V7
    /*
    TermStats[] tstats = SearchManager.getHighFrequencyTerms();
    List<Word> wdLis = new ArrayList<Word>(tstats.length);
    for(TermStats ts : tstats) {
      String txt = new String(ts.termtext.utf8ToString());
      Word wd = new Word(txt,ts.docFreq);
      wdLis.add(wd);
    }
    */

    wdLis = finalFilter(wdLis);
    // dumpList(wLis);
    wcPan.setWordData(wdLis, WordOrder.ALPHA);
    wcPan.setWidth("590px"); // won't work in ie"100%");
    vLay.addComponent(wcPan);

    HorizontalLayout topHL = new HorizontalLayout();
    vLay.addComponent(topHL);
    topHL.setWidth("100%");
    topHL.setMargin(true);
    topHL.setSpacing(true);

    topHL.addComponent(tf = new TextField());
    tf.addValueChangeListener(new TextFieldChangeListener());
    tf.setWidth("100%");
    //tf.setInputPrompt("Enter search terms");
    tf.setImmediate(true);
    tf.setTextChangeTimeout(5000);
    topHL.setExpandRatio(tf, 1.0f);
    if (startingText != null)
        tf.setValue(startingText);

    searchButt = new FireableButton("Search", this);
    topHL.addComponent(searchButt);
    searchButt.setClickShortcut(KeyCode.ENTER);

    vLay.addComponent(statusLabel = new HtmlLabel("&nbsp;"));
    statusLabel.setImmediate(true);

    resultsTable = new Table();
    resultsTable.addStyleName("m-actiondashboard-table");
    resultsTable.setImmediate(true);
    vLay.addComponent(resultsTable);
    resultsTable.setHeight("100%");
    resultsTable.setWidth("99%");
    vLay.setExpandRatio(resultsTable, 1.0f);

    BeanItemContainer<SearchResult> bCont = new BeanItemContainer<SearchResult>(SearchResult.class);
    bCont.addBean(new SearchResult("", "", "")); // fix for 6.7.0 bug
    resultsTable.addGeneratedColumn("text", new ToolTipAdder());
    resetTable(bCont);

    resultsTable.setNewItemsAllowed(false);
    resultsTable.setSelectable(true);

    resultsTable.addItemClickListener(new ItemClickListener() {
        @Override
        @MmowgliCodeEntry
        @HibernateOpened
        @HibernateClosed
        public void itemClick(ItemClickEvent event) {
            HSess.init();
            @SuppressWarnings("unchecked")
            BeanItem<SearchResult> bi = (BeanItem<SearchResult>) event.getItem();
            SearchResult sr = bi.getBean();
            MmowgliController controller = Mmowgli2UI.getGlobals().getController();
            if (sr.getType().equals(USERTYPEKEY))
                controller.miscEventTL(new AppEvent(SHOWUSERPROFILECLICK, SearchPopup.this, sr.getHibId()));
            else if (sr.getType().equals(ACTIONPLANTYPEKEY))
                controller.miscEventTL(new AppEvent(ACTIONPLANSHOWCLICK, SearchPopup.this, sr.getHibId()));
            else
                controller.miscEventTL(new AppEvent(CARDCLICK, SearchPopup.this, sr.getHibId()));
            HSess.close();

            closeListener.buttonClick(null);
        }
    });

    vLay.addComponent(closeButt = new Button("Close"));
    vLay.setComponentAlignment(closeButt, Alignment.TOP_RIGHT);
    closeButt.addClickListener(closeListener = new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            if (searchThread != null)
                searcherObj.killed = true;
            //V7 SearchPopup.this.getParent().removeWindow(SearchPopup.this);
            SearchPopup.this.close();
        }
    });
}