Example usage for com.google.gwt.user.client.ui FlexTable FlexTable

List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui FlexTable FlexTable.

Prototype

public FlexTable() 

Source Link

Usage

From source file:com.ikon.frontend.client.widget.thesaurus.ThesaurusPanel.java

License:Open Source License

/**
 * ThesaurusPanel//from w  w w.j  a v  a 2  s.  c  o m
 */
public ThesaurusPanel() {
    status = new Status();
    status.setStyleName("okm-StatusPopup");

    // Tree
    folderSelectTree = new FolderSelectTree();
    folderSelectTree.setSize("100%", "100%");
    verticalDirectoryPanel = new VerticalPanel();
    verticalDirectoryPanel.setSize("100%", "100%");
    scrollDirectoryPanel = new ScrollPanel();
    scrollDirectoryPanel.setSize("490", "275");
    scrollDirectoryPanel.addStyleName("okm-Background-White");
    scrollDirectoryPanel.addStyleName("okm-Border-Left");
    scrollDirectoryPanel.addStyleName("okm-Border-Right");
    scrollDirectoryPanel.addStyleName("okm-Border-Bottom");
    verticalDirectoryPanel.add(folderSelectTree);
    verticalDirectoryPanel.setCellHorizontalAlignment(folderSelectTree, HasAlignment.ALIGN_LEFT);
    scrollDirectoryPanel.add(verticalDirectoryPanel);

    // Keywords
    keywordTable = new FlexTable();
    keywordTable.setWidth("100%");
    keywordTable.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            markSelectedRow(keywordTable.getCellForEvent(event).getRowIndex());
            evaluateEnableAction();
        }
    });
    scrollKeywordPanel = new ScrollPanel();
    scrollKeywordPanel.add(keywordTable);
    scrollKeywordPanel.setStyleName("okm-Popup-text");

    keyword = new TextBox();
    keyword.setWidth("492");
    keyword.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            if (keyword.getText().length() >= 3) {
                getKeywords(keyword.getText().toLowerCase());
            } else {
                removeAllRows();
            }
        }
    });

    vPanelKeyword = new VerticalPanel();
    vPanelKeyword.add(keyword);
    vPanelKeyword.add(scrollKeywordPanel);

    vPanelKeyword.setCellHeight(keyword, "25");
    vPanelKeyword.setCellVerticalAlignment(keyword, HasAlignment.ALIGN_MIDDLE);

    // Tab Panel
    vPanel = new VerticalPanel();
    tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX);
    tabPanel.setWidth("492");
    tabPanel.setHeight("300");

    tabPanel.add(scrollDirectoryPanel, Main.i18n("thesaurus.tab.tree"));
    tabPanel.add(vPanelKeyword, Main.i18n("thesaurus.tab.keywords"));
    tabPanel.selectTab(TAB_TREE);
    scrollDirectoryPanel.setPixelSize(490, 275);
    scrollKeywordPanel.setPixelSize(490, 250);

    tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        @Override
        public void onSelection(SelectionEvent<Integer> event) {
            selectedTab = event.getSelectedItem().intValue();
            evaluateEnableAction();
        }
    });

    vPanel.add(tabPanel);

    vPanel.addStyleName("okm-DisableSelect");
    keyword.setStyleName("okm-Input");
    keywordTable.setStyleName("okm-NoWrap");
    keywordTable.addStyleName("okm-Table-Row");

    initWidget(vPanel);
}

From source file:com.ikon.frontend.client.widget.UserPopup.java

License:Open Source License

/**
 * User popup//from w w w.ja v a  2  s.c o m
 */
public UserPopup() {

    // Establishes auto-close when click outside
    super(false, true);
    int left = (Window.getClientWidth() - 400) / 2;
    int top = (Window.getClientHeight() - 220) / 2;

    vPanel = new VerticalPanel();
    userFlexTable = new FlexTable();
    mailFlexTable = new FlexTable();

    userGroupBoxPanel = new GroupBoxPanel();
    userGroupBoxPanel.setCaption(Main.i18n("user.preferences.user.data"));
    userGroupBoxPanel.add(userFlexTable);

    mailGroupBoxPanel = new GroupBoxPanel();
    mailGroupBoxPanel.setCaption(Main.i18n("user.preferences.mail.data"));
    mailGroupBoxPanel.add(mailFlexTable);

    userId = new HTML(Main.i18n("user.preferences.user"));
    userName = new HTML(Main.i18n("user.preferences.name"));
    userPassword = new HTML(Main.i18n("user.preferences.password"));
    userMail = new HTML(Main.i18n("user.preferences.mail"));
    userRoles = new HTML(Main.i18n("user.preferences.roles"));
    mailHost = new HTML(Main.i18n("user.preferences.mail.host"));
    mailUser = new HTML(Main.i18n("user.preferences.mail.user"));
    mailPassword = new HTML(Main.i18n("user.preferences.mail.user.password"));
    mailFolder = new HTML(Main.i18n("user.preferences.mail.folder"));
    mailProtocolLabel = new HTML(Main.i18n("user.preferences.mail.protocol"));
    mailProtocol = new ListBox();
    userPasswordText = new PasswordTextBox();
    userPasswordTextVerify = new PasswordTextBox();
    userNameText = new HTML("");
    userMailText = new TextBox();
    rolesPanel = new VerticalPanel();
    mailUserPasswordText = new PasswordTextBox();
    passwordError = new HTML(Main.i18n("user.preferences.password.error"));
    passwordValidationError = new HTML("");
    mailPassordError = new HTML(Main.i18n("user.preferences.mail.password.error.void"));
    mailError = new HTML(Main.i18n("user.preferences.mail.error"));
    mailTestError = new HTML(Main.i18n("user.preferences.mail.test.error"));
    mailTestOK = new HTML(Main.i18n("user.preferences.mail.test.ok"));

    passwordError.setVisible(false);
    passwordValidationError.setVisible(false);
    mailPassordError.setVisible(false);
    mailError.setVisible(false);
    mailTestError.setVisible(false);
    mailTestOK.setVisible(false);

    hostText = new TextBox();
    mailUserText = new TextBox();
    mailFolderText = new TextBox();

    mailProtocol.addItem(MailAccount.PROTOCOL_IMAP);
    mailProtocol.addItem(MailAccount.PROTOCOL_IMAPS);
    mailProtocol.addItem(MailAccount.PROTOCOL_POP3);
    mailProtocol.addItem(MailAccount.PROTOCOL_POP3S);

    update = new Button(Main.i18n("button.update"), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            passwordError.setVisible(false);
            passwordValidationError.setVisible(false);
            mailPassordError.setVisible(false);
            mailError.setVisible(false);
            mailTestError.setVisible(false);
            mailTestOK.setVisible(false);
            // Password always must be equals
            if (!userPasswordText.getText().equals(userPasswordTextVerify.getText())) {
                passwordError.setVisible(true);
                // Case creation
            } else if (Main.get().workspaceUserProperties.getWorkspace().getMailID() < 0
                    && mailUserPasswordText.getText().equals("") && (mailFolderText.getText().length() > 0
                            || mailUserText.getText().length() > 0 || hostText.getText().length() > 0)) {
                mailPassordError.setVisible(true);
                // Case update
            } else if ((mailUserPasswordText.getText().length() > 0 || mailFolderText.getText().length() > 0
                    || mailUserText.getText().length() > 0 || hostText.getText().length() > 0)
                    && !(mailFolderText.getText().length() > 0 && mailUserText.getText().length() > 0
                            && hostText.getText().length() > 0)) {
                mailError.setVisible(true);
            } else {
                final GWTWorkspace workspace = new GWTWorkspace();
                workspace.setUser(Main.get().workspaceUserProperties.getUser());
                workspace.setEmail(userMailText.getText());
                workspace.setMailProtocol(mailProtocol.getItemText(mailProtocol.getSelectedIndex()));
                workspace.setMailFolder(mailFolderText.getText());
                workspace.setMailHost(hostText.getText());
                workspace.setMailUser(mailUserText.getText());
                workspace.setMailPassword(mailUserPasswordText.getText());
                workspace.setPassword(userPasswordText.getText());
                workspace.setMailID(Main.get().workspaceUserProperties.getWorkspace().getMailID());
                // First must validate password
                workspaceService.isValidPassword(userPasswordText.getText(), new AsyncCallback<String>() {
                    @Override
                    public void onSuccess(String result) {
                        if (result.equals("")) {
                            workspaceService.updateUserWorkspace(workspace, callbackUpdateUserWorkspace);
                        } else {
                            passwordValidationError.setHTML(result);
                            passwordValidationError.setVisible(true);
                        }
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        Main.get().showError("callbackIsValidPassword", caught);
                    }
                });
            }
        }
    });

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

    test = new Button(Main.i18n("button.test"), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            mailTestError.setVisible(false);
            mailTestOK.setVisible(false);
            test.setEnabled(false);
            generalService.testMailConnection(hostText.getText(), mailUserText.getText(),
                    mailUserPasswordText.getText(), mailFolderText.getText(),
                    mailProtocol.getItemText(mailProtocol.getSelectedIndex()),
                    new AsyncCallback<GWTTestMail>() {
                        @Override
                        public void onSuccess(GWTTestMail result) {
                            if (!result.isError()) {
                                mailTestError.setVisible(false);
                                mailTestOK.setVisible(true);
                            } else {
                                mailTestError.setHTML(Main.i18n("user.preferences.mail.test.error") + "<br>"
                                        + result.getErrorMsg());
                                mailTestError.setVisible(true);
                                mailTestOK.setVisible(false);
                            }
                            test.setEnabled(true);
                        }

                        @Override
                        public void onFailure(Throwable caught) {
                            mailTestError.setVisible(false);
                            mailTestOK.setVisible(false);
                            test.setEnabled(true);
                            Main.get().showError("testmailConnection", caught);
                        }
                    });
        }
    });

    delete = new Button(Main.i18n("button.delete"), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            long Id = Main.get().workspaceUserProperties.getWorkspace().getMailID();

            if (Id >= 0) {
                workspaceService.deleteMailAccount(Id, callbackDeleteMailAccount);
            }
        }
    });

    hPanel = new HorizontalPanel();
    hPanel.add(update);
    hPanel.add(new HTML("&nbsp;&nbsp;"));
    hPanel.add(cancel);

    userFlexTable.setCellPadding(0);
    userFlexTable.setCellSpacing(2);
    userFlexTable.setWidth("455");

    userFlexTable.setWidget(0, 0, userId);
    userFlexTable.setWidget(1, 0, userName);
    userFlexTable.setWidget(2, 0, userPassword);
    userFlexTable.setWidget(3, 0, userMail);
    userFlexTable.setWidget(4, 0, userRoles);

    userFlexTable.setWidget(1, 1, userNameText);
    userFlexTable.setWidget(2, 1, userPasswordText);
    userFlexTable.setWidget(2, 2, userPasswordTextVerify);
    userFlexTable.setWidget(3, 1, userMailText);
    userFlexTable.setWidget(4, 1, rolesPanel);

    userFlexTable.getFlexCellFormatter().setVerticalAlignment(4, 0, HasAlignment.ALIGN_TOP);
    userFlexTable.getFlexCellFormatter().setColSpan(3, 1, 2);
    userFlexTable.getFlexCellFormatter().setColSpan(4, 1, 2);

    mailFlexTable.setCellPadding(0);
    mailFlexTable.setCellSpacing(2);
    mailFlexTable.setWidth("455");

    mailFlexTable.setWidget(1, 0, mailProtocolLabel);
    mailFlexTable.setWidget(2, 0, mailHost);
    mailFlexTable.setWidget(3, 0, mailUser);
    mailFlexTable.setWidget(4, 0, mailPassword);
    mailFlexTable.setWidget(5, 0, mailFolder);

    mailFlexTable.setWidget(1, 1, mailProtocol);
    mailFlexTable.setWidget(2, 1, hostText);
    mailFlexTable.setWidget(3, 1, mailUserText);
    mailFlexTable.setWidget(4, 1, mailUserPasswordText);
    mailFlexTable.setWidget(5, 1, mailFolderText);
    mailFlexTable.setWidget(6, 0, new HTML("&nbsp;"));
    mailFlexTable.setWidget(6, 1, delete);
    mailFlexTable.setWidget(6, 2, test);

    mailFlexTable.getFlexCellFormatter().setColSpan(1, 1, 1);

    userMailText.setWidth("275");
    hostText.setWidth("275");
    rolesPanel.setWidth("275");
    userGroupBoxPanel.setWidth("460px");
    mailGroupBoxPanel.setWidth("460px");

    vPanel.setWidth("470px");
    vPanel.setHeight("195px");

    vPanel.add(new HTML("<br>"));
    vPanel.add(userGroupBoxPanel);
    vPanel.add(new HTML("<br>"));
    vPanel.add(mailGroupBoxPanel);
    vPanel.add(passwordError);
    vPanel.add(passwordValidationError);
    vPanel.add(mailPassordError);
    vPanel.add(mailError);
    vPanel.add(mailTestError);
    vPanel.add(mailTestOK);
    vPanel.add(new HTML("<br>"));
    vPanel.add(hPanel);
    vPanel.add(new HTML("<br>"));

    vPanel.setCellHorizontalAlignment(userGroupBoxPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(mailGroupBoxPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(hPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(passwordError, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(passwordValidationError, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(mailPassordError, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(mailError, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(mailTestError, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(mailTestOK, HasAlignment.ALIGN_CENTER);

    userId.addStyleName("okm-NoWrap");
    userName.addStyleName("okm-NoWrap");
    userPassword.addStyleName("okm-NoWrap");
    userMail.addStyleName("okm-NoWrap");
    mailHost.addStyleName("okm-NoWrap");
    mailUser.addStyleName("okm-NoWrap");
    mailPassword.addStyleName("okm-NoWrap");
    mailFolder.addStyleName("okm-NoWrap");
    userPasswordText.setStyleName("okm-Input");
    userPasswordTextVerify.setStyleName("okm-Input");
    userMailText.setStyleName("okm-Input");
    hostText.setStyleName("okm-Input");
    mailUserText.setStyleName("okm-Input");
    mailUserPasswordText.setStyleName("okm-Input");
    mailFolderText.setStyleName("okm-Input");
    mailProtocolLabel.setStyleName("okm-NoWrap");
    passwordError.setStyleName("okm-Input-Error");
    passwordValidationError.setStyleName("okm-Input-Error");
    mailPassordError.setStyleName("okm-Input-Error");
    mailError.setStyleName("okm-Input-Error");
    mailTestError.setStyleName("okm-Input-Error");
    mailTestOK.setStyleName("okm-Input-Ok");
    update.setStyleName("okm-ChangeButton");
    cancel.setStyleName("okm-NoButton");
    delete.setStyleName("okm-DeleteButton");
    test.setStyleName("okm-Button");

    setPopupPosition(left, top);

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

From source file:com.ikon.frontend.client.widget.wizard.CategoriesWidget.java

License:Open Source License

public CategoriesWidget(String docPath, Widget widget) {
    table = new FlexTable();
    tableSubscribedCategories = new FlexTable();
    assignedCategories = new ArrayList<GWTFolder>();
    this.docPath = docPath;

    cellFormatter = table.getCellFormatter(); // Gets the cell formatter
    table.setWidth("100%");
    table.setCellPadding(0);/*from  w w  w. j a v  a  2  s.  c o m*/
    table.setCellSpacing(2);

    table.setWidget(0, 0, widget);
    table.getFlexCellFormatter().setColSpan(0, 0, 2);
    cellFormatter.addStyleName(0, 0, "okm-Security-Title-RightBorder"); // Border and margins

    RowFormatter rowFormatter = table.getRowFormatter();
    rowFormatter.setStyleName(0, "okm-Security-Title");

    // Widget format
    cellFormatter.setHorizontalAlignment(0, 0, HasAlignment.ALIGN_CENTER);
    cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_MIDDLE);

    // Categories
    vPanel = new VerticalPanel();
    vPanel.setWidth("390");
    vPanel.setHeight("175");

    scrollDirectoryPanel = new ScrollPanel();
    scrollDirectoryPanel.setSize("380", "150");
    scrollDirectoryPanel.setStyleName("okm-Popup-text");
    verticalDirectoryPanel = new VerticalPanel();
    verticalDirectoryPanel.setSize("100%", "100%");
    folderSelectTree = new FolderSelectTree();
    folderSelectTree.setSize("100%", "100%");

    verticalDirectoryPanel.add(folderSelectTree);
    scrollDirectoryPanel.add(verticalDirectoryPanel);

    actionButton = new Button(Main.i18n("button.add"), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            addCategory(folderSelectTree.getCategory());
        }
    });
    actionButton.setEnabled(false);
    vPanel.add(scrollDirectoryPanel);
    vPanel.add(actionButton);

    vPanel.setCellHorizontalAlignment(scrollDirectoryPanel, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(actionButton, HasAlignment.ALIGN_CENTER);
    vPanel.setCellVerticalAlignment(actionButton, HasAlignment.ALIGN_MIDDLE);
    vPanel.setCellHeight(scrollDirectoryPanel, "150");
    vPanel.setCellHeight(actionButton, "25");

    table.setWidget(1, 0, vPanel);
    table.getFlexCellFormatter().setColSpan(1, 0, 2);
    cellFormatter.setHorizontalAlignment(1, 0, HasAlignment.ALIGN_CENTER);

    table.setHTML(2, 0, "&nbsp;<b>" + Main.i18n("document.categories") + "</b>");
    table.getFlexCellFormatter().setColSpan(2, 0, 2);
    cellFormatter.setHorizontalAlignment(2, 0, HasAlignment.ALIGN_LEFT);

    table.setWidget(3, 0, tableSubscribedCategories);
    table.getFlexCellFormatter().setColSpan(3, 0, 2);
    cellFormatter.setHorizontalAlignment(3, 0, HasAlignment.ALIGN_LEFT);

    setRowWordWarp(0, 0, true, tableSubscribedCategories);

    table.setStyleName("okm-DisableSelect");
    actionButton.setStyleName("okm-AddButton");
    tableSubscribedCategories.setStyleName("okm-DisableSelect");

    // Resets to initial tree value
    folderSelectTree.reset();

    initWidget(table);
}

From source file:com.ikon.frontend.client.widget.wizard.KeywordsWidget.java

License:Open Source License

/**
 * KeywordsWidget/* www  .j  a  v a2 s . co m*/
 * 
 * @param grpName The group name
 * @param widget Widget at firs row
 */
public KeywordsWidget(String docPath, Widget widget) {
    table = new FlexTable();
    this.docPath = docPath;

    docKeywords = new ArrayList<String>();
    keywordMap = new HashMap<String, Widget>();
    keyWordsListPending = new ArrayList<String>();
    keywordsCloud = new TagCloud();
    keywordsCloud.setWidth("350");

    keywordPanel = new HorizontalPanel();
    multiWordkSuggestKey = new MultiWordSuggestOracle();
    keywordList = new ArrayList<String>();
    suggestKey = new SuggestBox(multiWordkSuggestKey);
    suggestKey.setHeight("20");
    suggestKey.setText(Main.i18n("dashboard.keyword.suggest"));
    suggestKey.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            if ((char) KeyCodes.KEY_ENTER == event.getNativeKeyCode() && keyWordsListPending.isEmpty()) {
                String keys[] = suggestKey.getText().split(" "); // Separates keywords by space
                for (int i = 0; i < keys.length; i++) {
                    keyWordsListPending.add(keys[i]);
                }
                addPendingKeyWordsList();
                suggestKey.setText("");
            }
        }
    });
    suggestKey.getTextBox().addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (suggestKey.getText().equals(Main.i18n("dashboard.keyword.suggest"))) {
                suggestKey.setText("");
            }

        }
    });

    suggestKey.getTextBox().addMouseOutHandler(new MouseOutHandler() {
        @Override
        public void onMouseOut(MouseOutEvent event) {
            if (!keyShortcutsEnabled) {
                Main.get().mainPanel.enableKeyShorcuts(); // Enables general keys applications
                keyShortcutsEnabled = true;
            }
        }
    });

    suggestKey.getTextBox().addMouseOverHandler(new MouseOverHandler() {
        @Override
        public void onMouseOver(MouseOverEvent event) {
            if (keyShortcutsEnabled) {
                Main.get().mainPanel.disableKeyShorcuts();
                keyShortcutsEnabled = false;
            }
        }
    });

    thesaurusImage = new Image(OKMBundleResources.INSTANCE.bookOpenIcon());
    thesaurusImage.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            Main.get().mainPanel.desktop.navigator.thesaurusTree.thesaurusSelectPopup
                    .show(ThesaurusSelectPopup.WIZARD);
        }
    });

    VerticalPanel vPanel = new VerticalPanel();
    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(suggestKey);
    hPanel.add(new HTML("&nbsp;"));
    hPanel.add(thesaurusImage);
    hKeyPanel = new FlowPanel();
    HTML space = new HTML("");
    vPanel.add(hPanel);
    vPanel.add(space);
    vPanel.add(hKeyPanel);

    hKeyPanel.setWidth("250");
    vPanel.setCellHeight(space, "5");

    keywordPanel.add(vPanel);

    cellFormatter = table.getCellFormatter(); // Gets the cell formatter
    table.setWidth("100%");

    table.setWidget(0, 0, widget);
    table.getFlexCellFormatter().setColSpan(0, 0, 2);
    cellFormatter.addStyleName(0, 0, "okm-Security-Title-RightBorder"); // Border and margins

    RowFormatter rowFormatter = table.getRowFormatter();
    rowFormatter.setStyleName(0, "okm-Security-Title");

    // Widget format
    cellFormatter.setHorizontalAlignment(0, 0, HasAlignment.ALIGN_CENTER);
    cellFormatter.setVerticalAlignment(0, 0, HasAlignment.ALIGN_MIDDLE);

    table.setHTML(1, 0, "<b>" + Main.i18n("document.keywords") + "</b>");
    table.setWidget(1, 1, keywordPanel);
    cellFormatter.setVerticalAlignment(1, 0, HasAlignment.ALIGN_TOP);
    table.setHTML(2, 0, "");
    table.getFlexCellFormatter().setHeight(2, 0, "5");
    table.setHTML(3, 0, "<b>" + Main.i18n("document.keywords.cloud") + "</b>");
    table.getFlexCellFormatter().setColSpan(3, 0, 2);
    table.setWidget(4, 0, keywordsCloud);
    table.getFlexCellFormatter().setColSpan(4, 0, 2);
    cellFormatter.setHorizontalAlignment(4, 0, HasAlignment.ALIGN_CENTER);

    // Reloading keyword list
    multiWordkSuggestKey.clear();
    keywordList = new ArrayList<String>();
    for (Iterator<GWTKeyword> it = Main.get().mainPanel.dashboard.keyMapDashboard.getAllKeywordList()
            .iterator(); it.hasNext();) {
        String keyword = it.next().getKeyword();
        multiWordkSuggestKey.add(keyword);
        keywordList.add(keyword);
    }

    table.setStyleName("okm-DisableSelect");
    suggestKey.setStyleName("okm-KeyMap-Suggest");
    suggestKey.addStyleName("okm-Input");
    hKeyPanel.setStylePrimaryName("okm-cloudWrap");
    keywordsCloud.setStylePrimaryName("okm-cloudWrap");
    thesaurusImage.addStyleName("okm-Hyperlink");

    initWidget(table);
}

From source file:com.jwh.gwt.fasttable.sample.client.FastTableSample.java

License:Open Source License

private void buildOptionsPanel() {
    optionsPanel.add(new Label());
    final FlexTable flexTable = new FlexTable();
    optionsPanel.add(flexTable);/*from   w ww.  j  a v a2s. c  o m*/
    buildRowCountButtons(flexTable);
    buildInitialSize(flexTable);
    buildIncrementSize(flexTable);
    buildPushButton(flexTable);
}

From source file:com.konakart.client.KKBaseWin.java

License:Open Source License

/**
 * Constructor/*from ww  w  .j a v a 2s  . co m*/
 * 
 */
public KKBaseWin() {
    // If debug is set to true, we show debug info in a table
    if (debug) {
        if (debugFT == null) {
            debugFT = new FlexTable();
        }
    }
}

From source file:com.konakart.client.KKBaseWin.java

License:Open Source License

/**
 * Utility method to create a table./*from  w w w. jav  a 2 s . co m*/
 * 
 * @param border
 * @param width
 * @param cellSpacing
 * @param cellPadding
 * @param style
 * 
 * @return Returns a new table
 */
protected FlexTable getTable(int border, String width, int cellSpacing, int cellPadding, String style) {

    FlexTable t = new FlexTable();
    t.setBorderWidth(border);
    t.setWidth(width);
    t.setCellSpacing(cellSpacing);
    t.setCellPadding(cellPadding);
    if (style != null) {
        t.setStyleName(style);
    }

    return t;
}

From source file:com.konakart.client.KKBaseWin.java

License:Open Source License

/**
 * Initialise widgets to ensure that they are there for when the data arrives
 *///from ww  w  .j av  a2  s  .  c  o m
protected void initWidgets() {
    continueCssButton = new HTML(
            "<a style=\"float:right\" class=\"button\"><span>" + common_continue + "</span></a>");
    initHTML(continueCssButton);

    backCssButton = new HTML("<a class=\"button\"><span>" + common_back + "</span></a>");
    initHTML(backCssButton);

    errorImg = new Image(images_folder + "icons/error.gif");
    successImg = new Image(images_folder + "icons/success.gif");

    errorFT = new FlexTable();
    errorRow = 0;
    successFT = new FlexTable();

}

From source file:com.konakart.client.KKBaseWin.java

License:Open Source License

/**
 * Sets the error msg// w w w. j ava 2  s  .c  o  m
 * 
 * @param msg
 */
protected void setErrorMsg(String msg) {
    if (errorFT == null) {
        errorFT = new FlexTable();
    }
    formatCell(errorFT, errorRow, 0, null, "right", null, "1%");
    formatCell(errorFT, errorRow, 1, "messageStackError", "left", null, "99%");
    errorFT.setWidget(errorRow, 0, errorImg);
    errorFT.setHTML(errorRow, 1, msg);
    errorRow++;
}

From source file:com.konakart.client.KKBaseWin.java

License:Open Source License

/**
 * Sets the success msg/*from  w ww . j a  va2  s.co  m*/
 * 
 * @param msg
 */
protected void setSuccessMsg(String msg) {
    if (successFT == null) {
        successFT = new FlexTable();
    }
    formatCell(successFT, 0, 0, null, "right", null, "1%");
    formatCell(successFT, 0, 1, "messageStackSuccess", "left", null, "99%");
    successFT.setWidget(0, 0, successImg);
    successFT.setHTML(0, 1, msg);
}