本文整理汇总了Java中org.gwtbootstrap3.client.ui.constants.ButtonSize类的典型用法代码示例。如果您正苦于以下问题:Java ButtonSize类的具体用法?Java ButtonSize怎么用?Java ButtonSize使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonSize类属于org.gwtbootstrap3.client.ui.constants包,在下文中一共展示了ButtonSize类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addButtons
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
private ButtonGroup addButtons() {
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.setHeight("4em");
buttonGroup.setJustified(true);
buttonGroup.setDataToggle(Toggle.BUTTONS);
for (final ButtonType t : ButtonType.values()) {
RadioButton radioButton = new RadioButton(t.toString());
radioButton.setType(t);
radioButton.setSize(ButtonSize.SMALL);
radioButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
userColor = t.name();
}
});
buttonGroup.add(radioButton);
}
return buttonGroup;
}
示例2: createButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
void createButton() {
itemButton.setSize(ButtonSize.SMALL);
itemButton.setType(ButtonType.LINK);
configureIcon(itemButton,
getDock().getImageIcon());
mouseEventHandler = new MouseEventHandler();
itemButton.addDomHandler(mouseEventHandler,
MouseOverEvent.getType());
itemButton.addStyleName(CSS.CSS().sideDockItem());
itemButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (!isOpened()) {
openAndExecuteExpandCommand();
} else {
closeAndExecuteCommand();
}
}
});
}
示例3: createButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
void createButton(final SideDockItem parent) {
itemButton.setSize(ButtonSize.SMALL);
itemButton.setType(ButtonType.INFO);
parent.configureText(itemButton,
parent.getLabel());
parent.configureIcon(itemButton,
parent.getDock().getImageIconFocused());
onMouseOutHidePopup();
itemButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (!parent.isOpened()) {
active();
parent.openAndExecuteExpandCommand();
} else {
inactive();
parent.closeAndExecuteCommand();
}
}
});
}
示例4: createButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
void createButton() {
itemButton.setSize(ButtonSize.SMALL);
itemButton.setType(ButtonType.LINK);
configureText(itemButton,
getDock().getLabel());
configureIcon(itemButton,
getDock().getImageIcon());
itemButton.getElement().addClassName(CSS.CSS().southDockItem());
itemButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (!opened) {
open();
openCommand.execute(getIdentifier());
} else {
close();
closeCommand.execute(getIdentifier());
}
}
});
}
示例5: makeDropDownMenuButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = GWT.create(ButtonGroup.class);
final Button dropdownButton = GWT.create(Button.class);
dropdownButton.setText(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
dropDownMenu.setPull(Pull.RIGHT);
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
示例6: getMenuActionsButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
protected ButtonGroup getMenuActionsButton() {
return new ButtonGroup() {{
add(new Button( Constants.INSTANCE.menu_button_actions()) {{
setSize(ButtonSize.EXTRA_SMALL);
addStyleName(Pull.RIGHT.getCssName());
setDataToggle(Toggle.DROPDOWN);
}} );
add(new DropDownMenu() {{
add(new AnchorListItem(Constants.INSTANCE.menu_edit()) {{
addClickHandler(event -> getEditCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_clone() ) {{
addClickHandler(event -> getCloneCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_export_csv() ) {{
addClickHandler(event -> getExportCsvCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_export_excel()) {{
addClickHandler(event -> getExportExcelCommand().execute());
}} );
}} );
}};
}
示例7: buildDevMenuItem
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
private MenuItem buildDevMenuItem() {
final DropDownMenu menu = new DropDownMenu() {{
addStyleName("pull-right");
}};
for (final MenuDevCommand command : devCommands) {
menu.add(new AnchorListItem(command.getText()) {{
setIcon(command.getIcon());
addClickHandler(event -> command.execute());
}});
}
final IsWidget group = new ButtonGroup() {{
add(new Button() {{
setToggleCaret(false);
setDataToggle(Toggle.DROPDOWN);
setIcon(IconType.COG);
setSize(ButtonSize.SMALL);
setTitle("Development");
}});
add(menu);
}};
return MenuUtils.buildItem(group);
}
示例8: addRemoveRowColumn
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的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);
}
示例9: initActionColumn
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的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, "");
}
示例10: addPluginButtons
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
private void addPluginButtons() {
if(property.getPlugins() != null) {
pluginButtonGroup = new ButtonGroup();
pluginButtonGroup.addStyleName("btn-group-responsive has-bottom-margin");
for(Plugin plugin : property.getPlugins()) {
if(!plugin.isAutomaticallyTriggered()) {
final Button btn = new Button(plugin.getLabel());
btn.setSize(ButtonSize.EXTRA_SMALL);
btn.setType(ButtonType.INFO);
btn.setIcon(IconType.fromStyleName(plugin.getIcon()));
pluginButtonGroup.add(btn);
final String pluginname = plugin.getName();
btn.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
btn.state().loading();
runPlugin(pluginname);
}
});
pluginbuttons.put(plugin.getName(), btn);
}
}
if(pluginButtonGroup.getWidgetCount() > 0)
this.add(pluginButtonGroup);
}
// Enable/Disable plugin buttons
for(Entity entity : this.entities) {
handleEntityPlugins(entity);
}
}
示例11: getView
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
@WorkbenchPartView
public IsWidget getView() {
final FlowPanel widgets = new FlowPanel();
widgets.getElement().getStyle().setPadding(15,
Style.Unit.PX);
for (final YouTubeVideo video : VIDEOS) {
final Heading h3 = new Heading(HeadingSize.H3,
video.getName());
final Paragraph p = new Paragraph(video.getDescription());
final Button play = new Button("Play",
new ClickHandler() {
@Override
public void onClick(final ClickEvent e) {
event.fire(video);
}
});
play.setIcon(IconType.YOUTUBE_PLAY);
play.setSize(ButtonSize.SMALL);
widgets.add(h3);
widgets.add(p);
widgets.add(play);
}
return widgets;
}
示例12: PropertyEditorItemButtons
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
public PropertyEditorItemButtons() {
initWidget(uiBinder.createAndBindUi(this));
removalButton.setType(ButtonType.DANGER);
removalButton.setSize(ButtonSize.EXTRA_SMALL);
removalButton.setIcon(IconType.MINUS);
// removalButton.addClickHandler( clickHandler );
}
示例13: addRemovalButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
public void addRemovalButton(ClickHandler clickHandler) {
removalButton.setVisible(true);
removalButton.setType(ButtonType.DANGER);
removalButton.setSize(ButtonSize.EXTRA_SMALL);
removalButton.setIcon(IconType.MINUS);
removalButton.addClickHandler(clickHandler);
}
示例14: setupMenuButton
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
public void setupMenuButton() {
menuRefreshButton.setIcon(IconType.REFRESH);
menuRefreshButton.setSize(ButtonSize.SMALL);
menuRefreshButton.setTitle(CommonConstants.INSTANCE.Refresh());
menuRefreshButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
supportsRefresh.onRefresh();
}
});
}
示例15: addResetButtom
import org.gwtbootstrap3.client.ui.constants.ButtonSize; //导入依赖的package包/类
protected void addResetButtom(final int left,
final int top,
VerticalPanel popupContent) {
if (gridPreferences != null) {
Button resetButton = GWT.create(Button.class);
resetButton.setText(CommonConstants.INSTANCE.Reset());
resetButton.setSize(ButtonSize.EXTRA_SMALL);
resetButton.addClickHandler(event -> resetTableColumns(left,
top));
popupContent.add(resetButton);
}
}