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.edgenius.wiki.gwt.client.widgets.ImageSlider.java

License:Open Source License

/**
 * show or hide loading indicator.  /*from  www .  ja v  a 2  s.c o  m*/
 * 
 * This method will clear panel.
 * 
 * @param showLoading
 */
public void showLoading(boolean showLoading) {
    this.clear();

    if (showLoading) {
        Image loading = new Image(IconBundle.I.get().loadingBar());
        rowPanel.add(loading);
        rowPanel.setCellHorizontalAlignment(loading, HasHorizontalAlignment.ALIGN_CENTER);
        rowPanel.setCellVerticalAlignment(loading, HasVerticalAlignment.ALIGN_MIDDLE);
    }
}

From source file:com.edgenius.wiki.gwt.client.widgets.MessageDialog.java

License:Open Source License

public MessageDialog(UIObject parent, int type, String caption, String message) {
    super(parent);

    if (caption != null)
        this.setText(caption);
    else {//ww  w .  java  2s  .co m
        if (type == TYPE_CONFIRM) {
            this.setText(Msg.consts.confirm());
            this.setIcon(new Image(IconBundle.I.get().comment()));
        } else {
            this.setText(Msg.consts.alert());
            this.setIcon(new Image(IconBundle.I.get().warning()));
        }
    }

    this.addStyleName(Css.MESSAGE_DIALOG);
    ButtonBar btnBar = getButtonBar();
    FlexTable panel = new FlexTable();

    if (type == TYPE_CONFIRM) {
        panel.setWidget(0, 0, new Image(LargeIconBundle.I.get().question()));

        Button okBtn = new Button(Msg.consts.ok(), ButtonIconBundle.tickImage());
        Button cancelBtn = new Button(Msg.consts.cancel(), ButtonIconBundle.crossImage());
        okBtn.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                confirmEvent();
                MessageDialog.this.hidebox();
            }
        });
        cancelBtn.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                cancelEvent();
                MessageDialog.this.hidebox();
            }

        });
        btnBar.add(cancelBtn);
        btnBar.add(okBtn);
    } else if (type == TYPE_ALERT) {
        panel.setWidget(0, 0, new Image(LargeIconBundle.I.get().warning()));
        Button okBtn = new Button(Msg.consts.ok(), ButtonIconBundle.tickImage());
        okBtn.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                MessageDialog.this.hidebox();
            }

        });
        btnBar.add(okBtn);
    }

    Label lb = new Label(message);
    lb.setStyleName(Css.MESSAGE);
    panel.setWidget(0, 1, lb);
    panel.getCellFormatter().setWidth(0, 1, "99%");
    panel.getFlexCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_MIDDLE);
    panel.setWidth("100%");

    this.setWidget(panel);
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.presenter.plugin.KV_PP_DetailPresenter.java

License:Open Source License

private void setProperties() {
    int row = 0;/* w  w w  .  j  a  va  2s.c  om*/
    Collection<BatchClassPluginConfigDTO> values = controller.getSelectedPlugin().getBatchClassPluginConfigs();
    if (values != null) {
        for (BatchClassPluginConfigDTO pluginDTO : values) {
            if (!pluginDTO.getPluginConfig().getFieldName()
                    .equals(BatchClassManagementConstants.KV_PAGE_PROCESS_CONFIG_NAME)) {
                viewTable.setWidget(row, 0,
                        new Label(pluginDTO.getDescription() + BatchClassManagementConstants.COLON));
                viewTable.setWidget(row, 2, new Label(pluginDTO.getValue()));
                viewTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text");
                viewTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
                        HasVerticalAlignment.ALIGN_MIDDLE);
                row++;
            }
        }
    }
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.presenter.plugin.PluginDataPresenter.java

License:Open Source License

/**
 * To set properties.//from   ww w  . j  a v a 2  s .c  o  m
 */
public void setProperties() {

    BatchClassPluginDTO selectedPlugin = controller.getSelectedPlugin();
    if (selectedPlugin != null) {

        viewTable.setWidget(0, 0, pluginName);
        pluginNameValue.setText(selectedPlugin.getPlugin().getPluginName());
        viewTable.setWidget(0, 2, pluginNameValue);

        viewTable.setWidget(1, 0, pluginDescription);
        pluginDescriptionValue.setText(selectedPlugin.getPlugin().getPluginDescription());
        viewTable.setWidget(1, 2, pluginDescriptionValue);

        viewTable.setWidget(2, 0, pluginInformation);
        pluginInformationValue.setText(selectedPlugin.getPlugin().getPluginInformation());
        viewTable.setWidget(2, 2, pluginInformationValue);

        for (int row = 0; row < THREE; row++) {
            viewTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
                    HasVerticalAlignment.ALIGN_MIDDLE);
            viewTable.getFlexCellFormatter().addStyleName(row, 0, "leftCell");
            viewTable.getFlexCellFormatter().addStyleName(row, 2, "rightCell");
            viewTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text");
        }
    }
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.presenter.plugin.PluginDetailPresenter.java

License:Open Source License

/**
 * To set properties./* w  w w. j a va2s.c  o m*/
 */
public void setProperties() {
    int row = 0;
    Collection<BatchClassPluginConfigDTO> values = controller.getSelectedPlugin().getBatchClassPluginConfigs();
    if (values != null) {
        for (BatchClassPluginConfigDTO pluginDTO : values) {
            viewTable.setWidget(row, 0,
                    new Label(pluginDTO.getDescription() + BatchClassManagementConstants.COLON));
            viewTable.setWidget(row, 2, new Label(pluginDTO.getValue()));
            viewTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text");
            viewTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
                    HasVerticalAlignment.ALIGN_MIDDLE);
            row++;
        }
    }
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.presenter.scanner.ScannerDetailPresenter.java

License:Open Source License

private void setProperties() {
    int row = 0;/* w w w .  j  a v  a  2 s. co m*/
    Collection<WebScannerConfigurationDTO> values = controller.getSelectedWebScannerConfiguration()
            .getChildren();
    if (values != null) {

        // handling for profile name field
        dataTable.setWidget(row, 0, new Label(controller.getSelectedWebScannerConfiguration().getDescription()
                + BatchClassManagementConstants.COLON));
        dataTable.setWidget(row, 2, new Label(controller.getSelectedWebScannerConfiguration().getValue()));
        dataTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text");
        dataTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
                HasVerticalAlignment.ALIGN_MIDDLE);
        row++;

        for (WebScannerConfigurationDTO dto : values) {
            dataTable.setWidget(row, 0, new Label(dto.getDescription() + BatchClassManagementConstants.COLON));
            dataTable.setWidget(row, 2, new Label(dto.getValue()));
            dataTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text");
            dataTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
                    HasVerticalAlignment.ALIGN_MIDDLE);
            row++;
        }
    }
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.batch.BatchClassView.java

License:Open Source License

/**
 * Constructor./*w w w  .  ja  v a  2 s  .c o  m*/
 */
public BatchClassView() {
    super();
    initWidget(BINDER.createAndBindUi(this));

    moduleListView = new ModuleListView();
    addDocumentButton.setText(AdminConstants.ADD_BUTTON);
    addScannerButton.setText(AdminConstants.ADD_BUTTON);
    addEmailButton.setText(AdminConstants.ADD_BUTTON);
    addCmisButton.setText(AdminConstants.ADD_BUTTON);
    editDocumentButton.setText(AdminConstants.EDIT_BUTTON);
    copyDocumentButton.setText(AdminConstants.COPY_BUTTON);
    editEmailButton.setText(AdminConstants.EDIT_BUTTON);
    editCmisButton.setText(AdminConstants.EDIT_BUTTON);
    editScannerButton.setText(AdminConstants.EDIT_BUTTON);

    deleteDocumentButton.setText(AdminConstants.DELETE_BUTTON);
    deleteEmailButton.setText(AdminConstants.DELETE_BUTTON);
    deleteCmisButton.setText(AdminConstants.DELETE_BUTTON);
    deleteScannerButton.setText(AdminConstants.DELETE_BUTTON);
    docTypeListView = new DocumentTypeListView();
    moduleListPanel.add(moduleListView.listView);
    docTypeLayoutPanel.add(docTypeListView.listView);
    emailListView = new EmailListView();
    cmisListView = new CmisImporterListView();
    scannerListView = new ScannerListView();
    emailLayoutPanel.add(emailListView.listView);
    cmisLayoutPanel.add(cmisListView.listView);
    scannerLayoutPanel.add(scannerListView.listView);
    batchClassConfigurationCaptionPanel.setCaptionHTML(AdminConstants.BATCH_CLASS_CONFIGURATION_HTML);
    editBatchPropertiesButton.setText(AdminConstants.EDIT_BUTTON);

    addDocumentButton.setHeight(TWENTY_PIXEL);
    addScannerButton.setHeight(TWENTY_PIXEL);
    addEmailButton.setHeight(TWENTY_PIXEL);
    addCmisButton.setHeight(TWENTY_PIXEL);
    editDocumentButton.setHeight(TWENTY_PIXEL);
    copyDocumentButton.setHeight(TWENTY_PIXEL);
    editEmailButton.setHeight(TWENTY_PIXEL);
    editCmisButton.setHeight(TWENTY_PIXEL);
    editScannerButton.setHeight(TWENTY_PIXEL);
    deleteDocumentButton.setHeight(TWENTY_PIXEL);
    deleteEmailButton.setHeight(TWENTY_PIXEL);
    deleteCmisButton.setHeight(TWENTY_PIXEL);
    deleteScannerButton.setHeight(TWENTY_PIXEL);

    addModuleView = new ConfigureModuleView();
    editModuleButton.setText(AdminConstants.EDIT_BUTTON);
    editModuleButton.setHeight(TWENTY_PIXEL);
    addModuleButton.setText(AdminConstants.EDIT_LIST_BUTTON);
    addModuleButton.setHeight(TWENTY_PIXEL);
    buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);

    buttonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    documentButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    emailButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    scannerButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    buttonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);
    documentButtonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);
    emailButtonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);
    cmisButtonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);
    scannerButtonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);

    addBatchClassFieldButton.setText(AdminConstants.ADD_BUTTON);
    editBatchClassFieldButton.setText(AdminConstants.EDIT_BUTTON);
    deleteBatchClassFieldButton.setText(AdminConstants.DELETE_BUTTON);
    addBatchClassFieldButton.setHeight(TWENTY_PIXEL);
    editBatchClassFieldButton.setHeight(TWENTY_PIXEL);
    deleteBatchClassFieldButton.setHeight(TWENTY_PIXEL);
    batchClassFieldButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    batchClassFieldButtonPanel.addStyleName(AdminConstants.PADDING_STYLE_TOPPADD);
    batchClassFieldListView = new BatchClassFieldListView();
    batchClassFieldListPresenter = null;
    documentTypeListPresenter = null;
    moduleListPresenter = null;
    emailListPresenter = null;
    cmisListPresenter = null;
    scannerListPresenter = null;

    batchClassFieldLayoutPanel.add(batchClassFieldListView.listView);
}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.module.ConfigureModulesPluginSelectView.java

License:Open Source License

private void addCSSStyle() {

    buttonsHorizontalPanel.setSpacing(BatchClassManagementConstants.THIRTY);
    okButton.addStyleName("button-style");
    cancelButton.addStyleName("button-style");
    resetButton.addStyleName("button-style");

    buttonsHorizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    buttonsHorizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    customWorkflowVerticalPanel.addStyleName("mainPanelLayout");

}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.module.ConfigureModuleView.java

License:Open Source License

private void addCSSStyle() {
    addNewModule.addStyleName(BUTTON_STYLE);
    okButton.addStyleName(BUTTON_STYLE);
    resetButton.addStyleName(BUTTON_STYLE);
    cancelButton.addStyleName(BUTTON_STYLE);

    buttonsVerticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    buttonsVerticalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    customWorkflowPanel.addStyleName("mainPanelLayout");
    multipleSelectTwoSidedListBox.addStyleName("custom-workflow-panel");

}

From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.BoxExporterDetailView.java

License:Open Source License

/**
 * To set Properties./*from   w ww  .  j  av a  2 s .  co m*/
 * 
 * @param pluginConfigDTO BatchClassPluginConfigDTO
 * @param row int
 */
public void setProperties(BatchClassPluginConfigDTO pluginConfigDTO, int row) {
    Label propertyName = new Label(pluginConfigDTO.getDescription() + AdminConstants.COLON);
    Label propertyValue = new Label(pluginConfigDTO.getValue());
    detailTable.setWidget(row, 0, propertyName);
    detailTable.setWidget(row, 2, propertyValue);
    detailTable.getFlexCellFormatter().addStyleName(row, 0, AdminConstants.BOLD_TEXT_STYLE);
    detailTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT,
            HasVerticalAlignment.ALIGN_MIDDLE);
}