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


Java FontAwesome類代碼示例

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


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

示例1: I18nField

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * Constructeur, initialisation du champs
 * @param listeLangueEnService 
 * @param langueParDefaut 
 * @param libelleBtnPlus 
 */
public I18nField(Langue langueParDefaut, List<Langue> listeLangueEnService, String libelleBtnPlus) {
	super();
	setRequired(false);			
	this.langueParDefaut = langueParDefaut;
	this.listeLangueEnService = listeLangueEnService;
	
	listLayoutTraductions = new ArrayList<HorizontalLayout>();
	listeTraduction = new ArrayList<I18nTraduction>();
	layoutComplet = new VerticalLayout();
	layoutComplet.setSpacing(true);
	layoutLangue = new VerticalLayout();
	layoutLangue.setSpacing(true);
	layoutComplet.addComponent(layoutLangue);
	
	btnAddLangue = new OneClickButton(libelleBtnPlus,FontAwesome.PLUS_SQUARE_O);
	btnAddLangue.setVisible(false);
	btnAddLangue.addStyleName(ValoTheme.BUTTON_TINY);
	layoutComplet.addComponent(btnAddLangue);
	btnAddLangue.addClickListener(e->{
		layoutLangue.addComponent(getLangueLayout(null));
		checkVisibleAddLangue();
		centerWindow();
	});		
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:31,代碼來源:I18nField.java

示例2: dialog1

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
public void dialog1() {
	// tag::dialog1[]
	Dialog dialog = Components.dialog() // <1>
			.draggable(false) // <2>
			.closable(true) // <3>
			.resizable(true) // <4>
			.modal(true) // <5>
			.message("Dialog message", "dialog.message.code") // <6>
			.okButtonConfigurator(cfg -> cfg.caption("Done").icon(FontAwesome.CHECK_CIRCLE_O)) // <7>
			.withCloseListener((window, action) -> { // <8>
				// ...
			}).build();

	dialog.open(); // <9>

	dialog.close(); // <10>
	// end::dialog1[]
}
 
開發者ID:holon-platform,項目名稱:holon-vaadin7,代碼行數:19,代碼來源:ExampleDialog.java

示例3: refreshConnexionPanelStudent

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * Rafraichi le panel de connexion sans compte
 */
private void refreshConnexionPanelStudent() {
	vlConnexionIsStudent.removeAllComponents();

	OneClickButton logBtn = new OneClickButton(
			applicationContext.getMessage("btnConnect", null, UI.getCurrent().getLocale()), FontAwesome.SIGN_OUT);
	logBtn.addClickListener(e -> {
		userController.connectCAS();
	});

	HorizontalLayout hlConnect = new HorizontalLayout();
	hlConnect.setSpacing(true);
	Label labelConnect = new Label(
			applicationContext.getMessage("accueilView.connect.cas", null, UI.getCurrent().getLocale()));
	hlConnect.addComponent(labelConnect);
	hlConnect.setComponentAlignment(labelConnect, Alignment.MIDDLE_LEFT);
	hlConnect.addComponent(logBtn);
	hlConnect.setComponentAlignment(logBtn, Alignment.MIDDLE_CENTER);

	vlConnexionIsStudent.addComponent(hlConnect);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:24,代碼來源:CandidatCreerCompteView.java

示例4: setNavigationButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/** Ajoute des boutons de navigation
 * @param previousView
 * @param nextView
 */
public void setNavigationButton(String previousView, String nextView){
	if (previousView!=null){
		OneClickButton btnPrevious = new OneClickButton(applicationContext.getMessage("btnPrevious", null, UI.getCurrent().getLocale()),FontAwesome.ARROW_CIRCLE_O_LEFT);
		btnPrevious.addClickListener(e->uiController.navigateTo(previousView));
		titleLayout.addComponent(btnPrevious);
		titleLayout.setComponentAlignment(btnPrevious, Alignment.MIDDLE_LEFT);
	}
	
	if (nextView!=null){
		OneClickButton btnNext = new OneClickButton(applicationContext.getMessage("btnNext", null, UI.getCurrent().getLocale()),FontAwesome.ARROW_CIRCLE_O_RIGHT);
		btnNext.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_RIGHT);
		btnNext.addClickListener(e->uiController.navigateTo(nextView));
		titleLayout.addComponent(btnNext);
		titleLayout.setComponentAlignment(btnNext, Alignment.MIDDLE_RIGHT);
	}		
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:21,代碼來源:CandidatViewTemplate.java

示例5: buildMenu

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * Construit le menu
 */
private void buildMenu() {
	menu.addStyleName(ValoTheme.MENU_PART);

	final OneClickButton showMenu = new OneClickButton(applicationContext.getMessage("mainUi.menu", null, getLocale()), FontAwesome.LIST);
	showMenu.addStyleName(ValoTheme.BUTTON_PRIMARY);
	showMenu.addStyleName(ValoTheme.BUTTON_SMALL);
	showMenu.addStyleName(StyleConstants.VALO_MENU_TOGGLE);
	showMenu.addClickListener(e -> {
		if (menu.getStyleName().contains(StyleConstants.VALO_MENU_VISIBLE)) {
			menu.removeStyleName(StyleConstants.VALO_MENU_VISIBLE);
		} else {
			menu.addStyleName(StyleConstants.VALO_MENU_VISIBLE);
		}
		
	});
	menu.addComponent(showMenu);

	menuButtonLayout.setPrimaryStyleName(StyleConstants.VALO_MENUITEMS);
	menu.addComponent(menuButtonLayout);
	
	constructMainMenu();
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:26,代碼來源:MainUI.java

示例6: SearchAnneeUnivApoField

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * Constructeur, initialisation du champs
 * @param libelleBtnFind 
 */
public SearchAnneeUnivApoField(String libelleBtnFind) {
	super();
	layout = new HorizontalLayout();
	layout.setSpacing(true);
	anneeField = new TextField();
	anneeField.addValueChangeListener(e->showOrHideError());
	anneeField.setNullRepresentation("");
	anneeField.setReadOnly(true);
	btnSearch = new OneClickButton(libelleBtnFind,FontAwesome.SEARCH);
	btnSearch.addClickListener(e->{
		SearchAnneeUnivApoWindow window = new SearchAnneeUnivApoWindow();
		window.addAnneeUniListener(a->changeFieldValue(a));
		UI.getCurrent().addWindow(window);
	});
	layout.addComponent(anneeField);
	layout.addComponent(btnSearch);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:22,代碼來源:SearchAnneeUnivApoField.java

示例7: addBooleanColumns

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * Formate les colonnes en boolean : Ajoute une case a cocher a la place de O et
 * N
 * 
 * @param propertys
 */
private void addBooleanColumns(String... propertys) {
	for (String property : propertys) {
		Column col = getColumn(property).setRenderer(new HtmlRenderer(),
				new StringToBooleanConverter(
						"<div style=width:100%;text-align:center>" + FontAwesome.CHECK_SQUARE_O.getHtml()
								+ "</div>",
						"<div style=width:100%;text-align:center>" + FontAwesome.SQUARE_O.getHtml() + "</div>"));
		col.setWidth(119);
	}
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:17,代碼來源:GridFormatting.java

示例8: createDeleteButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * 創建刪除按鈕
 * @return
 */
private Button createDeleteButton() {
    Button deleteButton = new Button("刪除",FontAwesome.CLOSE);
    deleteButton.addStyleName(ValoTheme.BUTTON_DANGER);
    deleteButton.addClickListener((Button.ClickListener) clickEvent -> {
        //validate
        Collection<Object> items = grid.getSelectedRows();
        if(items.size() == 0){
            Notification.show("請選中要刪除的行!", Notification.Type.ERROR_MESSAGE);
            return;
        }
        //batch delete
        for (Object object : items) {
            Item item = grid.getContainerDataSource().getItem(object);
            if (item != null) {
                Long id = (Long) item.getItemProperty("序號").getValue();
                zookeeperConsumerRepository.delete(id);
            }
        }
        search();
    });
    return deleteButton;
}
 
開發者ID:xburning,項目名稱:dubbo-switch,代碼行數:27,代碼來源:ZookeeperConsumerManageUI.java

示例9: createSaveButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * 創建保存按鈕
 * @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;
}
 
開發者ID:xburning,項目名稱:dubbo-switch,代碼行數:23,代碼來源:ZookeeperAppAddUI.java

示例10: createDeleteButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * 創建刪除按鈕
 * @return
 */
private Button createDeleteButton() {
    Button deleteButton = new Button("刪除",FontAwesome.CLOSE);
    deleteButton.addStyleName(ValoTheme.BUTTON_DANGER);
    deleteButton.addClickListener((Button.ClickListener) clickEvent -> {
        //validate
        Collection<Object> items = grid.getSelectedRows();
        if(items.size() == 0){
            Notification.show("請選中要刪除的行!", Notification.Type.ERROR_MESSAGE);
            return;
        }
        //batch delete
        for (Object object : items) {
            Item item = grid.getContainerDataSource().getItem(object);
            if(item != null){
                Long id = (Long) item.getItemProperty("序號").getValue();
                zookeeperAppRepository.delete(id);
            }
        }
        search();
    });
    return deleteButton;
}
 
開發者ID:xburning,項目名稱:dubbo-switch,代碼行數:27,代碼來源:ZookeeperAppManageUI.java

示例11: addServiceNode

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * 添加節點
 * @param dubboServiceBean
 * @param serviceName
 * @param node
 */
private void addServiceNode(DubboServiceBean dubboServiceBean, String serviceName,String node) {
    String serviceNode = serviceName + "->" + node;
    viewTree.addItem(serviceNode);
    viewTree.setParent(serviceNode, serviceName);
    viewTree.expandItem(serviceNode);
    List<String> nodeList = null;
    if ("providers".equals(node)) {
        nodeList = dubboServiceBean.getProvidersList();
    } else if ("consumers".equals(node)) {
        nodeList = dubboServiceBean.getConsumersList();
    }
    if (nodeList != null) {
        for (String _node : nodeList) {
            String url = DubboSwitchTool.decode(_node);
            viewTree.addItem(url);
            viewTree.setParent(url, _node);
            viewTree.setItemIcon(url,FontAwesome.STAR_O);
            viewTree.setChildrenAllowed(url, false);
        }
    }
}
 
開發者ID:xburning,項目名稱:dubbo-switch,代碼行數:28,代碼來源:ZookeeperAppViewUI.java

示例12: createDeleteButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
/**
 * 創建刪除按鈕
 * @return
 */
private Button createDeleteButton() {
    Button deleteButton = new Button("刪除",FontAwesome.CLOSE);
    deleteButton.addStyleName(ValoTheme.BUTTON_DANGER);
    deleteButton.addClickListener((Button.ClickListener) clickEvent -> {
        //validate
        Collection<Object> items = grid.getSelectedRows();
        if(items.size() == 0){
            Notification.show("請選中要刪除的行!", Notification.Type.ERROR_MESSAGE);
            return;
        }
        //batch delete
        for (Object object : items) {
            Item item = grid.getContainerDataSource().getItem(object);
            if (item != null) {
                Long id = (Long) item.getItemProperty("序號").getValue();
                zookeeperProviderRepository.delete(id);
            }
        }
        search();
    });
    return deleteButton;
}
 
開發者ID:xburning,項目名稱:dubbo-switch,代碼行數:27,代碼來源:ZookeeperProviderManageUI.java

示例13: buildEditButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
private Component buildEditButton() {
    Button result = new Button();
    result.setId(EDIT_ID);
    result.setIcon(FontAwesome.EDIT);
    result.addStyleName("icon-edit");
    result.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
    result.setDescription("Add Imot");
    result.addClickListener(new ClickListener() {
        @Override
        public void buttonClick(final ClickEvent event) {
            getUI().addWindow(
                    new AddingImot(DashboardView.this, titleLabel
                            .getValue()));
        }
    });
    return result;
}
 
開發者ID:imotSpot,項目名稱:imotSpot,代碼行數:18,代碼來源:DashboardView.java

示例14: buildToggleButton

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
private Component buildToggleButton() {
    Button valoMenuToggleButton = new Button("Menu", new ClickListener() {
        @Override
        public void buttonClick(final ClickEvent event) {
            if (getCompositionRoot().getStyleName().contains(STYLE_VISIBLE)) {
                getCompositionRoot().removeStyleName(STYLE_VISIBLE);
            } else {
                getCompositionRoot().addStyleName(STYLE_VISIBLE);
            }
        }
    });
    valoMenuToggleButton.setIcon(FontAwesome.LIST);
    valoMenuToggleButton.addStyleName("valo-menu-toggle");
    valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
    valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_SMALL);
    return valoMenuToggleButton;
}
 
開發者ID:imotSpot,項目名稱:imotSpot,代碼行數:18,代碼來源:DashboardMenu.java

示例15: AttendeeDetailWindow

import com.vaadin.server.FontAwesome; //導入依賴的package包/類
public AttendeeDetailWindow(AttendeePrintView parentView, AttendeeSearchPresenter handler) {
    super("Attendee Detail");
    this.handler = handler;
    this.parentView = parentView;
    setIcon(FontAwesome.USER);
    center();
    setModal(true);
    setWidth(1100, Unit.PIXELS);
    setHeight(800, Unit.PIXELS);

    VerticalLayout verticalLayout = new VerticalLayout();
    verticalLayout.setMargin(false);
    verticalLayout.setSpacing(true);
    form = new AttendeeDetailForm(this);
    form.setAllFieldsButCheckInDisabled();
    verticalLayout.addComponent(form);
    verticalLayout.addComponent(buildSaveCancel());
    setContent(verticalLayout);

    btnSave.setClickShortcut(ShortcutAction.KeyCode.ENTER);
    btnSave.addStyleName(ValoTheme.BUTTON_PRIMARY);
}
 
開發者ID:kumoregdev,項目名稱:kumoreg,代碼行數:23,代碼來源:AttendeeDetailWindow.java


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