List of usage examples for com.vaadin.ui Panel Panel
public Panel()
From source file:com.etest.view.systemadministration.SemestralTeamUI.java
Panel dataTablePanel() { Panel panel = new Panel(); panel.setWidth("100%"); panel.setContent(table); return panel; }
From source file:com.etest.view.testbank.CellCaseMainUI.java
Panel getCellCasePanel() { Panel panel = new Panel(); panel.setWidth("100%"); populateDataTable(); panel.setContent(table); return panel; }
From source file:com.etest.view.testbank.cellitem.CellCaseItemWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setMargin(true);// ww w . j a v a2 s. com form.setSpacing(true); CellCase cc = ccs.getCellCaseById(getCellCaseId()); Panel panel = new Panel(); panel.setWidth("100%"); panel.addStyleName(ValoTheme.PANEL_BORDERLESS); Label caseLabel = new Label(); caseLabel.setCaption("CASE: "); caseLabel.setStyleName("bold-font-style"); caseLabel.setWidth("80px"); Label caseTopic = new Label(); caseTopic.setValue(caseLabel.getCaption() + cc.getCaseTopic()); caseTopic.setContentMode(ContentMode.RAW); caseTopic.addStyleName("wrapline"); panel.setContent(caseTopic); form.addComponent(panel); form.addComponent(table); HorizontalLayout v = new HorizontalLayout(); v.setWidth("100%"); Button create = new Button("CREATE NEW STEM"); create.setWidthUndefined(); create.addStyleName(ValoTheme.BUTTON_LINK); create.addStyleName(ValoTheme.BUTTON_TINY); create.addStyleName(ValoTheme.BUTTON_QUIET); create.addClickListener(modifyBtnClickListener); v.addComponent(create); v.setComponentAlignment(create, Alignment.MIDDLE_RIGHT); form.addComponent(v); return form; }
From source file:com.etest.view.testbank.cellitem.ViewStemWindow.java
Panel getDataTablePanel() { Panel panel = new Panel(); panel.addStyleName(ValoTheme.PANEL_BORDERLESS); populateDataTable(); panel.setContent(table); return panel; }
From source file:com.expressui.sample.view.LoginPage.java
License:Open Source License
@PostConstruct @Override/*from w w w. j a v a2 s .c om*/ public void postConstruct() { super.postConstruct(); setSizeFull(); LoginForm loginForm = new LoginForm(); loginForm.addStyleName("border"); loginForm.setSizeUndefined(); loginForm.setLoginButtonCaption(uiMessageSource.getMessage("loginPage.button")); loginForm.setUsernameCaption(uiMessageSource.getMessage("loginPage.username")); loginForm.setPasswordCaption(uiMessageSource.getMessage("loginPage.password")); loginForm.addListener(new LoginHandler()); Panel panel = new Panel(); panel.addStyleName("loginPage"); panel.addStyleName("border"); panel.setSizeUndefined(); panel.setCaption(uiMessageSource.getMessage("loginPage.caption")); panel.addComponent(loginForm); panel.addComponent(new Label(uiMessageSource.getMessage("loginPage.tip"))); addComponent(panel); setComponentAlignment(panel, Alignment.MIDDLE_CENTER); }
From source file:com.foc.vaadin.FocCentralPanel.java
License:Apache License
public Component getCentralPanelWrapper() { if (centralPanel == null) { centralPanel = new Panel(); // centralPanel = new FVVerticalLayout(); centralPanel.setSizeFull();/*from ww w.ja v a 2s . c o m*/ // centralPanel.setHeight("-1px"); // centralPanel.setWidth("-1px"); centralPanel.setStyleName("focCentralPanel"); if (Globals.isValo()) centralPanel.removeStyleName("focNoCaptionMargin"); } return centralPanel; }
From source file:com.foc.vaadin.FocWebApplication.java
License:Apache License
protected void init2(VaadinRequest request) { // Create the footer Layout with a simple Label VerticalLayout footerLayout = new VerticalLayout(); {//from ww w . j a v a2s . co m footerLayout.addComponent(new Label("This is the footer always visible")); footerLayout.setHeight("-1px"); } // Create the Body Panel that contains a VerticalLayout itself Panel panel = new Panel(); { panel.setSizeFull();// Panel size is undefined final VerticalLayout panelLayout = new VerticalLayout(); panelLayout.setSizeUndefined();// Panel Layout size is undefined panel.setContent(panelLayout); // Fill the panel layout with lots of labels to exceed the window height for (int i = 0; i < 200; i++) { panelLayout.addComponent(new Label("Thank you for clicking")); } } // Put all in the the MainVerticalLayout final VerticalLayout mainVerticalLayout = new VerticalLayout(); mainVerticalLayout.setSizeFull();// Main Layout is set to size Full so that it fills all the height mainVerticalLayout.addComponent(panel); mainVerticalLayout.addComponent(footerLayout); mainVerticalLayout.setExpandRatio(panel, 1); setContent(mainVerticalLayout); }
From source file:com.foc.vaadin.gui.layouts.FVChartWrapperLayout.java
License:Apache License
private void setChart(FVChart chart) { this.chart = chart; if (chart != null) { chartPanel = new Panel(); VerticalLayout vLay = new VerticalLayout(); vLay.setMargin(false);//from w w w . j a v a 2s . com vLay.setSpacing(false); chartPanel.setContent(vLay); chartPanel.setContent(chart); addComponent(chart); } }
From source file:com.foc.vaadin.gui.layouts.FVTableWrapperLayout.java
License:Apache License
public void setTableOrTree(FocXMLLayout xmlLayout, ITableTree tableOrTree) { this.tableOrTree = tableOrTree; getTableTreeDelegate().setWrapperLayout(this); if (tableOrTree != null && tableOrTree.getTableTreeDelegate() != null) { String title = getAttributes().getValue(FXML.ATT_TITLE); if (title != null && !title.isEmpty()) { setTitle(title);// ww w . j a va 2 s .co m } boolean isEditable = getTableTreeDelegate() != null ? getTableTreeDelegate().isEditable() : null; if (Globals.isValo()) { Embedded open = valo_GetOpenEmbedded(isEditable); if (open != null) { addHeaderComponent(open); } Embedded add = valo_GetAddEmbedded(isEditable); if (add != null) { addHeaderComponent(add); } Embedded delete = valo_GetDeleteEmbedded(isEditable); if (delete != null) { addHeaderComponent(delete); } Embedded duplicate = valo_GetDuplicateEmbedded(); if (duplicate != null) { addHeaderComponent(duplicate); } Embedded statusStyle = valo_GetStatusStyleEmbedded(); if (statusStyle != null) { addHeaderComponent(statusStyle); } Embedded transactionFilter = valo_GetTransactionFilterEmbedded(); if (transactionFilter != null) { addHeaderComponent(transactionFilter); } } else { FVButton openButton = getOpenButton(); if (openButton != null) { addHeaderComponent(openButton); } FVButton addButton = getAddButton(); if (addButton != null) { addHeaderComponent(addButton); } FVButton deleteButton = getDeleteButton(); if (deleteButton != null) { addHeaderComponent(deleteButton); } FVButton duplicateButton = getDuplicateButton(); if (duplicateButton != null) { addHeaderComponent(duplicateButton); } FVButton statusStyleButton = getStatusStyleButton(); if (statusStyleButton != null) { addHeaderComponent(statusStyleButton); } FVButton transactionFilterButton = getTransactionFilterButton(); if (transactionFilterButton != null) { addHeaderComponent(transactionFilterButton); } } // FVButton exportButton = getExportToExcelButton(); // if(exportButton != null){ // addHeaderComponent(exportButton); // } if (!isPrintingUI() && getAttributes() != null && getAttributes().getValue(FXML.ATT_REFRESH_ENABLED) != null) { if (getAttributes().getValue(FXML.ATT_REFRESH_ENABLED).equalsIgnoreCase("false")) { isRefreshEnabled = false; } } if (isRefreshEnabled && !isPrintingUI() && getXMLType() != null && !getXMLType().equals(FXML.TAG_PIVOT)) { if (Globals.isValo()) { Embedded reloadEmbedded = valo_GetReloadEmbedded(); if (reloadEmbedded != null) { addHeaderComponent(reloadEmbedded); } } else { FVButton reloadButton = getReloadButton(); if (reloadButton != null) { addHeaderComponent(reloadButton); } } } String showViewSelector = getTableTreeDelegate().getAttributes().getValue(FXML.ATT_SHOW_VIEW_SELECTOR); if (showViewSelector != null && showViewSelector.toLowerCase().equals("true")) { // FocXMLLayout focXMLLayout = getTableTreeDelegate().getFocXMLLayout(); if (xmlLayout != null) { viewSelector = new FVViewSelector_MenuBar(xmlLayout, null); if (viewSelector != null) { addHeaderComponent(viewSelector); } } } } FVCheckBox editCheckBox = getTableTreeDelegate().getEditableCheckBox(); if (editCheckBox != null) { getHorizontalLayout().addComponent(editCheckBox); } setFilterBoxListenerIfNecessary(); tablePanel = new Panel(); tablePanel.addStyleName(Reindeer.PANEL_LIGHT); // tablePanel.addActionHandler(new KbdHandler()); //// VerticalLayout vLay = new VerticalLayout(); //// vLay.setMargin(false); //// vLay.setSpacing(false); // tablePanel.setContent(vLay); tablePanel.setStyleName(Reindeer.PANEL_LIGHT); tablePanel.setContent((Component) tableOrTree); if (tableOrTree instanceof Table) { ((Table) tableOrTree).setHeight("100%"); } tablePanel.setHeight("100%"); //BAntoineS - Horizontal //verticalTableLayout.addComponent(tablePanel); //verticalTableLayout.setExpandRatio(tablePanel, 1); addComponent(tablePanel); setExpandRatio(tablePanel, 1); //EAntoineS - Horizontal // addComponent((Component) tableOrTree); if (tableOrTree instanceof Table) { ((Table) tableOrTree).setDropHandler(new DropHandler() { @Override public AcceptCriterion getAcceptCriterion() { return AcceptAll.get(); } @Override public void drop(DragAndDropEvent event) { try { if (event.getTransferable() instanceof DataBoundTransferable) { DataBoundTransferable t = (DataBoundTransferable) event.getTransferable(); String name = t.getItemId() + ""; FocXMLAttributes attributes = new FocXMLAttributes(); if (t.getSourceContainer() instanceof DataModelNodeTree) { DataModelNodeTree tree = (DataModelNodeTree) t.getSourceContainer(); name = tree.getItem(t.getItemId()).toString(); attributes.addAttribute("", "name", "name", "CDATA", name); attributes.addAttribute("", "caption", "caption", "CDATA", name.toLowerCase()); getTableTreeDelegate().addColumn(attributes); } } } catch (Exception e) { Globals.logException(e); } } }); } }
From source file:com.foc.vaadin.gui.RightPanel.java
License:Apache License
public void init() { tabSheet = new TabSheet(); tabSheet.setHeight("800px"); tabSheet.setWidth("100%"); addComponent(tabSheet);//from w w w. j av a2 s .c o m // tabSheet.addListener(new TabSheet.SelectedTabChangeListener() { // // @Override // public void selectedTabChange(SelectedTabChangeEvent event) { // Component tab = tabSheet.getSelectedTab(); // // if (getLayoutArray() != null) { // if (tab.equals(paletteTab)) { // for (FVLayout layout : getLayoutArray()){ // layout.setDragDrop(true); // } // } // } // } // }); firstTab = new AbsoluteLayout(); firstTab.setHeight("800px"); firstTab.setWidth("100%"); firstTab.setSizeFull(); firstTab.setCaption("Edit Panel"); paletteTab = new AbsoluteLayout(); paletteTab.setHeight("800px"); paletteTab.setWidth("100%"); paletteTab.setSizeFull(); paletteTab.setCaption("Palette"); paletteTreeContainer = new HierarchicalContainer(); paletteTreeContainer.addContainerProperty("name", String.class, null); Iterator<String> iter = FVGUIFactory.getInstance().keySet().iterator(); while (iter != null && iter.hasNext()) { String tag = iter.next(); paletteTreeContainer.addItem(tag); paletteTreeContainer.setChildrenAllowed(tag, false); } /* for (int i = 0; i < paletteLabels.length; i++) { paletteTreeContainer.addItem(paletteLabels[i]); paletteTreeContainer.setChildrenAllowed(paletteLabels[i], false); } */ paletteTree = new FVTree(); paletteTree.setContainerDataSource(paletteTreeContainer); paletteTab.addComponent(paletteTree); treeContainerPanel = new Panel(); treeContainerPanel.setStyleName(Reindeer.PANEL_LIGHT); treeContainerPanel.setHeight("400px"); save = new Button(); save.setIcon(FVIconFactory.getInstance().getFVIcon(FVIconFactory.ICON_SAVE)); save.setStyleName(BaseTheme.BUTTON_LINK); createField = new Button(); createField.setIcon(FVIconFactory.getInstance().getFVIcon(FVIconFactory.ICON_ADD)); createField.setStyleName(BaseTheme.BUTTON_LINK); // fieldTree = new FVTree(); INavigationWindow mainWindow = (INavigationWindow) FocWebApplication.getInstanceForThread() .getNavigationWindow(); DataModelNodeTree dataModelNodeTree = new DataModelNodeTree(new DataModelNodeList(getFocDesc(), 3)); XMLViewKey xmlViewKey = new XMLViewKey(AdminWebModule.RIGHT_PANEL_STORAGE, XMLViewKey.TYPE_TREE, XMLViewKey.CONTEXT_DEFAULT, XMLViewKey.VIEW_DEFAULT); setRightPanelTree((FocRightPanel_Tree) XMLViewDictionary.getInstance().newCentralPanel(mainWindow, xmlViewKey, dataModelNodeTree)); refreshTree(); tabSheet.addTab(firstTab, "Edit"); tabSheet.addTab(paletteTab, "Palette"); populate(); }