當前位置: 首頁>>代碼示例>>Java>>正文


Java FontAwesome.TRASH_O屬性代碼示例

本文整理匯總了Java中com.vaadin.server.FontAwesome.TRASH_O屬性的典型用法代碼示例。如果您正苦於以下問題:Java FontAwesome.TRASH_O屬性的具體用法?Java FontAwesome.TRASH_O怎麽用?Java FontAwesome.TRASH_O使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.vaadin.server.FontAwesome的用法示例。


在下文中一共展示了FontAwesome.TRASH_O屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

@PostConstruct
public void init() {
    FormLayout content = new FormLayout();
    content.setWidthUndefined();

    for (java.lang.reflect.Field field : entityClass.getDeclaredFields()) {
        if ("id".equals(field.getName())) {
            continue;
        }
        Field uiField = getUIField(field);
        fieldMap.put(field.getName(), uiField);
        content.addComponent(uiField);
    }

    save = new Button(messages.get("saveButtonLabel"), FontAwesome.SAVE);
    Button cancel = new Button(messages.get("cancelButtonLabel"));
    delete = new Button(messages.get("deleteButtonLabel"), FontAwesome.TRASH_O);

    CssLayout actions = new CssLayout(save, cancel, delete);
    content.addComponent(actions);

    content.setMargin(true);
    setContent(content);
    setClosable(true);
    setResizable(false);
    setModal(true);

    save.addClickListener(event -> listeners.forEach(EntityEditorView.Listener::save));
    delete.addClickListener(event -> listeners.forEach(EntityEditorView.Listener::deleteClicked));
    cancel.addClickListener(event -> listeners.forEach(EntityEditorView.Listener::cancel));
}
 
開發者ID:limbr-management,項目名稱:limbr,代碼行數:31,代碼來源:EntityEditorViewImpl.java

示例2: 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);
}
 
開發者ID:jmatar-sd,項目名稱:b-shopper,代碼行數:7,代碼來源:MenuViewImpl.java

示例3: 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);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:65,代碼來源:CandidatStageView.java

示例4: 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);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:63,代碼來源:CandidatFormationProView.java

示例5: init

/**
 * Initialise la vue
 */
@PostConstruct
public void init() {
	/* Style */
	setSizeFull();
	setMargin(true);
	setSpacing(true);
	
	/* Titre */
	titleParam.addStyleName(StyleConstants.VIEW_TITLE);
	addComponent(titleParam);
	
	/* Boutons */
	
	buttonsLayout.setWidth(100, Unit.PERCENTAGE);
	buttonsLayout.setSpacing(true);
	addComponent(buttonsLayout);

	btnNew.setCaption(applicationContext.getMessage("formulaire.btnNouveau", null, UI.getCurrent().getLocale()));
	btnNew.setEnabled(true);		
	buttonsLayout.addComponent(btnNew);
	buttonsLayout.setComponentAlignment(btnNew, Alignment.MIDDLE_LEFT);


	btnEdit.setCaption(applicationContext.getMessage("btnEdit", null, UI.getCurrent().getLocale()));
	btnEdit.setEnabled(false);
	btnEdit.addClickListener(e -> {
		if (formulaireTable.getValue() instanceof Formulaire) {
			formulaireController.editFormulaire((Formulaire) formulaireTable.getValue());
		}
	});
	buttonsLayout.addComponent(btnEdit);
	buttonsLayout.setComponentAlignment(btnEdit, Alignment.MIDDLE_CENTER);
	
	OneClickButton btnDelete = new OneClickButton(applicationContext.getMessage("btnDelete", null, UI.getCurrent().getLocale()), FontAwesome.TRASH_O);
	btnDelete.setEnabled(false);
	btnDelete.addClickListener(e -> {
		if (formulaireTable.getValue() instanceof Formulaire) {
			formulaireController.deleteFormulaire((Formulaire) formulaireTable.getValue());
		}			
	});
	buttonsLayout.addComponent(btnDelete);
	buttonsLayout.setComponentAlignment(btnDelete, Alignment.MIDDLE_RIGHT);


	/* Table des formulaires */
	
	
	formulaireTable.addBooleanColumn(Formulaire_.tesFormulaire.getName());
	formulaireTable.addBooleanColumn(Formulaire_.temCommunFormulaire.getName());
	formulaireTable.addBooleanColumn(Formulaire_.temConditionnelFormulaire.getName());
	formulaireTable.setSizeFull();
	formulaireTable.setVisibleColumns((Object[]) FIELDS_ORDER);
	for (String fieldName : FIELDS_ORDER) {
		formulaireTable.setColumnHeader(fieldName, applicationContext.getMessage("formulaire.table." + fieldName, null, UI.getCurrent().getLocale()));
	}
	formulaireTable.setSortContainerPropertyId(Formulaire_.codFormulaire.getName());
	formulaireTable.setColumnCollapsingAllowed(true);
	formulaireTable.setColumnReorderingAllowed(true);
	formulaireTable.setSelectable(true);
	formulaireTable.setImmediate(true);
	formulaireTable.addItemSetChangeListener(e -> formulaireTable.sanitizeSelection());
	formulaireTable.addValueChangeListener(e -> {
		/* Les boutons d'édition et de suppression de formulaire sont actifs seulement si une formulaire est sélectionnée. */
		boolean formulaireIsSelected = formulaireTable.getValue() instanceof Formulaire;
		btnEdit.setEnabled(formulaireIsSelected);
		btnDelete.setEnabled(formulaireIsSelected);
	});
	
	addComponent(formulaireTable);
	setExpandRatio(formulaireTable, 1);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:74,代碼來源:FormulaireViewTemplate.java

示例6: 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);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:68,代碼來源:ScolMailView.java

示例7: createDeleteButtonMetadata

private StatusFontIcon createDeleteButtonMetadata(final RolloutStatus rolloutStatus) {
    final boolean isDisabled = hasToBeDisabled(rolloutStatus, DELETE_COPY_BUTTON_ENABLED);
    return new StatusFontIcon(FontAwesome.TRASH_O, null, i18n.getMessage("tooltip.rollout.delete"),
            UIComponentIdProvider.ROLLOUT_DELETE_BUTTON_ID, isDisabled);
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:5,代碼來源:RolloutListGrid.java


注:本文中的com.vaadin.server.FontAwesome.TRASH_O屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。