List of usage examples for com.vaadin.ui Label Label
public Label(String text)
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();//from w w w . j av a2 s . co 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:by.bigvova.views.HomeView.java
License:Apache License
public HomeView() { setSpacing(true);/*from ww w .ja v a2s .c o m*/ setMargin(true); setSizeFull(); Label header = new Label(" -=FoodNote=-"); header.addStyleName(ValoTheme.LABEL_H1); addComponent(header); Label body = new Label( "<h3> ?? ? ? <b>CRUD</b> ? ? <b>enterprise</b> ." + " ? ?? , ? ? .</h3>" + "? ?:" + "<ul>" + "<li>? ? <b>Spring Boot</b>, ? ? - propertie .</li>" + "<li>? ? ?? ? ??? <b>Repository</b> - <b>Spring Data JPA</b>, <b>Hibernate</b> (<b>JdbcTemplate</b> ?).</li>" + "<li> ?? - ?? , :</li>" + "<ul>" + "<li> - <b>PostgreSQL</b></li>" + "<li>connection pool - <b>HikariCP</b></li>" + "</ul>" + "<li>? - <b>EhCache</b>.</li>" + "<li> ? - <b>EventBus</b>, ? <b>Google Guava</b>.</li>" + "<li>?, - <b>Spring Security</b>:</li>" + "<ul>" + "<li> , ? <b>UserDetails</b></li>" + "<li> ?? ? <b>BCrypt</b></li>" + "<li> <b>Remember Me</b> ??</li>" + "</ul>" + "<li>? - <b>JUnit4</b></li>" + "<li> - <b>slf4j</b>, <b>logback</b></li>" + "<li>Front-end - <b>Vaadin framework</b>, <b>GWT</b></li>" + "<li> <b>Docker</b> ? <b>Ubuntu Server 14.04</b></li>" + "</ul>" + "<p>? Spring Boot - Vaadin ?? : <a href=\"https://github.com/peholmst/vaadin4spring\">vaadin4spring</a></p>" + "<p> ? <a href=\"https://github.com/BigVOVA/FoodNote\">github.com/BigVOVA/FoodNote</a></p>"); body.setContentMode(ContentMode.HTML); VerticalLayout bodyLayout = new VerticalLayout(); bodyLayout.setWidth(100, Unit.PERCENTAGE); bodyLayout.setMargin(new MarginInfo(false, true, false, true)); bodyLayout.addComponent(body); Panel panel = new Panel(); panel.setSizeFull(); panel.setContent(bodyLayout); addComponent(panel); setExpandRatio(panel, 1); }
From source file:by.bigvova.views.UserView.UserView.java
License:Apache License
@Override public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) { setSizeFull();// w ww. java 2s .co m footerButtons.setSpacing(true); VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSpacing(true); layout.setSizeFull(); Label header = new Label("Meal table"); header.addStyleName(ValoTheme.LABEL_H1); layout.addComponent(header); layout.addComponent(mainGrid); layout.addComponent(footerButtons); layout.setExpandRatio(mainGrid, 1); setCompositionRoot(layout); }
From source file:ccm.CCM1.ColorPickerApplication.java
License:Apache License
@Override public void init() { setMainWindow(main);/* w ww . ja v a 2 s . co m*/ // Listen for value change events in the custom component, // triggered when user clicks a button to select another color. colorselector.addListener(new ValueChangeListener() { public void valueChange(ValueChangeEvent event) { // Provide some server-side feedback colorname.setValue("Selected color: " + colorselector.getColor()); } }); main.addComponent(colorselector); // Add another component to give feedback from server-side code colorname = new Label("Selected color: " + colorselector.getColor()); main.addComponent(colorname); // Server-side manipulation of the component state final Button button = new Button("Set to white"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { colorselector.setColor("white"); } }); main.addComponent(button); setTheme("mytheme"); }
From source file:ch.bfh.ti.soed.hs16.srs.kandr3.view.MyUI.java
License:Open Source License
@Override protected void init(VaadinRequest vaadinRequest) { final VerticalLayout layout = new VerticalLayout(); final TextField name = new TextField(); name.setCaption("Type your name here:"); Button button = new Button("Click Me"); button.addClickListener(e -> {/*www. jav a2 s. c o m*/ layout.addComponent(new Label("Thanks " + name.getValue() + ", it works!")); }); layout.addComponents(name, button); layout.setMargin(true); layout.setSpacing(true); setContent(layout); }
From source file:ch.bfh.ti.soed.hs16.srs.red.ui.helper.SubWindowReservation.java
License:Open Source License
public SubWindowReservation() { this.layout = new VerticalLayout(); this.id = new Label("id"); this.name = new Label("name"); this.roomTitle = new Label("select room"); this.startTime = new Label("start time"); this.endTime = new Label("end time"); this.textFieldId = new TextField(); this.textFieldName = new TextField(); this.rooms = new ComboBox(); this.dateFieldStart = new DateField(); this.dateFieldEnd = new DateField(); this.buttonSave = new Button("save"); this.buttonDelete = new Button("delete"); dateFieldStart.setResolution(Resolution.MINUTE); dateFieldEnd.setResolution(Resolution.MINUTE); /*--------------------------------- add objects to horizontal container// w w w. j a v a2s. c o m ---------------------------------*/ HorizontalLayout idContainer = new HorizontalLayout(id, textFieldId); HorizontalLayout nameContainer = new HorizontalLayout(name, textFieldName); HorizontalLayout roomContainer = new HorizontalLayout(roomTitle, rooms); HorizontalLayout startContainer = new HorizontalLayout(startTime, dateFieldStart); HorizontalLayout endContainer = new HorizontalLayout(endTime, dateFieldEnd); HorizontalLayout buttons = new HorizontalLayout(buttonSave, buttonDelete); /*--------------------------------- add style names ---------------------------------*/ layout.setPrimaryStyleName(CSS_NAME); idContainer.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); nameContainer.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); roomContainer.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); startContainer.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); endContainer.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); buttons.setPrimaryStyleName(CSS_NAME + "-horizontalContainer"); /*--------------------------------- add to root layout ---------------------------------*/ this.layout.addComponents(idContainer, nameContainer, roomContainer, startContainer, endContainer, buttons); }
From source file:ch.bfh.ti.soed.hs16.srs.view.views.helpers.Footer.java
License:Open Source License
public Footer(String enterprise, String city, String country) { /* init objects */ this.footerLayout = new HorizontalLayout(); StringBuilder stringBuilder = new StringBuilder(); /* create String */ stringBuilder.append(" 2015 by "); stringBuilder.append(enterprise);/*from w w w . j av a 2s . c o m*/ stringBuilder.append(", "); stringBuilder.append(city); stringBuilder.append(", "); stringBuilder.append(country); /* add to textfield */ this.txtFld = new Label(stringBuilder.toString()); /* add components to layout */ this.footerLayout.addComponent(this.txtFld); }
From source file:ch.bfh.ti.soed.hs16.srs.white.view.subviews.RoomsView.java
License:Open Source License
@Override public Component createHeader() { GridLayout headerGrid = new GridLayout(3, 1); headerGrid.setStyleName("table-parent"); Label labelID = new Label("ID"); labelID.setStyleName("display-table-header"); Label labelName = new Label("Name"); labelName.setStyleName("display-table-header"); Label labelSeats = new Label("Seats Available"); labelSeats.setStyleName("display-table-header"); headerGrid.addComponent(labelID);//w ww. ja v a 2s . c o m headerGrid.addComponent(labelName); headerGrid.addComponent(labelSeats); return headerGrid; }
From source file:ch.bfh.ti.soed.hs16.srs.white.view.subviews.UsersView.java
License:Open Source License
@Override public Component createHeader() { GridLayout headerGrid = new GridLayout(4, 1); headerGrid.setStyleName("table-parent"); Label labelID = new Label("ID"); labelID.setStyleName("display-table-header"); Label labelFName = new Label("First Name"); labelFName.setStyleName("display-table-header"); Label labelLName = new Label("Last Name"); labelLName.setStyleName("display-table-header"); Label labelEMail = new Label("E-Mail"); labelEMail.setStyleName("display-table-header"); headerGrid.addComponent(labelID);/* www . j a va 2 s .com*/ headerGrid.addComponent(labelFName); headerGrid.addComponent(labelLName); headerGrid.addComponent(labelEMail); return headerGrid; }
From source file:ch.wscr.management.ui.view.MemberView.java
/** * Header der View erstellen/* w w w .j a v a 2 s .c o m*/ * * @return der Header */ private Component buidViewHeader() { HorizontalLayout header = new HorizontalLayout(); header.setWidth(100f, Unit.PERCENTAGE); header.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); header.setSpacing(true); Label title = new Label("Mitgliederverwaltung"); title.setSizeUndefined(); title.addStyleName(ValoTheme.LABEL_H1); header.addComponent(title); Label gap = new Label(); gap.setWidth(10, Unit.PIXELS); header.addComponent(gap); header.setExpandRatio(title, 1); return header; }