List of usage examples for com.vaadin.server FontAwesome USER
FontAwesome USER
To view the source code for com.vaadin.server FontAwesome USER.
Click Source Link
From source file:annis.gui.AdminUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { super.init(request); getPage().setTitle("ANNIS Adminstration"); WebResource rootResource = Helper.getAnnisWebResource(); UserManagement userManagement = new UserManagement(); userManagement.setRootResource(rootResource); GroupManagement groupManagement = new GroupManagement(); groupManagement.setRootResource(rootResource); CorpusManagement corpusManagement = new CorpusManagement(); corpusManagement.setRootResource(rootResource); boolean isLoggedIn = Helper.getUser() != null; corpusAdminPanel = new CorpusAdminPanel(); corpusController = new CorpusController(corpusManagement, corpusAdminPanel, this, isLoggedIn); userManagementPanel = new UserManagementPanel(); userController = new UserController(userManagement, userManagementPanel, this, isLoggedIn); groupManagementPanel = new GroupManagementPanel(); groupManagementController = new GroupController(groupManagement, corpusManagement, groupManagementPanel, this, userManagementPanel, isLoggedIn); boolean kickstarter = Boolean.parseBoolean( getSession().getConfiguration().getInitParameters().getProperty("kickstarterEnvironment", "false")); importPanel = new ImportPanel(!kickstarter, Helper.getUser() != null); tabSheet = new TabSheet(); tabSheet.addTab(importPanel, "Import Corpus", FontAwesome.UPLOAD); tabSheet.addTab(corpusAdminPanel, "Corpus management", FontAwesome.LIST_ALT); if (!kickstarter) { tabSheet.addTab(userManagementPanel, "User management", FontAwesome.USER); tabSheet.addTab(groupManagementPanel, "Group management", FontAwesome.USERS); }/* ww w. j ava 2 s .c o m*/ tabSheet.setSizeFull(); tabSheet.addSelectedTabChangeListener(this); MainToolbar toolbar = new MainToolbar(null); addExtension(toolbar.getScreenshotExtension()); toolbar.addLoginListener(AdminUI.this); layout = new VerticalLayout(toolbar, tabSheet); layout.setSizeFull(); layout.setExpandRatio(toolbar, 0.0f); layout.setExpandRatio(tabSheet, 1.0f); tabSheet.addStyleName(ValoTheme.TABSHEET_FRAMED); setContent(layout); getPage().addUriFragmentChangedListener(this); selectTabFromFragment(getPage().getUriFragment()); }
From source file:annis.gui.AdminView.java
License:Apache License
public AdminView(AnnisUI ui) { Page.getCurrent().setTitle("ANNIS Adminstration"); UserManagement userManagement = new UserManagement(); userManagement.setWebResourceProvider(AdminView.this); GroupManagement groupManagement = new GroupManagement(); groupManagement.setWebResourceProvider(AdminView.this); CorpusManagement corpusManagement = new CorpusManagement(); corpusManagement.setWebResourceProvider(AdminView.this); boolean isLoggedIn = Helper.getUser() != null; corpusAdminPanel = new CorpusAdminPanel(); corpusController = new CorpusController(corpusManagement, corpusAdminPanel, this, isLoggedIn); userManagementPanel = new UserManagementPanel(); userController = new UserController(userManagement, userManagementPanel, this, isLoggedIn); groupManagementPanel = new GroupManagementPanel(); groupManagementController = new GroupController(groupManagement, corpusManagement, groupManagementPanel, this, userManagementPanel, isLoggedIn); importPanel = new ImportPanel(); tabSheet = new TabSheet(); tabSheet.addTab(importPanel, "Import Corpus", FontAwesome.UPLOAD); tabSheet.addTab(corpusAdminPanel, "Corpus management", FontAwesome.LIST_ALT); tabSheet.addTab(userManagementPanel, "User management", FontAwesome.USER); tabSheet.addTab(groupManagementPanel, "Group management", FontAwesome.USERS); tabSheet.setSizeFull();//w w w . j a v a2 s . co m tabSheet.addSelectedTabChangeListener(AdminView.this); addComponents(tabSheet); setSizeFull(); setExpandRatio(tabSheet, 1.0f); tabSheet.addStyleName(ValoTheme.TABSHEET_FRAMED); }
From source file:annis.gui.MainToolbar.java
License:Apache License
public MainToolbar() { String bugmail = (String) VaadinSession.getCurrent().getAttribute(BUG_MAIL_KEY); if (bugmail != null && !bugmail.isEmpty() && !bugmail.startsWith("${") && new EmailValidator("").isValid(bugmail)) { this.bugEMailAddress = bugmail; } else {//from ww w . j a va 2 s .c o m this.bugEMailAddress = null; } UI ui = UI.getCurrent(); if (ui instanceof CommonUI) { ((CommonUI) ui).getSettings().addedLoadedListener(MainToolbar.this); } setWidth("100%"); setHeight("-1px"); addStyleName("toolbar"); addStyleName("border-layout"); btAboutAnnis = new Button("About ANNIS"); btAboutAnnis.addStyleName(ValoTheme.BUTTON_SMALL); btAboutAnnis.setIcon(new ThemeResource("images/annis_16.png")); btAboutAnnis.addClickListener(new AboutClickListener()); btSidebar = new Button(); btSidebar.setDisableOnClick(true); btSidebar.addStyleName(ValoTheme.BUTTON_SMALL); btSidebar.setDescription("Show and hide search sidebar"); btSidebar.setIconAlternateText(btSidebar.getDescription()); btBugReport = new Button("Report Problem"); btBugReport.addStyleName(ValoTheme.BUTTON_SMALL); btBugReport.setDisableOnClick(true); btBugReport.setIcon(FontAwesome.ENVELOPE_O); btBugReport.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { reportBug(); } }); btBugReport.setVisible(this.bugEMailAddress != null); btNavigate = new Button(); btNavigate.setVisible(false); btNavigate.setDisableOnClick(true); btNavigate.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { btNavigate.setEnabled(true); if (navigationTarget != null) { UI.getCurrent().getNavigator().navigateTo(navigationTarget.state); } } }); lblUserName = new Label("not logged in"); lblUserName.setWidth("-1px"); lblUserName.setHeight("-1px"); lblUserName.addStyleName("right-aligned-text"); btLogin = new Button("Login", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { showLoginWindow(false); } }); btLogout = new Button("Logout", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { // logout Helper.setUser(null); for (LoginListener l : loginListeners) { l.onLogout(); } Notification.show("Logged out", Notification.Type.TRAY_NOTIFICATION); updateUserInformation(); } }); btLogin.setSizeUndefined(); btLogin.setStyleName(ValoTheme.BUTTON_SMALL); btLogin.setIcon(FontAwesome.USER); btLogout.setSizeUndefined(); btLogout.setStyleName(ValoTheme.BUTTON_SMALL); btLogout.setIcon(FontAwesome.USER); btOpenSource = new Button("Help us to make ANNIS better!"); btOpenSource.setStyleName(BaseTheme.BUTTON_LINK); btOpenSource.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { Window w = new HelpUsWindow(); w.setCaption("Help us to make ANNIS better!"); w.setModal(true); w.setResizable(true); w.setWidth("600px"); w.setHeight("500px"); UI.getCurrent().addWindow(w); w.center(); } }); addComponent(btSidebar); setComponentAlignment(btSidebar, Alignment.MIDDLE_LEFT); addComponent(btAboutAnnis); addComponent(btBugReport); addComponent(btNavigate); addComponent(btOpenSource); setSpacing(true); setComponentAlignment(btAboutAnnis, Alignment.MIDDLE_LEFT); setComponentAlignment(btBugReport, Alignment.MIDDLE_LEFT); setComponentAlignment(btNavigate, Alignment.MIDDLE_LEFT); setComponentAlignment(btOpenSource, Alignment.MIDDLE_CENTER); setExpandRatio(btOpenSource, 1.0f); addLoginButton(); btSidebar.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { btSidebar.setEnabled(true); // decide new state switch (sidebarState) { case VISIBLE: if (event.isCtrlKey()) { sidebarState = SidebarState.AUTO_VISIBLE; } else { sidebarState = SidebarState.HIDDEN; } break; case HIDDEN: if (event.isCtrlKey()) { sidebarState = SidebarState.AUTO_HIDDEN; } else { sidebarState = SidebarState.VISIBLE; } break; case AUTO_VISIBLE: if (event.isCtrlKey()) { sidebarState = SidebarState.VISIBLE; } else { sidebarState = SidebarState.AUTO_HIDDEN; } break; case AUTO_HIDDEN: if (event.isCtrlKey()) { sidebarState = SidebarState.HIDDEN; } else { sidebarState = SidebarState.AUTO_VISIBLE; } break; } updateSidebarState(); } }); screenshotExtension = new ScreenshotMaker(this); JavaScript.getCurrent().addFunction("annis.gui.logincallback", new LoginCloseCallback()); updateSidebarState(); MainToolbar.this.updateUserInformation(); }
From source file:by.bigvova.ui.LoginUI.java
License:Apache License
private Component buildFields() { final VerticalLayout layout = new VerticalLayout(); HorizontalLayout fields = new HorizontalLayout(); fields.setSpacing(true);// www . j a v a2s . c om fields.addStyleName("fields"); final TextField username = new TextField("Username"); username.setIcon(FontAwesome.USER); username.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final PasswordField password = new PasswordField("Password"); password.setIcon(FontAwesome.LOCK); password.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final Button signin = new Button("Sign In"); signin.addStyleName(ValoTheme.BUTTON_PRIMARY); signin.setClickShortcut(ShortcutAction.KeyCode.ENTER); signin.focus(); final CheckBox checkBox = new CheckBox("Remember me", true); signin.addClickListener(new Button.ClickListener() { @Override public void buttonClick(final Button.ClickEvent event) { login(username.getValue(), password.getValue(), checkBox.getValue()); } }); fields.addComponents(username, password, signin); fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT); layout.setSpacing(true); layout.addComponent(fields); layout.addComponent(checkBox); return layout; }
From source file:ch.bfh.ti.soed.hs16.srs.black.view.loginView.LoginView.java
License:Open Source License
public LoginView() { usernameField = new TextField("Username"); usernameField.setIcon(FontAwesome.USER); usernameField.setWidth(12, Unit.EM); passwordField = new PasswordField("Password"); passwordField.setIcon(FontAwesome.KEY); passwordField.setWidth(12, Unit.EM); loginButton = new Button("Login"); loginButton.setWidth(5, Unit.EM);/* w w w . j a v a2 s. co m*/ loginButton.addStyleName(ValoTheme.BUTTON_PRIMARY); signUpButton = new Button("Sign Up"); signUpButton.setWidth(6, Unit.EM); VerticalLayout layout = new VerticalLayout(); HorizontalLayout layoutButtons = new HorizontalLayout(loginButton, signUpButton); layoutButtons.setSpacing(true); Panel panel = new Panel("Login - Smart ReservationEntity System"); panel.setSizeUndefined(); layout.addComponent(panel); FormLayout content = new FormLayout(); content.addComponents(usernameField, passwordField, layoutButtons); content.setSizeFull(); content.setMargin(true); panel.setContent(content); setCompositionRoot(layout); layout.setComponentAlignment(panel, Alignment.MIDDLE_CENTER); layout.setMargin(new MarginInfo(true, false, false, false)); }
From source file:ch.bfh.ti.soed.hs16.srs.black.view.signUpView.SignUpView.java
License:Open Source License
public SignUpView() { usernameField = new TextField("Username"); usernameField.setIcon(FontAwesome.USER); usernameField.setWidth(12, Unit.EM); passwordField = new PasswordField("Password"); passwordField.setIcon(FontAwesome.KEY); passwordField.setWidth(12, Unit.EM); passwordFieldRepeat = new PasswordField("Repeat Password"); passwordFieldRepeat.setIcon(FontAwesome.KEY); passwordFieldRepeat.setWidth(12, Unit.EM); addUserButton = new Button("Add New User"); addUserButton.setWidth(12, Unit.EM); goBackButton = new Button("Back"); VerticalLayout layout = new VerticalLayout(); Panel panel = new Panel("Sign Up - Smart ReservationEntity System"); panel.setSizeUndefined();/*from w w w .ja va 2s . c o m*/ layout.addComponent(panel); FormLayout content = new FormLayout(); content.addComponents(usernameField, passwordField, passwordFieldRepeat, addUserButton); content.setSizeUndefined(); content.setMargin(true); VerticalLayout formAndBack = new VerticalLayout(content, goBackButton); formAndBack.setMargin(true); panel.setContent(formAndBack); setCompositionRoot(layout); layout.setComponentAlignment(panel, Alignment.MIDDLE_CENTER); layout.setMargin(new MarginInfo(true, false, false, false)); }
From source file:com.esofthead.mycollab.module.crm.ui.components.PeopleInfoComp.java
License:Open Source License
public void displayEntryPeople(ValuedBean bean) { this.removeAllComponents(); this.withMargin(new MarginInfo(true, false, true, true)); Label peopleInfoHeader = new Label( FontAwesome.USER.getHtml() + " " + AppContext.getMessage(CrmCommonI18nEnum.SUB_INFO_PEOPLE), ContentMode.HTML);//from w ww . j a va 2s.c o m peopleInfoHeader.setStyleName("info-hdr"); this.addComponent(peopleInfoHeader); GridLayout layout = new GridLayout(2, 2); layout.setSpacing(true); layout.setWidth("100%"); layout.setMargin(new MarginInfo(false, false, false, true)); try { Label createdLbl = new Label(AppContext.getMessage(CrmCommonI18nEnum.ITEM_CREATED_PEOPLE)); createdLbl.setSizeUndefined(); layout.addComponent(createdLbl, 0, 0); String createdUserName = (String) PropertyUtils.getProperty(bean, "createduser"); String createdUserAvatarId = (String) PropertyUtils.getProperty(bean, "createdUserAvatarId"); String createdUserDisplayName = (String) PropertyUtils.getProperty(bean, "createdUserFullName"); UserLink createdUserLink = new UserLink(createdUserName, createdUserAvatarId, createdUserDisplayName); layout.addComponent(createdUserLink, 1, 0); layout.setColumnExpandRatio(1, 1.0f); Label assigneeLbl = new Label(AppContext.getMessage(CrmCommonI18nEnum.ITEM_ASSIGN_PEOPLE)); assigneeLbl.setSizeUndefined(); layout.addComponent(assigneeLbl, 0, 1); String assignUserName = (String) PropertyUtils.getProperty(bean, "assignuser"); String assignUserAvatarId = (String) PropertyUtils.getProperty(bean, "assignUserAvatarId"); String assignUserDisplayName = (String) PropertyUtils.getProperty(bean, "assignUserFullName"); UserLink assignUserLink = new UserLink(assignUserName, assignUserAvatarId, assignUserDisplayName); layout.addComponent(assignUserLink, 1, 1); } catch (Exception e) { LOG.error("Can not build user link {} ", BeanUtility.printBeanObj(bean)); } this.addComponent(layout); }
From source file:com.esofthead.mycollab.module.project.view.settings.ProjectMemberInviteViewImpl.java
License:Open Source License
private void initContent() { this.removeAllComponents(); this.roleComboBox = new ProjectRoleComboBox(); this.roleComboBox.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override//from ww w . java 2 s. c o m public void valueChange(ValueChangeEvent event) { Integer roleId = (Integer) roleComboBox.getValue(); displayRolePermission(roleId); } }); final AddViewLayout userAddLayout = new AddViewLayout( AppContext.getMessage(ProjectMemberI18nEnum.FORM_INVITE_MEMBERS), FontAwesome.USER); userAddLayout.addHeaderRight(createButtonControls()); GridFormLayoutHelper informationLayout = new GridFormLayoutHelper(1, 3, "100%", "167px", Alignment.TOP_LEFT); informationLayout.getLayout().setWidth("100%"); informationLayout.getLayout().setMargin(false); informationLayout.getLayout().addStyleName("colored-gridlayout"); final MHorizontalLayout lo = new MHorizontalLayout(); InviteUserTokenField inviteUserTokenField = new InviteUserTokenField(lo); informationLayout.addComponent(inviteUserTokenField, AppContext.getMessage(ProjectMemberI18nEnum.FORM_INVITEES_EMAIL), 0, 0); informationLayout.addComponent(roleComboBox, AppContext.getMessage(ProjectMemberI18nEnum.FORM_ROLE), 0, 1); messageArea = new TextArea(); messageArea.setValue(AppContext.getMessage(ProjectMemberI18nEnum.MSG_DEFAULT_INVITATION_COMMENT)); informationLayout.addComponent(messageArea, AppContext.getMessage(ProjectMemberI18nEnum.FORM_MESSAGE), 0, 2); userAddLayout.addBody(informationLayout.getLayout()); userAddLayout.addBottomControls(createBottomPanel()); this.addComponent(userAddLayout); }
From source file:com.esofthead.mycollab.module.project.view.settings.ProjectMemberReadViewImpl.java
License:Open Source License
public ProjectMemberReadViewImpl() { super(AppContext.getMessage(ProjectMemberI18nEnum.VIEW_READ_TITLE), FontAwesome.USER); contentWrapper.addStyleName("member-preview"); this.addHeaderRightContent(createButtonControls()); previewForm = initPreviewForm();/*from w w w . j a va 2s. c o m*/ previewForm.setWidth("100%"); previewForm.setStyleName("member-preview-form"); bottomLayout = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, false)) .withWidth("100%"); this.with(previewForm, bottomLayout); }
From source file:com.etest.view.systemadministration.faculty.FacultyFormWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setSpacing(true);//from ww w . java 2 s . co m form.setMargin(true); firstname.setWidth("100%"); firstname.setIcon(FontAwesome.INFO); firstname.setRequired(true); firstname.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(firstname); middlename.setWidth("100%"); middlename.setIcon(FontAwesome.INFO); middlename.setRequired(true); middlename.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(middlename); lastname.setWidth("100%"); lastname.setIcon(FontAwesome.INFO); lastname.setRequired(true); lastname.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(lastname); userType.setCaption("User Type: "); userType.setIcon(FontAwesome.USER_MD); userType.setRequired(true); form.addComponent(userType); username.setWidth("100%"); username.setIcon(FontAwesome.USER); username.setRequired(true); username.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(username); password1.setWidth("100%"); password1.setIcon(FontAwesome.CODE); password1.setRequired(true); password1.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(password1); password2.setWidth("100%"); password2.setIcon(FontAwesome.CODE); password2.setRequired(true); password2.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(password2); facultyBtn.setCaption(getButtonCaption()); facultyBtn.setWidth("100%"); facultyBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); facultyBtn.addStyleName(ValoTheme.BUTTON_SMALL); facultyBtn.addClickListener(buttonClickListener); form.addComponent(facultyBtn); if (getFacultyId() != 0) { Users u = fs.getFacultyInfoById(getFacultyId()); firstname.setValue(u.getFirstname()); middlename.setValue(u.getMiddlename()); lastname.setValue(u.getLastname()); username.setValue(u.getUsername_()); userType.setValue(CommonVariableMap.getFacultyUserType(u.getUserType())); password1.setValue(u.getPassword_()); password2.setValue(u.getPassword_()); } return form; }