Search in sources :

Example 6 with TextCell

use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.

the class ContainerConfigParamsView method addVersionColumn.

private void addVersionColumn() {
    Column<ContainerConfig, String> column = new Column<ContainerConfig, String>(new TextCell()) {

        @Override
        public String getValue(ContainerConfig containerConfig) {
            return containerConfig.getVersion();
        }
    };
    dataGrid.addColumn(column, translationService.getTranslation(ContainerConfigParamsView_VersionColumn));
}
Also used : ContainerConfigParamsView_ArtifactIdColumn(org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_ArtifactIdColumn) ContainerConfigParamsView_VersionColumn(org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_VersionColumn) ContainerConfigParamsView_GroupIdColumn(org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_GroupIdColumn) ContainerConfigParamsView_ContainerNameColumn(org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_ContainerNameColumn) Column(com.google.gwt.user.cellview.client.Column) TextCell(com.google.gwt.cell.client.TextCell)

Example 7 with TextCell

use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.

the class ProjectClassListViewImpl method addClassNameColumn.

private void addClassNameColumn() {
    Column<ClassRow, String> column = new Column<ClassRow, String>(new TextCell()) {

        @Override
        public String getValue(ClassRow classRow) {
            if (classRow.getClassName() != null) {
                return classRow.getClassName();
            } else {
                return "";
            }
        }
    };
    dataGrid.addColumn(column, Constants.INSTANCE.project_class_list_class_name_column());
    dataGrid.setColumnWidth(column, 90, Style.Unit.PCT);
}
Also used : Column(com.google.gwt.user.cellview.client.Column) TextCell(com.google.gwt.cell.client.TextCell)

Example 8 with TextCell

use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.

the class DatabaseObjectExplorerViewImpl method addTypeColumn.

private void addTypeColumn() {
    Column<DatabaseObjectRow, String> column = new Column<DatabaseObjectRow, String>(new TextCell()) {

        @Override
        public String getValue(DatabaseObjectRow row) {
            return row.getType();
        }
    };
    dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectTypeColumn));
    dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
Also used : Column(com.google.gwt.user.cellview.client.Column) TextCell(com.google.gwt.cell.client.TextCell)

Example 9 with TextCell

use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.

the class DatabaseObjectExplorerViewImpl method addNameColumn.

private void addNameColumn() {
    Column<DatabaseObjectRow, String> column = new Column<DatabaseObjectRow, String>(new TextCell()) {

        @Override
        public String getValue(DatabaseObjectRow row) {
            return row.getName();
        }
    };
    dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectNameColumn));
    dataGrid.setColumnWidth(column, 80, Style.Unit.PCT);
}
Also used : Column(com.google.gwt.user.cellview.client.Column) TextCell(com.google.gwt.cell.client.TextCell)

Example 10 with TextCell

use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.

the class DataSourceSelectorViewImpl method init.

@PostConstruct
private void init() {
    dataGrid.setHeight("200px");
    dataGrid.setColumnPickerButtonVisible(false);
    dataGrid.setEmptyTableCaption(translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_NoAvailableDataSourcesMessage));
    Column<DataSourceSelectorPageRow, String> nameColumn = new Column<DataSourceSelectorPageRow, String>(new TextCell()) {

        @Override
        public String getValue(DataSourceSelectorPageRow row) {
            return row.getDataSourceDefInfo().getName();
        }
    };
    dataGrid.addColumn(nameColumn, translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_DataSourceColumn));
    Column<DataSourceSelectorPageRow, String> selectorColumn = new Column<DataSourceSelectorPageRow, String>(new ButtonCell(ButtonType.PRIMARY, ButtonSize.SMALL)) {

        @Override
        public String getValue(DataSourceSelectorPageRow row) {
            return translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_SelectButton);
        }
    };
    selectorColumn.setFieldUpdater(new FieldUpdater<DataSourceSelectorPageRow, String>() {

        @Override
        public void update(int index, DataSourceSelectorPageRow row, String value) {
            selectedRow = row;
            cancelNextHiddenEvent = true;
            modal.hide();
            presenter.onSelect();
        }
    });
    dataGrid.addColumn(selectorColumn, "");
    mainPanel.add(dataGrid);
    this.modal = new BaseModal();
    this.modal.setTitle(translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_Title));
    this.modal.setBody(this);
    this.modal.addHiddenHandler(new ModalHiddenHandler() {

        @Override
        public void onHidden(ModalHiddenEvent evt) {
            if (!cancelNextHiddenEvent) {
                presenter.onClose();
            }
            cancelNextHiddenEvent = false;
        }
    });
}
Also used : BaseModal(org.uberfire.ext.widgets.common.client.common.popups.BaseModal) Column(com.google.gwt.user.cellview.client.Column) ModalHiddenHandler(org.gwtbootstrap3.client.shared.event.ModalHiddenHandler) ButtonCell(org.gwtbootstrap3.client.ui.gwt.ButtonCell) ModalHiddenEvent(org.gwtbootstrap3.client.shared.event.ModalHiddenEvent) TextCell(com.google.gwt.cell.client.TextCell) PostConstruct(javax.annotation.PostConstruct)

Aggregations

TextCell (com.google.gwt.cell.client.TextCell)23 Column (com.google.gwt.user.cellview.client.Column)21 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)4 SelectionChangeEvent (com.google.gwt.view.client.SelectionChangeEvent)4 ContainerConfigParamsView_ArtifactIdColumn (org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_ArtifactIdColumn)4 ContainerConfigParamsView_ContainerNameColumn (org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_ContainerNameColumn)4 ContainerConfigParamsView_GroupIdColumn (org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_GroupIdColumn)4 ContainerConfigParamsView_VersionColumn (org.guvnor.ala.ui.client.resources.i18n.GuvnorAlaUIConstants.ContainerConfigParamsView_VersionColumn)4 Revision (org.eclipse.che.api.git.shared.Revision)3 ButtonCell (com.google.gwt.cell.client.ButtonCell)2 Context (com.google.gwt.cell.client.Cell.Context)2 EditTextCell (com.google.gwt.cell.client.EditTextCell)2 DoubleClickEvent (com.google.gwt.event.dom.client.DoubleClickEvent)2 DoubleClickHandler (com.google.gwt.event.dom.client.DoubleClickHandler)2 SingleSelectionModel (com.google.gwt.view.client.SingleSelectionModel)2 SshPairDto (org.eclipse.che.api.ssh.shared.dto.SshPairDto)2 TemplateParamsTableView_ParamNameColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamNameColumn)2 TemplateParamsTableView_ParamRequiredColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamRequiredColumn)2 TemplateParamsTableView_ParamValueColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamValueColumn)2 TemplateParam (org.guvnor.ala.ui.openshift.model.TemplateParam)2