当前位置: 首页>>代码示例>>Java>>正文


Java ButtonCell类代码示例

本文整理汇总了Java中org.gwtbootstrap3.client.ui.gwt.ButtonCell的典型用法代码示例。如果您正苦于以下问题:Java ButtonCell类的具体用法?Java ButtonCell怎么用?Java ButtonCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ButtonCell类属于org.gwtbootstrap3.client.ui.gwt包,在下文中一共展示了ButtonCell类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addDeleteColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
private void addDeleteColumn() {
    final ButtonCell deleteCell = new ButtonCell( ButtonType.DANGER, IconType.TRASH );
    final Column<ListenerModel, String> column = new Column<ListenerModel, String>( deleteCell ) {
        @Override
        public String getValue( ListenerModel object ) {
            return "";
        }
    };

    column.setFieldUpdater( new FieldUpdater<ListenerModel, String>() {
        @Override
        public void update( int index,
                            ListenerModel model,
                            String value ) {
            presenter.onDelete( model );
        }
    } );
    column.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );

    dataGrid.addColumn( column,
            CommonConstants.INSTANCE.Delete() );
    dataGrid.setColumnWidth( column,
            60,
            Style.Unit.PX );
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:26,代码来源:ListenersPanelViewImpl.java

示例2: addDeleteColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
private void addDeleteColumn() {
    final ButtonCell deleteCell = new ButtonCell( ButtonType.DANGER, IconType.TRASH );
    final Column<WorkItemHandlerModel, String> column = new Column<WorkItemHandlerModel, String>( deleteCell ) {
        @Override
        public String getValue( WorkItemHandlerModel object ) {
            return "";
        }
    };

    column.setFieldUpdater( new FieldUpdater<WorkItemHandlerModel, String>() {
        @Override
        public void update( int index,
                            WorkItemHandlerModel model,
                            String value ) {
            presenter.onDelete( model );
        }
    } );
    column.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );

    dataGrid.addColumn( column,
            CommonConstants.INSTANCE.Delete() );
    dataGrid.setColumnWidth( column,
            60,
            Style.Unit.PX );
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:26,代码来源:WorkItemHandlersPanelViewImpl.java

示例3: addRemoveRowColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
private void addRemoveRowColumn() {
    ButtonCell buttonCell = new ButtonCell(IconType.TRASH,
                                           ButtonType.DANGER,
                                           ButtonSize.SMALL);
    Column<ContainerConfig, String> column = new Column<ContainerConfig, String>(buttonCell) {
        @Override
        public String getValue(ContainerConfig containerConfig) {
            return translationService.getTranslation(ContainerConfigParamsView_Delete);
        }
    };

    column.setFieldUpdater((index, containerConfig, value) -> presenter.onDeleteContainer(containerConfig));

    dataGrid.addColumn(column,
                       "");
    dataGrid.setColumnWidth(column,
                            90,
                            Style.Unit.PX);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:ContainerConfigParamsView.java

示例4: initActionColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
private void initActionColumn() {
	ButtonCell buttonCell = new ButtonCell(IconType.COG, ButtonType.LINK, ButtonSize.DEFAULT);
	PopupCell<String> popupCell = new PopupCell<String>(
			contextPanel, buttonCell);
	actionColumn = new Column<TemplateDto, String>(
			popupCell) {
		@Override
		public String getValue(TemplateDto object) {
			return "";
		}
	};
	actionColumn.setCellStyleNames("templates-action-cell " + style.templatesActionCell());
	addColumntoTemplateTable(actionColumn, "");
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:15,代码来源:TemplateListPanel.java

示例5: createAttributeRemoveColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeRemoveColumn() {
    // On read mode, remove button not present.
    if (!canManageAttributes()) {
        return null;
    }

    // Create remove button column.
    final ButtonCell removeButtonCell = new ButtonCell(IconType.CLOSE,
                                                       ButtonType.LINK,
                                                       ButtonSize.SMALL);
    final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> removeColumn =
            new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(removeButtonCell) {

                @Override
                public String getValue(final Entry<String, String> object) {
                    // if can be removed return empty string, if not, return null
                    if (object != null) {
                        final UserManager.UserAttribute attribute = getAttribute(object.getKey());
                        if (attribute != null && !attribute.isMandatory() && attribute.isEditable()) {
                            removeButtonCell.setEnabled(true);
                            return "";
                        }
                    }
                    removeButtonCell.setEnabled(false);
                    return null;
                }
            };

    removeColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    removeColumn.setFieldUpdater(canManageAttributes() ? removeButtonHandler : null);

    return removeColumn;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:34,代码来源:UserAttributesEditor.java

示例6: addButtonColumn

import org.gwtbootstrap3.client.ui.gwt.ButtonCell; //导入依赖的package包/类
@Override
public MapEditor.View addButtonColumn(final int columnIndex, final String header, final int width) {
    final com.google.gwt.user.cellview.client.Column<Map.Entry<String, String>, String> removeColumn =
            new com.google.gwt.user.cellview.client.Column<Map.Entry<String, String>, String>(new ButtonCell( IconType.MINUS, ButtonSize.EXTRA_SMALL)) {

                @Override
                public String getValue(Map.Entry<String, String> object) {
                    return presenter.getValue(columnIndex, object);
                }
            };
    addColumn(removeColumn, columnIndex, header, false, width);
    return this;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:14,代码来源:MapEditorView.java


注:本文中的org.gwtbootstrap3.client.ui.gwt.ButtonCell类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。