List of usage examples for com.vaadin.ui.themes ValoTheme BUTTON_SMALL
String BUTTON_SMALL
To view the source code for com.vaadin.ui.themes ValoTheme BUTTON_SMALL.
Click Source Link
From source file:com.etest.view.notification.NotificationMainUI.java
public NotificationMainUI() { setSizeFull();/*w ww.ja v a2 s . c o m*/ setSpacing(true); if (VaadinSession.getCurrent().getAttribute("userId") == null) { Page.getCurrent().setLocation("http://localhost:8080/"); } else { addComponent(populateNoficationTable()); } HorizontalLayout h = new HorizontalLayout(); h.setWidth("950px"); Button sendMsgBtn = new Button("Send Message"); sendMsgBtn.setWidthUndefined(); sendMsgBtn.addStyleName(ValoTheme.BUTTON_SMALL); sendMsgBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); sendMsgBtn.addClickListener((Button.ClickEvent event) -> { Notification.show("Send Message!"); }); h.addComponent(sendMsgBtn); h.setComponentAlignment(sendMsgBtn, Alignment.MIDDLE_RIGHT); addComponent(h); }
From source file:com.etest.view.systemadministration.curriculum.CurriculumFormWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setMargin(true);/* w w w. j a va2s .co m*/ yearLevel.setWidth("75%"); form.addComponent(yearLevel); subjectField.setWidth("75%"); form.addComponent(subjectField); normCourseOffering.setWidth("75%"); form.addComponent(normCourseOffering); descriptiveTitleField.setWidth("100%"); descriptiveTitleField.setRows(3); descriptiveTitleField.setInputPrompt("Descriptive Title.."); form.addComponent(descriptiveTitleField); Button save = new Button("SAVE"); save.setWidth("100%"); save.setIcon(FontAwesome.SAVE); save.addStyleName(ValoTheme.BUTTON_PRIMARY); save.addStyleName(ValoTheme.BUTTON_SMALL); save.addClickListener(buttonClickListener); Button update = new Button("UPDATE"); update.setWidth("100%"); update.setIcon(FontAwesome.ADJUST); update.addStyleName(ValoTheme.BUTTON_PRIMARY); update.addStyleName(ValoTheme.BUTTON_SMALL); update.addClickListener(buttonClickListener); Button delete = new Button("DELETE"); delete.setWidth("100%"); delete.setIcon(FontAwesome.ERASER); delete.addStyleName(ValoTheme.BUTTON_PRIMARY); delete.addStyleName(ValoTheme.BUTTON_SMALL); delete.addClickListener(buttonClickListener); HorizontalLayout hlayout = new HorizontalLayout(); hlayout.setWidth("100%"); hlayout.setSpacing(true); if (getCurriculumId() != 0) { hlayout.addComponent(update); hlayout.addComponent(delete); Curriculum c = cs.getCurriculumById(getCurriculumId()); yearLevel.setValue(c.getYearLevel()); subjectField.setValue(c.getSubject()); normCourseOffering.setValue(c.getNormCourseOffering()); descriptiveTitleField.setValue(c.getDescriptiveTitle()); if (getButtonCaption().equals("edit")) { delete.setVisible(false); } else { update.setVisible(false); } } else { hlayout.addComponent(save); } form.addComponent(hlayout); return form; }
From source file:com.etest.view.systemadministration.CurriculumMainUI.java
public CurriculumMainUI() { setSizeFull();/*from www . j a v a2 s. c o m*/ setMargin(true); setSpacing(true); // addComponent(buildForms()); // populateDataGrid(); Button newBtn = new Button("ADD NEW CURRICULUM"); newBtn.setWidth("220px"); newBtn.setIcon(FontAwesome.OPENID); newBtn.addStyleName(ValoTheme.BUTTON_LINK); newBtn.addStyleName(ValoTheme.BUTTON_SMALL); newBtn.addClickListener(buttonClickListener); addComponent(newBtn); addComponent(dataGridPanel()); }
From source file:com.etest.view.systemadministration.faculty.FacultyFormWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setSpacing(true);//from w w w . j a v a2 s . c o 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; }
From source file:com.etest.view.systemadministration.FacultyMainUI.java
public FacultyMainUI() { setSizeFull();/*from ww w . j av a 2 s. c o m*/ setSpacing(true); setMargin(true); Button formBtn = new Button("NEW FACULTY FORM"); formBtn.setWidth("230px"); formBtn.setIcon(FontAwesome.OPENID); formBtn.addStyleName(ValoTheme.BUTTON_LINK); formBtn.addStyleName(ValoTheme.BUTTON_SMALL); formBtn.addClickListener(formBtnClickListener); addComponent(formBtn); addComponent(getDataTablePanel()); }
From source file:com.etest.view.systemadministration.SemestralTeam.AddSemestralTeamMembersWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setSpacing(true);/*from ww w. ja v a 2 s .c o m*/ faculty = CommonComboBox.getAllFacultyExceptTeamLeader("Add Team Member.. ", getFacultyId()); faculty.setWidth("60%"); faculty.setIcon(FontAwesome.USER); form.addComponent(faculty); addMemberBtn.setWidth("60%"); addMemberBtn.setIcon(FontAwesome.SAVE); addMemberBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); addMemberBtn.addStyleName(ValoTheme.BUTTON_SMALL); addMemberBtn.addClickListener(buttonClickListener); form.addComponent(addMemberBtn); populateDataTable(); form.addComponent(table); return form; }
From source file:com.etest.view.systemadministration.SemestralTeam.AddSemestralTeamMembersWindow.java
Window removeTeamMemberWindow(int facultyRowId) { Window sub = new Window(); sub.setCaption("REMOVE TEAM MEMBER"); sub.setWidth("250px"); sub.setModal(true);//w w w . java 2 s .c o m sub.center(); VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull(); vlayout.setMargin(true); Button removeBtn = new Button("REMOVE"); removeBtn.setWidth("100%"); removeBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); removeBtn.addStyleName(ValoTheme.BUTTON_SMALL); removeBtn.addClickListener((Button.ClickEvent event) -> { boolean result = tts.removeTeamMember(getTeamTeachId(), facultyRowId); if (result) { populateDataTable(); sub.close(); } }); vlayout.addComponent(removeBtn); sub.setContent(vlayout); sub.getContent().setHeightUndefined(); return sub; }
From source file:com.etest.view.systemadministration.SemestralTeam.AddSemestralTeamMembersWindow.java
Window editTeamMemberPositionWindow(int facultyRowId) { Window sub = new Window(); sub.setCaption("REMOVE TEAM MEMBER"); sub.setWidth("250px"); sub.setModal(true);// www. j a v a 2s. c o m sub.center(); VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull(); vlayout.setSpacing(true); vlayout.setMargin(true); String name = fs.getFacultyNameById(facultyRowId); vlayout.addComponent(new Label("Set " + name.toUpperCase() + " as Team Leader.")); Button updateBtn = new Button("UPDATE"); updateBtn.setWidth("100%"); updateBtn.setIcon(FontAwesome.USER); updateBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); updateBtn.addStyleName(ValoTheme.BUTTON_SMALL); updateBtn.addClickListener((Button.ClickEvent event) -> { int userId = us.getUserIdByFacultyId(facultyRowId); boolean result = tts.updateTeamTeach(getTeamTeachId(), userId); if (result) { sub.close(); populateDataTable(); close(); } }); vlayout.addComponent(updateBtn); sub.setContent(vlayout); sub.getContent().setHeightUndefined(); return sub; }
From source file:com.etest.view.systemadministration.SemestralTeam.RemoveSemestralTeamWindow.java
public RemoveSemestralTeamWindow(int teamTeachId) { this.teamTeachId = teamTeachId; setCaption("DELETE WINDOW"); setWidth("270px"); setModal(true);// w w w . j a v a 2 s. c o m center(); VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull(); vlayout.setMargin(true); Button removeBtn = new Button("REMOVE SEMESTRAL TEAM?"); removeBtn.setWidth("100%"); removeBtn.setIcon(FontAwesome.TRASH_O); removeBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); removeBtn.addStyleName(ValoTheme.BUTTON_SMALL); removeBtn.addClickListener((Button.ClickEvent event) -> { boolean result = tts.removeSemestralTeam(getTeamTeachId()); if (result) { close(); } }); removeBtn.setImmediate(true); vlayout.addComponent(removeBtn); setContent(vlayout); getContent().setHeightUndefined(); }
From source file:com.etest.view.systemadministration.SemestralTeamUI.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("400px"); form.setSpacing(true);/*from w ww . ja va 2 s . c om*/ subjects = CommonComboBox.getSubjectFromCurriculum("Subject.."); subjects.setCaption("Curriculum: "); subjects.setIcon(FontAwesome.SEARCH); form.addComponent(subjects); schoolYear = CommonComboBox.getSchoolYear("School Year.."); schoolYear.setCaption("School Year: "); schoolYear.setIcon(FontAwesome.SEARCH); form.addComponent(schoolYear); semester = CommonComboBox.getNormCourseOfferingComboBox("Semester.."); semester.setCaption("Semester: "); semester.setIcon(FontAwesome.SEARCH); form.addComponent(semester); faculty = CommonComboBox.getAllFaculty("Select Faculty.."); faculty.setCaption("Team Leader: "); faculty.setIcon(FontAwesome.USER); form.addComponent(faculty); Button saveBtn = new Button("Enroll Semestral Team"); saveBtn.setWidth("100%"); saveBtn.setIcon(FontAwesome.SAVE); saveBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); saveBtn.addStyleName(ValoTheme.BUTTON_SMALL); saveBtn.addClickListener(saveBtnClickListener); saveBtn.setImmediate(true); form.addComponent(saveBtn); return form; }