List of usage examples for com.vaadin.ui.themes ValoTheme LABEL_COLORED
String LABEL_COLORED
To view the source code for com.vaadin.ui.themes ValoTheme LABEL_COLORED.
Click Source Link
From source file:by.bigvova.ui.LoginUI.java
License:Apache License
private Component buildLabels() { CssLayout labels = new CssLayout(); labels.addStyleName("labels"); Label welcome = new Label("Welcome"); welcome.setSizeUndefined();/* w w w. j av a 2s . c o m*/ welcome.addStyleName(ValoTheme.LABEL_H4); welcome.addStyleName(ValoTheme.LABEL_COLORED); labels.addComponent(welcome); Label title = new Label("QuickTickets Dashboard"); title.setSizeUndefined(); title.addStyleName(ValoTheme.LABEL_H3); title.addStyleName(ValoTheme.LABEL_LIGHT); labels.addComponent(title); return labels; }
From source file:com.example.bbs.vaadin.view.Labels.java
License:Apache License
public Labels() { setMargin(true);//w ww . j a v a 2s .c o m addStyleName("content-labels"); Label h1 = new Label("Labels"); h1.addStyleName(ValoTheme.LABEL_H1); addComponent(h1); HorizontalLayout split = new HorizontalLayout(); split.setWidth("100%"); addComponent(split); VerticalLayout left = new VerticalLayout(); left.setMargin(new MarginInfo(false, true, false, false)); split.addComponent(left); Label huge = new Label("Huge type for display text."); huge.addStyleName(ValoTheme.LABEL_HUGE); left.addComponent(huge); Label large = new Label( "Large type for introductory text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); large.addStyleName(ValoTheme.LABEL_LARGE); left.addComponent(large); Label h2 = new Label("Subtitle"); h2.addStyleName(ValoTheme.LABEL_H2); left.addComponent(h2); Label normal = new Label( "Normal type for plain text, with a <a href=\"https://vaadin.com\">regular link</a>. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.", ContentMode.HTML); left.addComponent(normal); Label h3 = new Label("Small Title"); h3.addStyleName(ValoTheme.LABEL_H3); left.addComponent(h3); Label small = new Label( "Small type for additional text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); small.addStyleName(ValoTheme.LABEL_SMALL); left.addComponent(small); Label tiny = new Label("Tiny type for minor text."); tiny.addStyleName(ValoTheme.LABEL_TINY); left.addComponent(tiny); Label h4 = new Label("Section Title"); h4.addStyleName(ValoTheme.LABEL_H4); left.addComponent(h4); normal = new Label( "Normal type for plain text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); left.addComponent(normal); Panel p = new Panel("Additional Label Styles"); split.addComponent(p); VerticalLayout right = new VerticalLayout(); right.setSpacing(true); right.setMargin(true); p.setContent(right); Label label = new Label( "Bold type for prominent text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); label.addStyleName(ValoTheme.LABEL_BOLD); right.addComponent(label); label = new Label( "Light type for subtle text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); label.addStyleName(ValoTheme.LABEL_LIGHT); right.addComponent(label); label = new Label( "Colored type for highlighted text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu."); label.addStyleName(ValoTheme.LABEL_COLORED); right.addComponent(label); label = new Label("A label for success"); label.addStyleName(ValoTheme.LABEL_SUCCESS); right.addComponent(label); label = new Label("A label for failure"); label.addStyleName(ValoTheme.LABEL_FAILURE); right.addComponent(label); }
From source file:com.github.djabry.platform.vaadin.view.SideBarView.java
License:Open Source License
private Component buildTitle() { Label t = new Label("CE"); t.addStyleName(ValoTheme.LABEL_HUGE); t.addStyleName(ValoTheme.LABEL_COLORED); t.addStyleName(ValoTheme.LABEL_BOLD); //t.addStyleName(ValoTheme.TEXTFIELD_ALIGN_CENTER); //t.setWidth("100%"); //t.addStyleName(ValoTheme.LABEL_BOLD); return t;/* w w w . jav a 2s . c om*/ }
From source file:com.hybridbpm.ui.component.dashboard.panel.DashboardPanel.java
License:Apache License
public DashboardPanel(DashboardTab panelView, PanelDefinition pd) { this.dashboardTab = panelView; this.panelDefinition = pd; toolbar = new HorizontalLayout(); toolbar.setMargin(new MarginInfo(false, false, false, true)); toolbar.setWidth(99, Unit.PERCENTAGE); toolbar.setStyleName(HybridbpmStyle.LAYOUT_PADDING8); caption.addStyleName(ValoTheme.LABEL_H4); caption.addStyleName(ValoTheme.LABEL_COLORED); caption.addStyleName(ValoTheme.LABEL_NO_MARGIN); toolbar.removeAllComponents();/*from w w w .java 2 s . c o m*/ toolbar.addComponents(caption, new PanelMenuBar(this)); toolbar.setExpandRatio(caption, 1); toolbar.setComponentAlignment(caption, Alignment.MIDDLE_LEFT); setSizeFull(); setStyleName(ValoTheme.LAYOUT_CARD); addStyleName("dashboard-panel"); configureModule(); }
From source file:com.hybridbpm.ui.view.LoginView.java
License:Apache License
private void buildLoginForm() { Responsive.makeResponsive(loginPanel); loginPanel.setSizeUndefined();// w w w .ja v a 2s.co m loginPanel.setSpacing(true); loginPanel.addStyleName("login-panel"); labels.addStyleName("labels"); welcome.setSizeUndefined(); welcome.addStyleName(ValoTheme.LABEL_H4); welcome.addStyleName(ValoTheme.LABEL_LIGHT); title.setSizeUndefined(); title.addStyleName(ValoTheme.LABEL_H3); title.addStyleName(ValoTheme.LABEL_COLORED); fields.setSpacing(true); fields.addStyleName("fields"); username.setIcon(FontAwesome.USER); username.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); username.setNullRepresentation(""); password.setIcon(FontAwesome.LOCK); password.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); signin.addStyleName(ValoTheme.BUTTON_PRIMARY); signin.setClickShortcut(ShortcutAction.KeyCode.ENTER); signin.focus(); fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT); signin.addClickListener((Button.ClickEvent event) -> { HybridbpmUI.getCurrent().login(username.getValue(), password.getValue(), rememberMe.getValue()); }); }
From source file:com.mechanicshop.components.MaintenanceLayout.java
private void buildLayout() { HorizontalLayout layoutTitle = new HorizontalLayout(); layoutTitle.setSizeUndefined();//from w ww . j ava2s. c o m layoutTitle.setWidth("100%"); layoutTitle.setSpacing(false); layoutTitle.setMargin(false); titleLabel.addStyleName(ValoTheme.LABEL_H2); titleLabel.addStyleName(ValoTheme.LABEL_COLORED); titleLabel.addStyleName(ValoTheme.LABEL_NO_MARGIN); titleLabel.addStyleName(ValoTheme.LABEL_BOLD); titleLabel.setSizeUndefined(); layoutTitle.addComponent(titleLabel); layoutTitle.setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER); VerticalLayout layoutTable = new VerticalLayout(); layoutTable.setSizeFull(); layoutTable.setSpacing(true); HorizontalLayout layoutButtons = new HorizontalLayout(); layoutButtons.setMargin(false); layoutButtons.setSpacing(true); layoutButtons.setSizeUndefined(); Button passwordBtn = new Button("Edit Password"); passwordBtn.addClickListener(passwordListener); passwordBtn.setImmediate(true); passwordBtn.setIcon(FontAwesome.EDIT); passwordBtn.setStyleName(ValoTheme.BUTTON_TINY); Button media1Btn = new Button("Media 1 Default Text"); media1Btn.setStyleName(ValoTheme.BUTTON_TINY); media1Btn.setImmediate(true); media1Btn.setIcon(FontAwesome.EDIT); media1Btn.addClickListener(media1Listener); Button media2Btn = new Button("Media 2 Default Text"); media2Btn.setStyleName(ValoTheme.BUTTON_TINY); media2Btn.setImmediate(true); media2Btn.setIcon(FontAwesome.EDIT); media2Btn.addClickListener(media2Listener); layoutButtons.addComponents(passwordBtn, media1Btn, media2Btn); layoutButtons.setComponentAlignment(passwordBtn, Alignment.MIDDLE_LEFT); layoutButtons.setComponentAlignment(media1Btn, Alignment.MIDDLE_LEFT); layoutButtons.setComponentAlignment(media2Btn, Alignment.MIDDLE_LEFT); addComponent(layoutTitle); addComponent(layoutTable); layoutTable.addComponent(layoutButtons); layoutTable.addComponent(table); layoutTable.setComponentAlignment(table, Alignment.TOP_CENTER); layoutTable.setExpandRatio(table, 3); setComponentAlignment(layoutTitle, Alignment.TOP_CENTER); setComponentAlignment(layoutTable, Alignment.TOP_CENTER); setExpandRatio(layoutTable, 3); setSpacing(true); setMargin(true); }
From source file:com.mechanicshop.components.TableLayout.java
private void buildLayout() { HorizontalLayout layoutTitle = new HorizontalLayout(); layoutTitle.setSizeUndefined();/*from w w w. ja va 2s . c om*/ layoutTitle.setWidth("100%"); layoutTitle.setSpacing(false); layoutTitle.setMargin(false); titleLabel.addStyleName(ValoTheme.LABEL_H2); titleLabel.addStyleName(ValoTheme.LABEL_COLORED); titleLabel.addStyleName(ValoTheme.LABEL_NO_MARGIN); titleLabel.addStyleName(ValoTheme.LABEL_BOLD); titleLabel.setSizeUndefined(); layoutTitle.addComponent(titleLabel); layoutTitle.setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER); VerticalLayout layoutTable = new VerticalLayout(); layoutTable.addComponent(table); layoutTable.setComponentAlignment(table, Alignment.TOP_CENTER); layoutTable.setSizeFull(); layoutTable.setSpacing(true); HorizontalLayout layoutButtons = new HorizontalLayout(); layoutButtons.setMargin(false); layoutButtons.setSpacing(true); layoutButtons.setSizeUndefined(); layoutButtons.setWidth("100%"); Button addBtn = new Button("Add new Car"); addBtn.addClickListener(addBtnListener); addBtn.setImmediate(true); addBtn.setStyleName(ValoTheme.BUTTON_TINY); addBtn.addStyleName(ValoTheme.BUTTON_FRIENDLY); Button deleteBtn = new Button("Delete Selected"); deleteBtn.setStyleName(ValoTheme.BUTTON_TINY); deleteBtn.addStyleName(ValoTheme.BUTTON_DANGER); deleteBtn.setImmediate(true); deleteBtn.addClickListener(removeListener); btnSendSMS.setStyleName(ValoTheme.BUTTON_TINY); btnSendSMS.addStyleName(ValoTheme.BUTTON_FRIENDLY); btnSendSMS.setImmediate(true); btnSendSMS.addClickListener(sendSMSBtnListener); searchTextField.setImmediate(true); searchTextField.addStyleName(ValoTheme.TEXTFIELD_TINY); searchTextField.addTextChangeListener(filterChangeListener); Label lbSearch = new Label("Search"); lbSearch.addStyleName(ValoTheme.LABEL_TINY); lbSearch.setSizeUndefined(); layoutButtons.addComponents(lbSearch, searchTextField, addBtn, deleteBtn, btnSendSMS); layoutButtons.setComponentAlignment(lbSearch, Alignment.MIDDLE_LEFT); layoutButtons.setComponentAlignment(searchTextField, Alignment.BOTTOM_LEFT); layoutButtons.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT); layoutButtons.setComponentAlignment(deleteBtn, Alignment.BOTTOM_RIGHT); layoutButtons.setComponentAlignment(btnSendSMS, Alignment.BOTTOM_RIGHT); layoutButtons.setExpandRatio(addBtn, 3); addComponent(layoutTitle); addComponent(layoutTable); layoutTable.addComponent(layoutButtons); layoutTable.setExpandRatio(table, 3); setComponentAlignment(layoutTitle, Alignment.TOP_CENTER); setComponentAlignment(layoutTable, Alignment.TOP_CENTER); setExpandRatio(layoutTable, 3); setSpacing(true); setMargin(true); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildAppointmentHeader() { // Label section = new Label("Objetivo"); // section.addStyleName(ValoTheme.LABEL_H4); // section.addStyleName(ValoTheme.LABEL_COLORED); // rootLayout.addComponent(section); appointmentType = new OptionGroup("Tipo"); appointmentType.setContainerDataSource(containerTypes); appointmentType.addStyleName("horizontal"); appointmentType.setWidth("100%"); //<editor-fold defaultstate="collapsed" desc="Enable customer and addresses combobox according to the selected appointment type"> appointmentType.addValueChangeListener(new ValueChangeListener() { @Override//from w w w.j av a 2 s . c o m public void valueChange(Property.ValueChangeEvent event) { try { AppointmentType appType = (AppointmentType) event.getProperty().getValue(); if (appType.getCode().equals("VIS")) { //customer.setEnabled(true); //address.setEnabled(true); //contactNotes.setEnabled(false); //contactNotes.setValue(""); } if (appType.getCode().equals("COM")) { //customer.setEnabled(true); //address.setEnabled(false); //contactNotes.setEnabled(false); //address.setValue(null); //contactNotes.setValue(""); } if (appType.getCode().equals("CON")) { //customer.setEnabled(false); //address.setEnabled(false); //contactNotes.setEnabled(true); //customer.setValue(null); //address.setValue(null); } } catch (Exception e) { } } }); //</editor-fold> rootLayout.addComponent(appointmentType); reason = new ComboBox("Motivo"); reason.setContainerDataSource(containerReasons); reason.setTextInputAllowed(false); reason.setWidth("100%"); rootLayout.addComponent(reason); Label customerSection = new Label("Cliente"); customerSection.addStyleName(ValoTheme.LABEL_H4); customerSection.addStyleName(ValoTheme.LABEL_COLORED); rootLayout.addComponent(customerSection); buildCustomer(); buildAddress(); buildContactInfo(); contactNotes = new TextField("Otro"); contactNotes.setWidth("100%"); contactNotes.setInputPrompt("Introduzca contacto o direccin..."); rootLayout.addComponent(contactNotes); Label scheduleSection = new Label("Programacin"); scheduleSection.addStyleName(ValoTheme.LABEL_H4); scheduleSection.addStyleName(ValoTheme.LABEL_COLORED); rootLayout.addComponent(scheduleSection); startTime = new PopupDateField("Fecha"); startTime.setTextFieldEnabled(false); startTime.setLocale(new Locale("es", "ES")); startTime.setResolution(Resolution.MINUTE); startTime.setDateFormat("dd/MM/yyyy HH:mm"); startTime.setConverter(new DateToCalendarConverter()); //startTime.setWidth(15, Unit.EM); rootLayout.addComponent(startTime); // aqui los comerciales trades = new OptionGroup("Comerciales"); trades.setContainerDataSource(containerTrades); trades.setConverter(new SetToListConverter()); trades.setNullSelectionAllowed(false); trades.setMultiSelect(true); trades.setImmediate(true); rootLayout.addComponent(trades); // // Los propositos de la visita // purpose = new OptionGroup("Propsito"); // purpose.setContainerDataSource(containerPurpose); // purpose.setConverter(new SetToListConverter()); // purpose.setNullSelectionAllowed(false); // purpose.setMultiSelect(true); // purpose.setImmediate(true); // rootLayout.addComponent(purpose); // HorizontalLayout wrapper = new HorizontalLayout(); // wrapper.setCaption("Fecha"); // wrapper.addComponent(startTime); // wrapper.addComponent(timeLapse); // //wrapper.setComponentAlignment(timeLapse, Alignment.TOP_LEFT); // wrapper.setWidth("100%"); // wrapper.setExpandRatio(startTime, 1); // wrapper.setExpandRatio(timeLapse, 1); // rootLayout.addComponent(wrapper); // contactInfo = new ComboBox(); // contactInfo.setTextInputAllowed(false); // contactInfo.setInputPrompt("Seleccione un contacto..."); // contactInfo.setWidth("100%"); // rootLayout.addComponent(contactInfo); // reasonNotes = new TextArea("Notas previas"); // reasonNotes.setWidth("100%"); // reasonNotes.setInputPrompt("Anotaciones del motivo..."); // rootLayout.addComponent(reasonNotes); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildAppointmentContent() { Label section = new Label("Resultado"); section.addStyleName(ValoTheme.LABEL_H4); section.addStyleName(ValoTheme.LABEL_COLORED); rootLayout.addComponent(section);//from w w w. j ava 2s . c o m //Duracin de la cita timeLapse = new ComboBox("Duracin"); timeLapse.setContainerDataSource(containerTimeLapses); timeLapse.setTextInputAllowed(false); timeLapse.setInputPrompt("Duracin..."); rootLayout.addComponent(timeLapse); //Kilometraje distance = new TextField("Kms"); distance.setNullRepresentation(""); rootLayout.addComponent(distance); //Notas notes = new TextArea("Resumen"); //notes.setSizeFull(); notes.setInputPrompt("Introduzca notas..."); rootLayout.addComponent(notes); // Los resultados de la visita purposes = new OptionGroup("Resultados"); purposes.setContainerDataSource(containerPurposes); purposes.setConverter(new SetToListConverter()); purposes.setNullSelectionAllowed(true); purposes.setMultiSelect(true); purposes.setImmediate(true); rootLayout.addComponent(purposes); //Quejas registradas buildAppointmentComplaints(); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildAppointmentStatus() { Label section = new Label("Estado"); section.addStyleName(ValoTheme.LABEL_H4); section.addStyleName(ValoTheme.LABEL_COLORED); rootLayout.addComponent(section);/*from w w w. j a v a2s . com*/ status = new ComboBox(); status.setContainerDataSource(containerStatuses); status.setWidth("100%"); status.setTextInputAllowed(false); status.setNullSelectionAllowed(false); notifyChanges = new CheckBox(); notifyChanges.setIcon(FontAwesome.BELL); notifyChanges.setImmediate(true); HorizontalLayout statusWrapper = new HorizontalLayout(); statusWrapper.setCaption("Estado"); statusWrapper.addComponent(status); statusWrapper.addComponent(notifyChanges); statusWrapper.setWidth("100%"); statusWrapper.setExpandRatio(status, 1); rootLayout.addComponent(statusWrapper); statusNotes = new TextArea("Notas de estado"); statusNotes.setWidth("100%"); statusNotes.setInputPrompt("Anotaciones del estado..."); rootLayout.addComponent(statusNotes); }