本文整理汇总了Java中com.google.gwt.user.client.ui.PushButton.setStylePrimaryName方法的典型用法代码示例。如果您正苦于以下问题:Java PushButton.setStylePrimaryName方法的具体用法?Java PushButton.setStylePrimaryName怎么用?Java PushButton.setStylePrimaryName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.PushButton
的用法示例。
在下文中一共展示了PushButton.setStylePrimaryName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ComplexColorPicker
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public ComplexColorPicker() {
style.ensureInjected();
// The background color can be set to "none"
noneBtn = new PushButton(messages.none());
noneBtn.addStyleName(ComplexColorPicker.style.buttonsMargins());
noneBtn.setStylePrimaryName(ComplexColorPicker.style.customColorPushbutton());
noneBtn.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
listener.onNoneColorChoose();
}
});
vp = new VerticalPanel();
// We use a simple color picker by default
simplePicker = new SimpleColorPicker(this);
vp.add(simplePicker);
vp.add(noneBtn);
super.add(vp);
}
示例2: createBrowserItemWidget
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
protected Widget createBrowserItemWidget(final int type, boolean enabled) {
final ClickHandler clickHandler = new ClickHandler() {
public void onClick(ClickEvent event) {
switch(type) {
case FIRST:
_page = 0;
break;
case PREV:
--_page;
break;
case NEXT:
++_page;
break;
case LAST:
_page = _pages - 1;
break;
}
fireChange();
}
};
PushButton button = new PushButton();
button.setStylePrimaryName(STYLES_BROWSER[type]);
button.setEnabled(enabled);
if(enabled) button.addClickHandler(clickHandler);
return button;
}
示例3: render
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Object render(final ProjectFundingDTO model, final String property, final ColumnData config, final int rowIndex, final int colIndex,
final ListStore<ProjectFundingDTO> store, final Grid<ProjectFundingDTO> grid) {
// Creates the button with its icon.
final PushButton editButton = new PushButton(IconImageBundle.ICONS.editLinkedProject().createImage());
editButton.setStylePrimaryName(STYLE_EDIT_BUTTON);
// Sets the button click handler.
editButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
view.getPresenterHandler().onLinkedProjectEditClickEvent(model, projectType);
}
});
// Returns this button.
return editButton;
}
示例4: createCell
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
* Creates the cell for each color.
*
* @param color the color
* @return the widget
*/
private Widget createCell(final String color) {
final PushButton button = new PushButton();
button.setStylePrimaryName(style.simplecolorbutton());
button.setSize(CELL_SIZE, CELL_SIZE);
button.getElement().getStyle().setBackgroundColor(color);
return button;
}
示例5: createLoadingWidget
import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
protected Widget createLoadingWidget() {
PushButton loading = new PushButton();
loading.setStylePrimaryName(STYLE_LOADING);
return loading;
}