List of usage examples for com.vaadin.ui CssLayout addComponent
@Override public void addComponent(Component c)
From source file:org.lunifera.example.vaadin.ecview.ECViewDemoUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { setStyleName(Reindeer.LAYOUT_BLACK); VaadinObservables.getRealm(getUI()); CssLayout layout = new CssLayout(); layout.setSizeFull();/*from ww w . j a va 2s . c o m*/ setContent(layout); TabSheet tabsheet = new TabSheet(); tabsheet.setSizeFull(); try { // tabsheet.addTab(new ECViewVerticalLayout(), "ECView Vertical"); // tabsheet.addTab(new ECViewHorizontalLayout(), // "ECView Horizontal"); // tabsheet.addTab(new ECViewGridLayout(), "ECView Gridlayout"); // tabsheet.addTab(new ECViewTabSheet(), "ECView Tabsheet"); // tabsheet.addTab(new ECViewDatabinding(), "ECView Bindings"); // tabsheet.addTab(new ECViewEntityGenerator(), // "ECView Entity Generator"); // tabsheet.addTab(new ECViewDtoGenerator(), // "ECView Dto Generator"); tabsheet.addTab(new ECViewMasterDetail(), "ECView Master Detail"); } catch (ContextException e) { e.printStackTrace(); } layout.addComponent(tabsheet); }
From source file:org.lunifera.example.vaadin.osgi.jpacontainer.DepartmentSelector.java
License:Apache License
@Override protected Component initContent() { CssLayout cssLayout = new CssLayout(); cssLayout.addComponent(geographicalDepartment); cssLayout.addComponent(department);//from w w w. j a va 2s . co m return cssLayout; }
From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.TabPresentation.java
License:Open Source License
@Override public Component createWidget(Object parent) { TabSheet tabSheet = (TabSheet) parent; YTab yTab = (YTab) getModel();// www . j av a 2 s .c o m @SuppressWarnings("restriction") IEmbeddableEditpart childEditpart = ElementEditpart.getEditpart(yTab.getEmbeddable()); CssLayout childLayout = new CssLayout(); if (childEditpart == null) { tab = tabSheet.addTab(childLayout, "content missing"); return childLayout; } IWidgetPresentation<Component> childPresentation = childEditpart.getPresentation(); Component childContent = childPresentation.createWidget(childLayout); childLayout.addComponent(childContent); tab = tabSheet.addTab(childLayout); if (modelAccess.isLabelValid()) { tab.setCaption(modelAccess.getLabel()); } return null; }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.FieldEditorRenderer.java
License:Open Source License
protected CssLayout createCssLayoutWithCaption() { CssLayout layout = new CssLayout(); layout.addComponent(new Label(basicInterfaceToEditor.getLabel())); this.component = layout; return layout; }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.impexp.BasicImpExp.java
License:Open Source License
protected void createPreferencesTable(CssLayout layout, List<PreferencesPage> pageList) { container = new BeanItemContainer<>(PreferencesPage.class); container.addNestedContainerProperty("category.name"); refreshPreferences(pageList);/*from www. j av a 2s . co m*/ table = new Table(); table.setSizeFull(); table.setContainerDataSource(container); table.addGeneratedColumn("description", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { PreferencesPage page = (PreferencesPage) itemId; String d = page.getDescription(); if (d.length() > MAX_DESCRIPTION_LENGTH) { d = d.substring(0, MAX_DESCRIPTION_LENGTH).trim() + "..."; } return d; } }); table.addGeneratedColumn("include", new ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { CheckBox cb = new CheckBox(); cb.setData(itemId); checkBoxes.add(cb); return cb; } }); table.setColumnHeader("include", " "); table.setColumnHeader("category.name", "Name"); table.setColumnHeader("description", "Description"); table.setVisibleColumns("include", "category.name", "description"); Panel panel = new Panel(table); panel.setWidth("100%"); panel.setHeight("200px"); layout.addComponent(panel); }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.impexp.BasicImpExp.java
License:Open Source License
protected void createStatusLabel(CssLayout layout, String string) { statusLabel = new Label("Press Export to export preferences"); statusLabel.addStyleName("status-label"); layout.addComponent(statusLabel); }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.impexp.ImportPreferences.java
License:Open Source License
@Override public Component getComponent(OptionDialog optionDialog) { CssLayout layout = new CssLayout(); layout.addStyleName("import"); Upload upload = new Upload("Select file with preferences for upload", this); upload.setWidth("100%"); upload.setButtonCaption("Upload"); upload.addSucceededListener(this); layout.addComponent(upload); layout.addComponent(new Label("Select preferences to import")); createPreferencesTable(layout, new ArrayList<PreferencesPage>()); createStatusLabel(layout, "Choose file with preferences"); return layout; }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.IntegerFieldEditorRenderer.java
License:Open Source License
@Override public void render() { CssLayout layout = createCssLayoutWithCaption(); textField = new TextField(); if (getValue() != null) textField.setValue(getValue().toString()); textField.setWidth("100%"); layout.addComponent(textField); }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.ListEditorRenderer.java
License:Open Source License
@Override public void render() { select = new ListSelect(); refreshSelect();/* w w w . jav a2 s. c o m*/ CssLayout layout = new CssLayout(); layout.setWidth("100%"); layout.addComponent(new Label(editor.getLabel())); HorizontalLayout row = new HorizontalLayout(); row.setWidth("100%"); layout.addComponent(row); row.addComponent(select); select.setWidth("100%"); buttonPanel = new CssLayout(); buttonPanel.setSizeFull(); row.addComponent(buttonPanel); row.setExpandRatio(select, 8); row.setExpandRatio(buttonPanel, 2); createButtons(); component = layout; }
From source file:org.lunifera.vaaclipse.ui.preferences.addon.internal.ListFieldEditorRenderer.java
License:Open Source License
@Override public void render() { select = createSelect();/*from w ww . j av a 2 s .c om*/ CssLayout layout = new CssLayout(); layout.addComponent(new Label(editor.getLabel())); layout.addComponent(select); refreshSelect(); component = layout; }