List of usage examples for com.vaadin.server FontAwesome LIST_OL
FontAwesome LIST_OL
To view the source code for com.vaadin.server FontAwesome LIST_OL.
Click Source Link
From source file:com.lst.deploymentautomation.vaadin.core.AppLayout.java
License:Open Source License
private void initLayout() { addStyleName("app-layout"); setSizeFull();//from w w w .j a v a2 s . c om //main page layout layout = new CustomLayout("page"); layout.setSizeFull(); setCompositionRoot(layout); //navigation menu VerticalLayout navLayout = new VerticalLayout(); navLayout.setSizeFull(); layout.addComponent(navLayout, "usermenu"); navigation = new NavigationMenu(); navigation.addStyleName("navigation-menu"); layout.addComponent(navigation, "navigation"); final UserInfo user = ((LspsUI) UI.getCurrent()).getUser(); LspsUI ui = (LspsUI) UI.getCurrent(); if (user.hasRight(HumanRights.READ_ALL_TODO) || user.hasRight(HumanRights.READ_OWN_TODO)) { addViewItem(navigation, TodoListView.TITLE, TodoListView.ID, FontAwesome.LIST); } /*if (user.hasRight(HumanRights.ACCESS_DOCUMENTS)) { addViewItem(navigation, DocumentsView.TITLE, DocumentsView.ID, FontAwesome.FILE_TEXT_O); } if (user.hasRight(EngineRights.READ_MODEL) && user.hasRight(EngineRights.CREATE_MODEL_INSTANCE)) { addViewItem(navigation, RunModelView.TITLE, RunModelView.ID, FontAwesome.CARET_SQUARE_O_RIGHT); }*/ addNavigationCommandItem(navigation, "Initialize deployment", new NavigationMenu.OpenDocumentCommand(ui, "", "'deployment-automation-ui'::InitiateDeploymentDoc", null), FontAwesome.PLAY); addNavigationCommandItem(navigation, "Deployments list", new NavigationMenu.OpenDocumentCommand(ui, "", "'deployment-automation-ui'::DeploymentsList", null), FontAwesome.LIST_OL); //user menu userMenu = new NavigationMenu(); userMenu.addStyleName("navigation-menu"); navLayout.addComponent(userMenu); addViewItem(userMenu, SettingsView.TITLE, SettingsView.ID, FontAwesome.COG); NavigationCommand logoutCmd = new LogoutCommand((LspsUI) getUI()); MenuItem logout = addNavigationCommandItem(userMenu, logoutCmd.getTitle(), logoutCmd, FontAwesome.POWER_OFF); String fullName = user.getPerson().getFullName(); logout.setDescription(ui.getMessage("nav.logout", fullName)); boolean collapsed = user.getSettingBoolean("collapsedMenu", false); if (collapsed == true) { UI.getCurrent().addStyleName("l-menu-collapsed"); } Button button = new Button(""); button.addStyleName("l-menu-expander"); button.addStyleName("link"); navLayout.addComponent(button); button.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { boolean collapsed = user.getSettingBoolean("collapsedMenu", false); if (collapsed) { UI.getCurrent().removeStyleName("l-menu-collapsed"); } else { UI.getCurrent().addStyleName("l-menu-collapsed"); } user.setSetting("collapsedMenu", !collapsed); } }); }
From source file:org.jumpmind.metl.ui.views.design.EditFlowPanel.java
License:Open Source License
protected HorizontalLayout buildButtonBar() { ButtonBar buttonBar = new ButtonBar(); if (!readOnly) { runButton = buttonBar.addButton("Run", Icons.RUN); runButton.addClickListener(new ClickListener() { @Override//from w w w . j av a2 s. c o m public void buttonClick(ClickEvent event) { runFlow(); } }); copyButton = buttonBar.addButton("Copy", FontAwesome.COPY); copyButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { copySelected(); } }); delButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O); delButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { deleteSelected(); } }); delButton.setEnabled(false); } parametersButton = buttonBar.addButton("Parameters", FontAwesome.LIST_OL); parametersButton .addClickListener((event) -> new EditParametersDialog(context, flow, readOnly).showAtSize(.75)); return buttonBar; }