本文整理匯總了Java中com.vaadin.server.FontAwesome.PLUS屬性的典型用法代碼示例。如果您正苦於以下問題:Java FontAwesome.PLUS屬性的具體用法?Java FontAwesome.PLUS怎麽用?Java FontAwesome.PLUS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.vaadin.server.FontAwesome
的用法示例。
在下文中一共展示了FontAwesome.PLUS屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createAddButton
/**
* 創建添加按鈕
* @return
*/
private Button createAddButton() {
Button addButton = new Button("添加", FontAwesome.PLUS);
addButton.addStyleName(ValoTheme.BUTTON_FRIENDLY);
addButton.addClickListener((Button.ClickListener) clickEvent ->{
zookeeperConsumerAddUI.clearForm();
UI.getCurrent().addWindow(zookeeperConsumerAddUI);
});
return addButton;
}
示例2: createAddButton
/**
* 創建添加按鈕
* @return
*/
private Button createAddButton() {
Button addButton = new Button("添加",FontAwesome.PLUS);
addButton.addStyleName(ValoTheme.BUTTON_FRIENDLY);
addButton.addClickListener((Button.ClickListener) clickEvent ->{
zookeeperAppAddUI.clearForm();
UI.getCurrent().addWindow(zookeeperAppAddUI);
});
return addButton;
}
示例3: createAddButton
/**
* 創建添加按鈕
* @return
*/
private Button createAddButton() {
Button addButton = new Button("添加", FontAwesome.PLUS);
addButton.addStyleName(ValoTheme.BUTTON_FRIENDLY);
addButton.addClickListener((Button.ClickListener) clickEvent ->{
zookeeperProviderAddUI.clearForm();
UI.getCurrent().addWindow(zookeeperProviderAddUI);
});
return addButton;
}
示例4: MainUI
@Autowired
public MainUI(CustomerRepository repo, CustomerEditor editor) {
this.repo = repo;
this.editor = editor;
this.grid = new Grid();
this.filter = new TextField();
this.addNewBtn = new Button("New customer", FontAwesome.PLUS);
}
示例5: init
@PostConstruct
@SuppressWarnings("unchecked")
public void init() {
grid = new Grid();
grid.setEditorEnabled(true);
grid.setSizeFull();
TextField filter = new TextField();
filter.setInputPrompt(messages.get("filterLabel"));
filter.addTextChangeListener(event -> listEntities(event.getText()));
Button addNewButton = new Button(messages.get("newButtonLabel"), FontAwesome.PLUS);
HorizontalLayout actions = new HorizontalLayout(filter, addNewButton);
actions.setSpacing(true);
grid.removeAllColumns();
java.lang.reflect.Field[] fields = entityClass.getDeclaredFields();
for (java.lang.reflect.Field field : fields) {
if (null != field.getAnnotation(ListColumn.class)) {
grid.addColumn(field.getName());
}
}
Grid.Column editColumn = grid.addColumn(EDIT_PROPERTY_ID);
editColumn.setMaximumWidth(50.0);
editColumn.setHeaderCaption("");
editColumn.setRenderer(new ButtonRenderer(event ->
listeners.forEach(listener ->
listener.editItemClicked((T)event.getItemId()))));
addNewButton.addClickListener(event -> listeners.forEach(EntityListView.Listener::addNewClicked));
addComponent(actions);
addComponent(grid);
listeners.forEach(listener -> listener.viewInitialized(this));
refresh();
}
示例6: initButtons
private void initButtons(){
addButton= new Button(FontAwesome.PLUS);
editButton= new Button(FontAwesome.EDIT);
deleteButton= new Button(FontAwesome.TRASH_O);
queryButton= new Button(FontAwesome.SEARCH);
addComponents(addButton, editButton, deleteButton, queryButton);
}
示例7: init
/**
* Initialise la vue
*/
@PostConstruct
public void init() {
super.init();
setNavigationButton(CandidatCursusExterneView.NAME,CandidatFormationProView.NAME);
/*Indications pour le stage*/
setSubtitle(applicationContext.getMessage("stage.indication", null, UI.getCurrent().getLocale()));
OneClickButton btnNewStage = new OneClickButton(applicationContext.getMessage("stage.btn.new", null, UI.getCurrent().getLocale()), FontAwesome.PLUS);
btnNewStage.setEnabled(true);
btnNewStage.addClickListener(e -> {
candidatParcoursController.editStage(candidat, null, this);
});
addGenericButton(btnNewStage, Alignment.MIDDLE_LEFT);
OneClickButton btnEditStage = new OneClickButton(applicationContext.getMessage("btnModifier", null, UI.getCurrent().getLocale()), FontAwesome.PENCIL);
btnEditStage.setEnabled(false);
btnEditStage.addClickListener(e -> {
if (stageTable.getValue() instanceof CandidatStage) {
candidatParcoursController.editStage(candidat, (CandidatStage) stageTable.getValue(), this);
}
});
addGenericButton(btnEditStage, Alignment.MIDDLE_CENTER);
OneClickButton btnDeleteStage = new OneClickButton(applicationContext.getMessage("btnDelete", null, UI.getCurrent().getLocale()), FontAwesome.TRASH_O);
btnDeleteStage.setEnabled(false);
btnDeleteStage.addClickListener(e -> {
if (stageTable.getValue() instanceof CandidatStage) {
candidatParcoursController.deleteStage(candidat, (CandidatStage) stageTable.getValue(), this);
}
});
addGenericButton(btnDeleteStage, Alignment.MIDDLE_RIGHT);
/*Table stage*/
stageTable.setSizeFull();
stageTable.setVisibleColumns((Object[]) FIELDS_ORDER_STAGE);
for (String fieldName : FIELDS_ORDER_STAGE) {
stageTable.setColumnHeader(fieldName, applicationContext.getMessage("stage." + fieldName, null, UI.getCurrent().getLocale()));
}
stageTable.setColumnCollapsingAllowed(true);
stageTable.setColumnReorderingAllowed(true);
stageTable.setSelectable(true);
stageTable.setImmediate(true);
stageTable.setSortContainerPropertyId(CandidatStage_.anneeStage.getName());
stageTable.addItemSetChangeListener(e -> stageTable.sanitizeSelection());
stageTable.addValueChangeListener(e -> {
/* Les boutons d'édition et de suppression de CandidatCursusPro sont actifs seulement si une CandidatCursusPro est sélectionnée. */
boolean stageIsSelected = stageTable.getValue() instanceof CandidatStage;
btnEditStage.setEnabled(stageIsSelected);
btnDeleteStage.setEnabled(stageIsSelected);
});
stageTable.addItemClickListener(e -> {
if (e.isDoubleClick() && !isLectureSeule && !isArchive) {
stageTable.select(e.getItemId());
btnEditStage.click();
}
});
addGenericComponent(stageTable);
setGenericExpandRatio(stageTable);
}
示例8: init
/**
* Initialise la vue
*/
@PostConstruct
public void init() {
super.init();
setNavigationButton(CandidatStageView.NAME, CandidatCandidaturesView.NAME);
/*Indications pour les formations pro*/
setSubtitle(applicationContext.getMessage("formationpro.indication", null, UI.getCurrent().getLocale()));
OneClickButton btnNewFormationPro = new OneClickButton(applicationContext.getMessage("formationpro.btn.new", null, UI.getCurrent().getLocale()), FontAwesome.PLUS);
btnNewFormationPro.setEnabled(true);
btnNewFormationPro.addClickListener(e -> {
candidatParcoursController.editFormationPro(candidat, null, this);
});
addGenericButton(btnNewFormationPro, Alignment.MIDDLE_LEFT);
OneClickButton btnEditFormationPro = new OneClickButton(applicationContext.getMessage("btnModifier", null, UI.getCurrent().getLocale()), FontAwesome.PENCIL);
btnEditFormationPro.setEnabled(false);
btnEditFormationPro.addClickListener(e -> {
if (formationProTable.getValue() instanceof CandidatCursusPro) {
candidatParcoursController.editFormationPro(candidat, (CandidatCursusPro) formationProTable.getValue(), this);
}
});
addGenericButton(btnEditFormationPro, Alignment.MIDDLE_CENTER);
OneClickButton btnDeleteFormationPro = new OneClickButton(applicationContext.getMessage("btnDelete", null, UI.getCurrent().getLocale()), FontAwesome.TRASH_O);
btnDeleteFormationPro.setEnabled(false);
btnDeleteFormationPro.addClickListener(e -> {
if (formationProTable.getValue() instanceof CandidatCursusPro) {
candidatParcoursController.deleteFormationPro(candidat, (CandidatCursusPro) formationProTable.getValue(), this);
}
});
addGenericButton(btnDeleteFormationPro, Alignment.MIDDLE_RIGHT);
/*Table formationPro*/
formationProTable.setSizeFull();
formationProTable.setVisibleColumns((Object[]) FIELDS_ORDER_FORMATIONS);
for (String fieldName : FIELDS_ORDER_FORMATIONS) {
formationProTable.setColumnHeader(fieldName, applicationContext.getMessage("formationpro." + fieldName, null, UI.getCurrent().getLocale()));
}
formationProTable.setColumnCollapsingAllowed(true);
formationProTable.setColumnReorderingAllowed(true);
formationProTable.setSortContainerPropertyId(CandidatCursusPro_.anneeCursusPro.getName());
formationProTable.setSelectable(true);
formationProTable.setImmediate(true);
formationProTable.addItemSetChangeListener(e -> formationProTable.sanitizeSelection());
formationProTable.addValueChangeListener(e -> {
/* Les boutons d'édition et de suppression de CandidatCursusPro sont actifs seulement si une CandidatCursusPro est sélectionnée. */
boolean formationProIsSelected = formationProTable.getValue() instanceof CandidatCursusPro;
btnEditFormationPro.setEnabled(formationProIsSelected);
btnDeleteFormationPro.setEnabled(formationProIsSelected);
});
formationProTable.addItemClickListener(e -> {
if (e.isDoubleClick() && !isLectureSeule && !isArchive) {
formationProTable.select(e.getItemId());
btnEditFormationPro.click();
}
});
addGenericComponent(formationProTable);
setGenericExpandRatio(formationProTable);
}
示例9: populateMailTypeDecLayout
private void populateMailTypeDecLayout(VerticalLayout layoutMailTypeDec) {
/* Boutons */
HorizontalLayout buttonsLayout = new HorizontalLayout();
buttonsLayout.setWidth(100, Unit.PERCENTAGE);
buttonsLayout.setSpacing(true);
layoutMailTypeDec.addComponent(buttonsLayout);
OneClickButton btnNew = new OneClickButton(applicationContext.getMessage("mail.btnNouveau", null, UI.getCurrent().getLocale()), FontAwesome.PLUS);
btnNew.setEnabled(true);
btnNew.addClickListener(e -> {
mailController.editNewMail();
});
buttonsLayout.addComponent(btnNew);
buttonsLayout.setComponentAlignment(btnNew, Alignment.MIDDLE_LEFT);
OneClickButton btnEditMailTypeDec = new OneClickButton(applicationContext.getMessage("btnEdit", null, UI.getCurrent().getLocale()), FontAwesome.PENCIL);
btnEditMailTypeDec.setEnabled(false);
btnEditMailTypeDec.addClickListener(e -> {
if (mailTypeDecTable.getValue() instanceof Mail) {
mailController.editMail((Mail) mailTypeDecTable.getValue());
}
});
buttonsLayout.addComponent(btnEditMailTypeDec);
buttonsLayout.setComponentAlignment(btnEditMailTypeDec, Alignment.MIDDLE_CENTER);
OneClickButton btnDelete = new OneClickButton(applicationContext.getMessage("btnDelete", null, UI.getCurrent().getLocale()), FontAwesome.TRASH_O);
btnDelete.setEnabled(false);
btnDelete.addClickListener(e -> {
if (mailTypeDecTable.getValue() instanceof Mail) {
mailController.deleteMail((Mail) mailTypeDecTable.getValue());
}
});
buttonsLayout.addComponent(btnDelete);
buttonsLayout.setComponentAlignment(btnDelete, Alignment.MIDDLE_RIGHT);
/* Table des mails avec type de decision */
BeanItemContainer<Mail> container = new BeanItemContainer<Mail>(Mail.class, mailController.getMailsTypeDecScol());
container.addNestedContainerProperty(Mail_.typeAvis.getName()+"."+TypeAvis_.libelleTypAvis.getName());
mailTypeDecTable.setContainerDataSource(container);
mailTypeDecTable.addBooleanColumn(Mail_.tesMail.getName());
mailTypeDecTable.setSizeFull();
mailTypeDecTable.setVisibleColumns((Object[]) MAIL_FIELDS_ORDER);
for (String fieldName : MAIL_FIELDS_ORDER) {
mailTypeDecTable.setColumnHeader(fieldName, applicationContext.getMessage("mail.table." + fieldName, null, UI.getCurrent().getLocale()));
}
mailTypeDecTable.setSortContainerPropertyId(Mail_.codMail.getName());
mailTypeDecTable.setColumnCollapsingAllowed(true);
mailTypeDecTable.setColumnReorderingAllowed(true);
mailTypeDecTable.setSelectable(true);
mailTypeDecTable.setImmediate(true);
mailTypeDecTable.addItemSetChangeListener(e -> mailTypeDecTable.sanitizeSelection());
mailTypeDecTable.addValueChangeListener(e -> {
/* Les boutons d'édition de mail sont actifs seulement si un mail est sélectionnée. */
boolean mailIsSelected = mailTypeDecTable.getValue() instanceof Mail;
btnEditMailTypeDec.setEnabled(mailIsSelected);
btnDelete.setEnabled(mailIsSelected);
});
mailTypeDecTable.addItemClickListener(e -> {
if (e.isDoubleClick()) {
mailTypeDecTable.select(e.getItemId());
btnEditMailTypeDec.click();
}
});
layoutMailTypeDec.addComponent(mailTypeDecTable);
layoutMailTypeDec.setExpandRatio(mailTypeDecTable, 1);
}