本文整理汇总了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 );
}
示例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 );
}
示例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);
}
示例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, "");
}
示例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;
}
示例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;
}