Example usage for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE

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

Introduction

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

Prototype

VerticalAlignmentConstant ALIGN_MIDDLE

To view the source code for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE.

Click Source Link

Document

Specifies that the widget's contents should be aligned in the middle.

Usage

From source file:com.ephesoft.dcma.gwt.customworkflow.client.view.dependencies.DependencyView.java

License:Open Source License

/**
 * //from w ww .  j av  a 2  s . c o  m
 */
private void addCssStyle() {
    addDependencyButton.setHeight(CustomWorkflowConstants.TWENTY_PIXEL);
    editDependencyButton.setHeight(CustomWorkflowConstants.TWENTY_PIXEL);
    deleteDependencyButton.setHeight(CustomWorkflowConstants.TWENTY_PIXEL);
    dependenciesButtonPanel.setSpacing(CustomWorkflowConstants.SPACING_5);
    dependenciesButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    dependenciesButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    dependencyLayoutPanel.addStyleName(CustomWorkflowConstants.MAIN_PANEL_LAYOUT);
    dependenciesButtonPanel.addStyleName(CustomWorkflowConstants.BUTTONS_PANEL_LAYOUT);
    pluginLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
}

From source file:com.ephesoft.dcma.gwt.customworkflow.client.view.dependencies.EditDependencyView.java

License:Open Source License

/**
 * //from w  w w.j  a  v a2s  .c om
 */
private void addCssStyle() {
    editDependencyPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    editDependencyPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    andButton.setSize(CustomWorkflowConstants._50PX, CustomWorkflowConstants._25PX);
    orButton.setSize(CustomWorkflowConstants._50PX, CustomWorkflowConstants._25PX);
    buttonsPanel.setSpacing(CustomWorkflowConstants.SPACING_15);
    dependenciesList.setVisibleItemCount(CustomWorkflowConstants.VISIBLE_ITEM_10);
    dependenciesListHorizontalPanel.add(dependenciesList);
    dependenciesTextArea.setSize(CustomWorkflowConstants._280PX, CustomWorkflowConstants._147PX);
    dependenciesTextArea.setTextAlignment(TextArea.ALIGN_JUSTIFY);
    editDependencyDockLayoutPanel.addStyleName(CustomWorkflowConstants.CUSTOM_WORKFLOW_PANEL);
    editDependencyDockLayoutPanel.addStyleName(CustomWorkflowConstants.MAIN_PANEL_LAYOUT);

    pluginLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
    dependencyTypeLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
    dependenciesLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
    pluginNamesList.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
}

From source file:com.ephesoft.dcma.gwt.foldermanager.client.view.FolderTableView.java

License:Open Source License

public final void cleanupTableContent() {
    folderTableRows.clear();/*from  w  w w.j av  a2  s  . com*/
    folderDisplayTable.removeAllRows();
    folderDisplayTable.getColumnFormatter().setWidth(0, PERCENTAGE_FIVE);
    folderDisplayTable.getColumnFormatter().setWidth(1, PERCENTAGE_FOURTY_EIGHT);
    folderDisplayTable.getColumnFormatter().setWidth(2, PERCENTAGE_TWENTY_EIGHT);
    folderDisplayTable.getColumnFormatter().setWidth(3, PERCENTAGE_NINE);
    folderDisplayTable.setWidth(PERCENTAGE_HUNDRED);

    // These empty labels are for alignment purpose only
    final Label emptyLabelCol1 = new Label();
    final Label emptyLabelCol3 = new Label();
    final Label emptyLabelCol4 = new Label();

    emptyLabelCol1.setWidth(PERCENTAGE_FIVE);
    emptyLabelCol3.setWidth(PERCENTAGE_TWENTY_EIGHT);
    emptyLabelCol4.setWidth(PERCENTAGE_NINE);
    folderDisplayTable.setWidget(0, 0, emptyLabelCol1);
    folderDisplayTable.setWidget(0, 2, emptyLabelCol3);
    folderDisplayTable.setWidget(0, 3, emptyLabelCol4);
    HTML html = new HTML(FolderManagementConstants.IMAGE_LOADING);
    folderDisplayTable.setWidget(0, 1, html);
    folderDisplayTable.getCellFormatter().setAlignment(0, 1, HasHorizontalAlignment.ALIGN_RIGHT,
            HasVerticalAlignment.ALIGN_MIDDLE);
    selectAll.setValue(false);
}

From source file:com.ephesoft.dcma.gwt.foldermanager.client.view.FolderTableView.java

License:Open Source License

/**
 * This method adds message to table when no content is present at selected location.
 *///from  w w  w.ja  v  a 2 s  . c  om
public void addNoContentLabel() {
    Label noContentLabel = new Label(
            LocaleDictionary.get().getMessageValue(FolderManagementMessages.NO_CONTENT_MESSAGE));
    final Label emptyLabelCol1 = new Label();
    final Label emptyLabelCol3 = new Label();
    final Label emptyLabelCol4 = new Label();

    emptyLabelCol1.setWidth(PERCENTAGE_FIVE);
    emptyLabelCol3.setWidth(PERCENTAGE_TWENTY_EIGHT);
    emptyLabelCol4.setWidth(PERCENTAGE_NINE);
    folderDisplayTable.setWidget(0, 0, emptyLabelCol1);
    folderDisplayTable.setWidget(0, 2, emptyLabelCol3);
    folderDisplayTable.setWidget(0, 3, emptyLabelCol4);
    folderDisplayTable.setWidget(0, 1, noContentLabel);
    folderDisplayTable.getCellFormatter().setAlignment(0, 1, HasHorizontalAlignment.ALIGN_RIGHT,
            HasVerticalAlignment.ALIGN_MIDDLE);
    setEnableAttributeForTableContent(false);
}

From source file:com.ephesoft.dcma.gwt.home.client.view.reviewtable.ReviewValidateTable.java

License:Open Source License

/**
 * Constructor.//w ww  .j  a  va 2  s. co m
 */
public ReviewValidateTable() {
    super();
    mainPanel = new DockLayoutPanel(Unit.PCT);
    searchAndFilterContanier = new FlowPanel();
    filterAndSearchPanel = new HorizontalPanel();
    searchAndFilterContanier.addStyleName(CoreCommonConstants.OPTIONS_PANEL);
    filterAndSearchPanel.setWidth(CoreCommonConstants._100_PERCENTAGE);
    priorityListBox = createPriorityListBox();
    searchPanel = new HorizontalPanel();
    listView = new ListView();
    listView.setTableRowCount(BatchListConstants.FIFTEEN);
    addHeaders();
    HorizontalPanel listBoxPanel;
    listBoxPanel = new HorizontalPanel();

    searchBatchButton = new Button();
    searchBatchLabel = new Label();
    searchBatchTextBox = new TextBox();

    searchPanel.add(searchBatchLabel);
    searchPanel.add(searchBatchTextBox);
    searchPanel.add(searchBatchButton);
    searchPanel.setCellVerticalAlignment(searchBatchLabel, HasVerticalAlignment.ALIGN_MIDDLE);
    searchPanel.setCellVerticalAlignment(searchBatchTextBox, HasVerticalAlignment.ALIGN_MIDDLE);
    searchPanel.setCellVerticalAlignment(searchBatchButton, HasVerticalAlignment.ALIGN_MIDDLE);

    searchPanel.addStyleName(CoreCommonConstants.LAST_GRP_PANEL_NORMAL_CSS);
    searchBatchLabel.setText(LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_SEARCH_BATCH)
            + BatchListConstants.COLON);
    searchBatchButton.setText(LocaleDictionary.get().getConstantValue(BatchListConstants.BUTTON_SEARCH_BATCH));

    listBoxPanel.addStyleName(CoreCommonConstants.GRP_PANEL_NORMAL_CSS);
    searchAndFilterContanier.add(filterAndSearchPanel);
    mainPanel.addNorth(searchAndFilterContanier, BatchListConstants.FIFTEEN);
    mainPanel.addStyleName("padding0");
    mainPanel.add(listView);
    Label priorityLabel = new Label(
            LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_PRIORITY_LISTBOX));
    refreshButton = new Button(
            LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_REFRESH_BUTTON));

    listBoxPanel.add(priorityLabel);
    listBoxPanel.add(priorityListBox);
    listBoxPanel.add(refreshButton);
    listBoxPanel.setCellHorizontalAlignment(priorityLabel, HasHorizontalAlignment.ALIGN_RIGHT);
    listBoxPanel.setCellHorizontalAlignment(refreshButton, HasHorizontalAlignment.ALIGN_LEFT);
    listBoxPanel.setWidth(CoreCommonConstants._100_PERCENTAGE);

    filterAndSearchPanel.add(listBoxPanel);
    filterAndSearchPanel.add(searchPanel);
    filterAndSearchPanel.setCellHorizontalAlignment(listBoxPanel, HasHorizontalAlignment.ALIGN_LEFT);
    filterAndSearchPanel.setCellWidth(listBoxPanel, CoreCommonConstants._20_PERCENTAGE);
    filterAndSearchPanel.setCellHorizontalAlignment(searchPanel, HasHorizontalAlignment.ALIGN_LEFT);
    searchBatchTextBox.addKeyPressHandler(new KeyPressHandler() {

        @Override
        public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
                searchBatchButton.click();
            }
        }
    });
    searchBatchTextBox.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent arg0) {
            searchBatchTextBox.setText(BatchListConstants.EMPTY_STRING);
        }
    });
}

From source file:com.ephesoft.dcma.gwt.rv.client.view.DocumentTree.java

License:Open Source License

private void createTree(boolean fireEvent) {
    clearView();//from  w  ww  . j a  v a2 s  .c  o m
    List<Document> docBeans = presenter.batchDTO.getBatch().getDocuments().getDocument();

    int counter = 0;
    TreeItem item = null;
    boolean isThumbNailLoaded = false;
    boolean isFirstThumbNail = false;
    for (final Document docBean : docBeans) {

        VerticalPanel docTitleVerticalPanel = new VerticalPanel();
        HorizontalPanel docTitlePanel = new HorizontalPanel();
        docTitlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
        docTitleVerticalPanel.add(docTitlePanel);
        Label docTitleLabel = new Label();
        Label docType = new Label();
        docTitlePanel.add(docTitleLabel);

        Label icon = new Label();
        icon.setStyleName(ReviewValidateConstants.NO_ERROR_ICON);

        docTitlePanel.add(icon);
        docTitleVerticalPanel.add(docType);
        final TreeItem docItem = docTree.addItem(docTitleVerticalPanel);

        addDocDisplayItemsAndHandlers(docBean, docTitleLabel, docType, icon, docItem);

        if (presenter.batchDTO.isErrorContained(docBean)) {
            isThumbNailLoaded = true;
            icon.setStyleName(ReviewValidateConstants.ERROR_ICON);
            if (counter == 0) {
                item = docItem;
                counter++;
            }
        }

        Iterator<Page> iter = docBean.getPages().getPage().iterator();
        for (int i = 0; i < Math.ceil(docBean.getPages().getPage().size() / 2.0); i++) {
            FlexTable flexTable = new FlexTable();
            for (int j = 0; j < 2; j++) {
                if (iter.hasNext()) {
                    final Page pageTypeBean = iter.next();
                    final RotatableImage image = new RotatableImage();
                    if (isThumbNailLoaded && !isFirstThumbNail) {
                        isThumbNailLoaded = false;
                        isFirstThumbNail = true;
                        if (!pageTypeBean.isIsRotated()) {
                            image.setUrl(
                                    presenter.batchDTO.getAbsoluteURLFor(pageTypeBean.getThumbnailFileName()),
                                    pageTypeBean.getDirection());
                        } else {
                            image.setUrl(
                                    presenter.batchDTO.getAbsoluteURLForRotatedImage(
                                            pageTypeBean.getThumbnailFileName(),
                                            pageTypeBean.getDirection().toString()),
                                    pageTypeBean.getDirection());
                        }
                    }
                    image.addStyleName(ReviewValidateConstants.THUMBNAIL_DEFAULT);

                    image.addClickHandler(new ClickHandler() {

                        @Override
                        public void onClick(ClickEvent arg0) {
                            setPageSelected(image, true);
                        }
                    });

                    VerticalPanel imagePanel = setImagesForTree(pageTypeBean, image);
                    flexTable.setWidget(0, j, imagePanel);
                }
                docItem.addItem(flexTable);

            }
        }

    }

    if (fireEvent) {
        setDocumentSelected(item);
        if (selectedDocItem != null) {
            selectedDocItem.setState(true);
        }
    }
}

From source file:com.ephesoft.dcma.gwt.rv.client.view.TableExtractionView.java

License:Open Source License

private void addHeaderColumns(final List<Column> columnList, final FlexTable flexTable) {
    tableNameVsCheckBoxMap.get(selectedDataTableName).clear();
    int columnNumber = 0;
    for (Column headerColumn : columnList) {
        HorizontalPanel headerRowPanel = new HorizontalPanel();
        Label headerText = new Label(headerColumn.getName());
        headerRowPanel.add(headerText);/*from   w  w w.ja  va 2 s  . c om*/
        headerRowPanel.setWidth("80px");
        CheckBox validationCheckBox = new CheckBox();
        validationCheckBox.setVisible(Boolean.FALSE);
        headerRowPanel.add(validationCheckBox);
        headerRowPanel.setCellVerticalAlignment(validationCheckBox, HasVerticalAlignment.ALIGN_MIDDLE);
        tableNameVsCheckBoxMap.get(selectedDataTableName).add(validationCheckBox);
        flexTable.setWidget(0, columnNumber, headerRowPanel);
        flexTable.getCellFormatter().addStyleName(0, columnNumber, "wordWrap");
        columnNumber++;
    }
}

From source file:com.ephesoft.dcma.gwt.uploadbatch.client.view.AssociateBCFView.java

License:Open Source License

public void formatRow(int row) {
    editTable.getCellFormatter().setWidth(row, 0, "40%");
    editTable.getFlexCellFormatter().addStyleName(row, 0, "blk_bold_text");
    editTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
            HasVerticalAlignment.ALIGN_MIDDLE);
    // editTable.getCellFormatter().setWidth(row, 1, "1%");
    editTable.getCellFormatter().setWidth(row, 1, "60%");
    editTable.getFlexCellFormatter().addStyleName(row, 0, "blk_bold_text");
}

From source file:com.ephesoft.dcma.gwt.uploadbatch.client.view.AssociateBCFView.java

License:Open Source License

public void addButtons(int row) {
    editTable.setWidget(row, 0, save);/*w ww  .  j  a  v  a  2 s.c  o  m*/
    editTable.setWidget(row, 1, cancel);
    editTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
            HasVerticalAlignment.ALIGN_MIDDLE);
}

From source file:com.ephesoft.dcma.gwt.uploadbatch.client.view.UploadBatchView.java

License:Open Source License

public void formatRow(int row) {
    editTable.getCellFormatter().setWidth(row, 0, "1%");
    editTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_LEFT,
            HasVerticalAlignment.ALIGN_MIDDLE);
    editTable.getCellFormatter().setWidth(row, 1, "48%");
    editTable.getCellFormatter().setWidth(row, 2, "30%");
    editTable.getFlexCellFormatter().addStyleName(0, 0, BOLD_TEXT);
    editTable.getFlexCellFormatter().addStyleName(0, 1, BOLD_TEXT);
    editTable.getFlexCellFormatter().addStyleName(1, 0, BOLD_TEXT);
    editTable.getFlexCellFormatter().addStyleName(1, 1, BOLD_TEXT);
}