List of usage examples for com.vaadin.server Responsive makeResponsive
public static void makeResponsive(Component... components)
From source file:com.dungnv.streetfood.view.DishView.java
public DishView() { user = (UserDTO) VaadinSession.getCurrent().getAttribute(UserDTO.class.getName()); setLocale(VaadinSession.getCurrent().getLocale()); setSizeFull();// w w w . java 2 s. c om root = new VerticalLayout(); root.setSizeFull(); root.setMargin(true); root.addStyleName("dashboard-view"); setContent(root); Responsive.makeResponsive(root); init(); root.addComponent(header); builAction(); dtoSearch = new DishDTO(); onSearch(true); }
From source file:com.dungnv.streetfood.view.RestaurantView.java
public RestaurantView() { user = (UserDTO) VaadinSession.getCurrent().getAttribute(UserDTO.class.getName()); setLocale(VaadinSession.getCurrent().getLocale()); setSizeFull();//from w w w . j av a 2s .c om root = new VerticalLayout(); root.setSizeFull(); root.setMargin(true); root.addStyleName("dashboard-view"); setContent(root); Responsive.makeResponsive(root); init(); root.addComponent(header); builAction(); dtoSearch = new RestaurantDTO(); onSearch(true); }
From source file:com.dungnv.streetfood.view.SlideShowView.java
public SlideShowView() { user = (UserDTO) VaadinSession.getCurrent().getAttribute(UserDTO.class.getName()); setLocale(VaadinSession.getCurrent().getLocale()); setSizeFull();//from ww w . ja v a 2 s . co m root = new VerticalLayout(); root.setSizeFull(); root.setMargin(true); root.addStyleName("dashboard-view"); setContent(root); Responsive.makeResponsive(root); init(); root.addComponent(header); builAction(); dtoSearch = new SlideShowDTO(); onSearch(true); }
From source file:com.github.carljmosca.MainLayout.java
private void init() { setSizeFull();// ww w .ja v a 2 s .c o m addStyleName("menylayout"); Responsive.makeResponsive(this); ComboBox<Person> cmbPerson = new ComboBox<>(); cmbPerson.setItems(personProcessor.findAll()); cmbPerson.setItemCaptionGenerator(c -> c.getTitle() + " " + c.getFirstName() + " " + c.getLastName()); cmbPerson.addValueChangeListener((HasValue.ValueChangeEvent<Person> event) -> { binder.setBean(cmbPerson.getValue()); }); title = new ComboBox("Title", Arrays.asList(titles)); firstName = new TextField("First"); middleName = new TextField("Middle"); lastName = new TextField("Last"); Button btnNew = new Button("New"); btnNew.addClickListener((Button.ClickEvent event) -> { person = new Person(); binder.setBean(person); }); Button btnSave = new Button("Save"); btnSave.addClickListener((Button.ClickEvent event) -> { personProcessor.addPerson(person); cmbPerson.setItems(personProcessor.findAll()); }); personLayout.setWidth(null); personLayout.setSpacing(true); personLayout.addStyleName("menu"); personLayout.addComponent(title); personLayout.addComponent(firstName); personLayout.addComponent(middleName); personLayout.addComponent(lastName); personLayout.addComponent(btnNew); addComponent(btnSave); addComponent(cmbPerson); addComponent(personLayout); //addComponent(buttonLayout); doBinding(); }
From source file:com.github.djabry.platform.vaadin.view.LoginView.java
License:Open Source License
private Component buildLoginForm() { HorizontalLayout loginPanel = new HorizontalLayout(); //loginPanel.setSizeUndefined(); loginPanel.setSpacing(true);/*from w w w .j a v a 2 s. c o m*/ Responsive.makeResponsive(loginPanel); //loginPanel.addStyleName("login-panel"); //loginPanel.addComponent(buildLabels()); loginPanel.addComponent(buildFields()); //loginPanel.addComponent(new CheckBox("Remember me", false)); return loginPanel; }
From source file:com.github.tempora.view.TemporaUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { setLocale(Locale.US);// w w w .ja v a 2s .c o m Responsive.makeResponsive(this); addStyleName(ValoTheme.UI_WITH_MENU); setContent(mainView); // Update the user profile Profile profile = currentUser.getProfile().get(); if (profile == null) return; mainView.getCurrentUserEmail().setValue(profile.getEmailAddress()); mainView.getCurrentHistoryId().setValue(profile.getHistoryId().toString()); mainView.getMessagesTotal().setValue(profile.getMessagesTotal().toString()); mainView.getThreadsTotal().setValue(profile.getThreadsTotal().toString()); // Using Vaadin Push to fetch the Mailbox statistics // out of RDF4J store top5JobHandle = executorService.scheduleWithFixedDelay(updateTop5Job, 500, 3000, TimeUnit.MILLISECONDS); generalInfoJobHandle = executorService.scheduleWithFixedDelay(updateGeneralInfoJob, 500, 3000, TimeUnit.MILLISECONDS); }
From source file:com.hybridbpm.ui.component.AbstractTabLayout.java
License:Apache License
public AbstractTabLayout() { Design.read(this); Responsive.makeResponsive(this); btnAdd.setIcon(FontAwesome.PLUS_CIRCLE); btnAdd.addClickListener(this); btnRefresh.setIcon(FontAwesome.REFRESH); btnRefresh.addClickListener(this); prepareUI();/* w w w .j ava2 s . co m*/ }
From source file:com.hybridbpm.ui.component.AbstractTableLayout.java
License:Apache License
public AbstractTableLayout() { Design.read(this); Responsive.makeResponsive(this); btnAdd.setIcon(FontAwesome.PLUS_CIRCLE); btnAdd.addClickListener(this); btnRefresh.setIcon(FontAwesome.REFRESH); btnRefresh.addClickListener(this); setExpandRatio(iTable, 1f);// w w w . j a v a 2 s . c om prepareTable(); }
From source file:com.hybridbpm.ui.component.AbstractTreeTableLayout.java
License:Apache License
public AbstractTreeTableLayout() { Design.read(this); Responsive.makeResponsive(this); btnAdd.setIcon(FontAwesome.PLUS_CIRCLE); btnAdd.addClickListener(this); btnRefresh.setIcon(FontAwesome.REFRESH); btnRefresh.addClickListener(this); setExpandRatio(iTable, 1f);/*ww w. j a v a 2 s . c o m*/ prepareTable(); }
From source file:com.hybridbpm.ui.component.bpm.CaseLayout.java
License:Apache License
public CaseLayout(String caseId) { this.caseId = caseId; Responsive.makeResponsive(this); btnDelete.setIcon(FontAwesome.TIMES); btnTerminate.setIcon(FontAwesome.STOP); btnTerminate.setStyleName(ValoTheme.BUTTON_PRIMARY); buttonBar.setWidth(100, Unit.PERCENTAGE); buttonBar.setSpacing(true);//from ww w. j a v a2 s . com buttonBar.addStyleName("toolbar"); buttonBar.setExpandRatio(btnDelete, 1f); buttonBar.setComponentAlignment(btnDelete, Alignment.MIDDLE_RIGHT); buttonBar.setComponentAlignment(btnTerminate, Alignment.MIDDLE_RIGHT); tabSheet.setStyleName(ValoTheme.TABSHEET_FRAMED); tabSheet.setSizeFull(); setSizeFull(); setSpacing(true); addComponent(caseFormHeader); addComponent(tabSheet); addComponent(buttonBar); setExpandRatio(tabSheet, 1f); loadForm(); }