本文整理汇总了Java中com.google.gwt.user.client.ui.PushButton.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java PushButton.setStyleName方法的具体用法?Java PushButton.setStyleName怎么用?Java PushButton.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.PushButton
的用法示例。
在下文中一共展示了PushButton.setStyleName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ButtonCaption
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public ButtonCaption(String label)
{
super();
setWidth("100%");
setStyleName("Caption");
closeImage = new Image(images.closeIconImageData().getSafeUri());
closeImage.setSize("16px","16px");
closeDialog = new PushButton(closeImage);
closeDialog.setStyleName(css.closeIconStyle());
add(text = new InlineLabel(label));
add(closeDialog);
setCellHorizontalAlignment(getElement(),ALIGN_RIGHT);
setCellWidth(closeDialog,"1px");
setCellHeight(closeDialog,"1px");
}
示例2: newShiftDateButton
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
* Returns a new button that shifts the date when clicked.
* @param seconds How many seconds to shift.
* @param label The label to put on the button.
*/
private PushButton newShiftDateButton(final int seconds,
final String label) {
final PushButton button = new PushButton(label);
button.setStyleName(seconds < 0 ? "datePickerPreviousButton"
: "datePickerNextButton");
button.addClickHandler(new ClickHandler() {
public void onClick(final ClickEvent event) {
Date d = box.getValue();
if (d == null) {
if (seconds >= 0) {
return;
}
d = new Date();
}
d.setTime(d.getTime() + seconds * 1000);
d.setSeconds(0);
setDate(d);
}
});
return button;
}
示例3: ShapeModule
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public ShapeModule() {
button = new PushButton();
button.setStyleName("qp-shape");
}
示例4: createPushButtonWithImageStates
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
* Creates a {@link PushButton} with the specified face images and stylename.
*
* @param upImage
* the image to be used on the up face
* @param styleName
* the stylename to use for the widget
* @param handler
* a click handler to which to bind the button
* @return the button
*/
public static PushButton createPushButtonWithImageStates(Image upImage,
String styleName, ClickHandler handler) {
final PushButton button = new PushButton(upImage, handler);
button.setStyleName(styleName);
return button;
}