本文整理匯總了Java中com.vaadin.server.FontAwesome.CHECK屬性的典型用法代碼示例。如果您正苦於以下問題:Java FontAwesome.CHECK屬性的具體用法?Java FontAwesome.CHECK怎麽用?Java FontAwesome.CHECK使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.vaadin.server.FontAwesome
的用法示例。
在下文中一共展示了FontAwesome.CHECK屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSaveButton
/**
* 創建保存按鈕
* @return
*/
private Button createSaveButton() {
Button saveButton = new Button("保存", FontAwesome.CHECK);
saveButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
saveButton.addClickListener((Button.ClickListener) clickEvent -> {
String name = nameField.getValue();
if (StringUtils.isEmpty(name)) {
Notification.show("服務名稱不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
//insert data
ZookeeperApp zookeeperApp = new ZookeeperApp();
zookeeperApp.setName(name);
zookeeperAppRepository.save(zookeeperApp);
isAddSuccess = true;
close();
});
return saveButton;
}
示例2: createSaveButton
/**
* 創建保存按鈕
* @return
*/
private Button createSaveButton() {
Button saveButton = new Button("保存", FontAwesome.CHECK);
saveButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
saveButton.addClickListener((Button.ClickListener) clickEvent -> {
String name = nameField.getValue();
if (StringUtils.isEmpty(name)) {
Notification.show("消費者名稱不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
String ip = ipField.getValue();
if (StringUtils.isEmpty(ip)) {
Notification.show("IP不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
String port = portField.getValue();
if (StringUtils.isEmpty(port)) {
Notification.show("端口不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
//insert data
ZookeeperConsumer consumer = new ZookeeperConsumer();
consumer.setName(name);
consumer.setIp(ip);
consumer.setPort(Integer.parseInt(port));
zookeeperConsumerRepository.save(consumer);
isAddSuccess = true;
close();
});
return saveButton;
}
示例3: createSaveButton
/**
* 創建保存按鈕
* @return
*/
private Button createSaveButton() {
Button saveButton = new Button("保存", FontAwesome.CHECK);
saveButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
saveButton.addClickListener((Button.ClickListener) clickEvent -> {
String name = nameField.getValue();
if (StringUtils.isEmpty(name)) {
Notification.show("提供者名稱不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
String ip = ipField.getValue();
if (StringUtils.isEmpty(ip)) {
Notification.show("IP不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
String port = portField.getValue();
if (StringUtils.isEmpty(port)) {
Notification.show("端口不能為空!",Notification.Type.ERROR_MESSAGE);
return;
}
//insert data
ZookeeperProvider provider = new ZookeeperProvider();
provider.setName(name);
provider.setIp(ip);
provider.setPort(Integer.parseInt(port));
zookeeperProviderRepository.save(provider);
isAddSuccess = true;
close();
});
return saveButton;
}
示例4: CtrCandOdfCandidatureWindow
/**
* Crée une fenêtre de choix pour le gestionnaire : proposition ou candidature simple
* @param message
*/
public CtrCandOdfCandidatureWindow(String message) {
/* Style */
setWidth(630, Unit.PIXELS);
setModal(true);
setResizable(false);
setClosable(false);
/* Layout */
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSpacing(true);
setContent(layout);
/* Titre */
setCaption(applicationContext.getMessage("candidature.gest.window", null, UI.getCurrent().getLocale()));
/* Texte */
layout.addComponent(new Label(message));
layout.addComponent(new Label(applicationContext.getMessage("candidature.gest.window.choice", null, UI.getCurrent().getLocale())));
/*Le container d'options*/
BeanItemContainer<SimpleTablePresentation> optContainer = new BeanItemContainer<SimpleTablePresentation>(SimpleTablePresentation.class);
SimpleTablePresentation optionClassique = new SimpleTablePresentation(ConstanteUtils.OPTION_CLASSIQUE,applicationContext.getMessage("candidature.gest.window.choice.classique", null, UI.getCurrent().getLocale()),null);
SimpleTablePresentation optionProposition = new SimpleTablePresentation(ConstanteUtils.OPTION_PROP,applicationContext.getMessage("candidature.gest.window.choice.proposition", null, UI.getCurrent().getLocale()),null);
optContainer.addItem(optionClassique);
optContainer.addItem(optionProposition);
optionGroupAction.setContainerDataSource(optContainer);
optionGroupAction.addStyleName(StyleConstants.OPTION_GROUP_HORIZONTAL);
optionGroupAction.setItemCaptionPropertyId(SimpleTablePresentation.CHAMPS_TITLE);
optionGroupAction.setItemCaptionMode(ItemCaptionMode.PROPERTY);
optionGroupAction.setValue(optionClassique);
layout.addComponent(optionGroupAction);
layout.setComponentAlignment(optionGroupAction, Alignment.MIDDLE_CENTER);
/* Boutons */
HorizontalLayout buttonsLayout = new HorizontalLayout();
buttonsLayout.setWidth(100, Unit.PERCENTAGE);
buttonsLayout.setSpacing(true);
layout.addComponent(buttonsLayout);
OneClickButton btnNon = new OneClickButton(applicationContext.getMessage("confirmWindow.btnNon", null, UI.getCurrent().getLocale()),FontAwesome.TIMES);
btnNon.addClickListener(e -> close());
buttonsLayout.addComponent(btnNon);
buttonsLayout.setComponentAlignment(btnNon, Alignment.MIDDLE_LEFT);
OneClickButton btnOui = new OneClickButton(applicationContext.getMessage("confirmWindow.btnOui", null, UI.getCurrent().getLocale()),FontAwesome.CHECK);
btnOui.setIcon(FontAwesome.CHECK);
btnOui.addStyleName(ValoTheme.BUTTON_PRIMARY);
btnOui.addClickListener(e -> {
SimpleTablePresentation option = (SimpleTablePresentation)optionGroupAction.getValue();
odfCandidatureListener.btnOkClick(option.getCode());
close();
});
buttonsLayout.addComponent(btnOui);
buttonsLayout.setComponentAlignment(btnOui, Alignment.MIDDLE_RIGHT);
/* Centre la fenêtre */
center();
}