本文整理汇总了Java中com.google.gwt.user.client.ui.Button.setHTML方法的典型用法代码示例。如果您正苦于以下问题:Java Button.setHTML方法的具体用法?Java Button.setHTML怎么用?Java Button.setHTML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Button
的用法示例。
在下文中一共展示了Button.setHTML方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
@Override
public void render(RendererCellReference cell, String text, Button button) {
Element e = button.getElement();
if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
e.setPropertyString(ROW_KEY_PROPERTY,
getRowKey((JsonObject) cell.getRow()));
}
if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
.getColumn(cell.getColumnIndex()))) {
e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
.getColumn(cell.getColumnIndex())));
}
if (htmlContentAllowed) {
button.setHTML(text);
} else {
button.setText(text);
}
button.setEnabled(true);
}
示例2: render
import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
@Override
public void render(RendererCellReference cell, Boolean enable, Button button) {
Element e = button.getElement();
if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
e.setPropertyString(ROW_KEY_PROPERTY,
getRowKey((JsonObject) cell.getRow()));
}
if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
.getColumn(cell.getColumnIndex()))) {
e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
.getColumn(cell.getColumnIndex())));
}
String style = button.getStyleName();
if (style != null && style.contains("delete-confirm")) {
button.removeStyleName("delete-confirm");
}
if (htmlContentAllowed) {
button.setHTML(getState().delete);
} else {
button.setText(getState().delete);
}
button.setEnabled(enable);
}
示例3: genButton
import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
private Button genButton(final int bitm) {
Button btn = GWT.create(Button.class);
btn.setStylePrimaryName("v-nativebutton");
switch (bitm) {
case VIEW_BITM:
btn.addStyleName("v-view");
break;
case EDIT_BITM:
btn.addStyleName("v-edit");
break;
case DELETE_BITM:
btn.addStyleName("v-delete");
break;
}
btn.setHTML("<span></span>");
btn.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
VButtonValueRenderer.this.clickedBITM = bitm;
VButtonValueRenderer.super.onClick(event);
}
});
return btn;
}
示例4: render
import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
@Override
public void render(final RendererCellReference cell, final String text, final Button button) {
final boolean buttonEnable = isButtonEnable(cell.getElement().getClassName());
if (text != null) {
button.setHTML(text);
}
applystyles(button, buttonEnable);
// this is to allow the button to disappear, if the text is null
button.setVisible(text != null);
button.getElement().setId(UIComponentIdProvider.ROLLOUT_ACTION_ID + "." + cell.getColumnIndex());
button.setEnabled(buttonEnable);
}
示例5: render
import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
@Override
public void render(final RendererCellReference cell, final FontIconData iconMetadata, final Button button) {
if (iconMetadata.getFontIconHtml() != null) {
button.setHTML(iconMetadata.getFontIconHtml());
}
applyStyles(button, iconMetadata.isDisabled(), iconMetadata.getStyle());
button.getElement().setId(iconMetadata.getId());
button.getElement().setTitle(iconMetadata.getTitle());
button.setEnabled(!iconMetadata.isDisabled());
// this is to allow the button to disappear, if the text is null
button.setVisible(iconMetadata.getFontIconHtml() != null);
}