List of usage examples for com.vaadin.ui Panel Panel
public Panel()
From source file:org.escidoc.browser.ui.maincontent.ContainerView.java
License:Open Source License
private static Panel buildRightPnlProperties() { Panel pnlPropertiesRight = new Panel(); pnlPropertiesRight.setWidth("60%"); pnlPropertiesRight.setHeight("60px"); pnlPropertiesRight.setStyleName("floatright"); pnlPropertiesRight.addStyleName(Runo.PANEL_LIGHT); VerticalLayout vl = new VerticalLayout(); vl.setMargin(false);//from ww w . j ava2s .c om pnlPropertiesRight.setContent(vl); return pnlPropertiesRight; }
From source file:org.escidoc.browser.ui.maincontent.ContextRightPanel.java
License:Open Source License
public Panel asPanel() { final Panel pnlmetadataRecs = new Panel(); pnlmetadataRecs.setSizeFull();// w ww . java2s.co m VerticalLayout vl = new VerticalLayout(); vl.setImmediate(false); vl.setWidth("100.0%"); vl.setHeight("100.0%"); vl.setMargin(false); vl.addComponent(buildOrganizationUnit()); vl.addComponent(buildAdminDescription()); pnlmetadataRecs.setContent(vl); return pnlmetadataRecs; }
From source file:org.escidoc.browser.ui.maincontent.ContextRightPanel.java
License:Open Source License
@SuppressWarnings("serial") private Panel buildAdminDescription() { final Panel admDescriptors = new Panel(); admDescriptors.setWidth("100%"); admDescriptors.setHeight("100%"); VerticalLayout vl = new VerticalLayout(); vl.setSizeFull();/*from www . j av a 2s . c o m*/ final CssLayout cssLayout = new CssLayout(); buildPanelHeader(cssLayout, ViewConstants.ADMIN_DESCRIPTION); ThemeResource ICON = new ThemeResource("images/assets/plus.png"); if (contextController.canUpdateContext()) { final Button addResourceButton = new Button(); addResourceButton.setStyleName(BaseTheme.BUTTON_LINK); addResourceButton.addStyleName("floatright paddingtop3"); addResourceButton.setWidth("20px"); addResourceButton.setIcon(ICON); addResourceButton.addListener(new ClickListener() { @Override public void buttonClick(@SuppressWarnings("unused") ClickEvent event) { new OnContextAdminDescriptor(router, contextController).adminDescriptorForm(); } }); cssLayout.addComponent(addResourceButton); } vl.addComponent(cssLayout); VerticalLayout vl2 = new VerticalLayout(); final AdminDescriptors admDesc = resourceProxy.getAdminDescription(); final AdminDescriptorsTable adminDescriptorTable = new AdminDescriptorsTable(contextController, admDesc, router); adminDescriptorTable.buildTable(); vl2.addComponent(adminDescriptorTable); vl.addComponent(vl2); vl.setExpandRatio(vl2, 9); admDescriptors.setContent(vl); return admDescriptors; }
From source file:org.escidoc.browser.ui.maincontent.ContextRightPanel.java
License:Open Source License
@SuppressWarnings("serial") private Panel buildOrganizationUnit() { final Panel pnlOrgUnit = new Panel(); pnlOrgUnit.setSizeFull();//from ww w . jav a2s . c om VerticalLayout vl = new VerticalLayout(); vl.setSizeFull(); final CssLayout cssLayout = new CssLayout(); buildPanelHeader(cssLayout, ViewConstants.ORGANIZATIONAL_UNIT); ThemeResource ICON = new ThemeResource("images/assets/plus.png"); if (contextController.canAddOUs()) { final Button addResourceButton = new Button(); addResourceButton.setStyleName(BaseTheme.BUTTON_LINK); addResourceButton.addStyleName("floatright paddingtop3"); addResourceButton.setWidth("20px"); addResourceButton.setIcon(ICON); addResourceButton.addListener(new ClickListener() { @Override public void buttonClick(@SuppressWarnings("unused") final ClickEvent event) { final Window subwindow = new Window("A modal subwindow"); subwindow.setModal(true); subwindow.setWidth("650px"); VerticalLayout layout = (VerticalLayout) subwindow.getContent(); layout.setMargin(true); layout.setSpacing(true); try { subwindow.addComponent(new AddOrgUnitstoContext(router, resourceProxy, contextController, resourceProxy.getOrganizationalUnit())); } catch (EscidocClientException e) { contextController.showError(e); } Button close = new Button(ViewConstants.CLOSE, new Button.ClickListener() { @Override public void buttonClick(@SuppressWarnings("unused") ClickEvent event) { subwindow.getParent().removeWindow(subwindow); } }); layout.addComponent(close); layout.setComponentAlignment(close, Alignment.TOP_RIGHT); router.getMainWindow().addWindow(subwindow); } }); cssLayout.addComponent(addResourceButton); } vl.addComponent(cssLayout); OrganizationalUnitsTableVH orgUnitTable = new OrganizationalUnitsTableVH(contextController, resourceProxy.getOrganizationalUnit(), router, resourceProxy); orgUnitTable.buildTable(); vl.addComponent(orgUnitTable); vl.setComponentAlignment(orgUnitTable, Alignment.TOP_LEFT); vl.setExpandRatio(orgUnitTable, 9f); pnlOrgUnit.setContent(vl); return pnlOrgUnit; }
From source file:org.escidoc.browser.ui.maincontent.ContextView.java
License:Open Source License
private Panel buildDirectMembersPanel() { // common part: create layout Panel directMembersPanel = new Panel(); directMembersPanel.setImmediate(false); directMembersPanel.setWidth("100.0%"); directMembersPanel.setHeight("100.0%"); directMembersPanel.setStyleName(Runo.PANEL_LIGHT); // vlDirectMember VerticalLayout vlDirectMember = new VerticalLayout(); vlDirectMember.setImmediate(false);// ww w . j ava 2 s . co m vlDirectMember.setWidth("100.0%"); vlDirectMember.setHeight("100.0%"); vlDirectMember.setMargin(false); directMembersPanel.setContent(vlDirectMember); try { new DirectMember(serviceLocation, router, resourceProxy.getId(), mainWindow, repositories, directMembersPanel, ResourceType.CONTEXT.toString()).contextAsTree(); } catch (EscidocClientException e) { router.getMainWindow().showNotification(ViewConstants.ERROR_DIRECTMEMBERS + e.getLocalizedMessage(), Notification.TYPE_ERROR_MESSAGE); } return directMembersPanel; }
From source file:org.escidoc.browser.ui.maincontent.ContextView.java
License:Open Source License
private Panel buildResourcePropertiesPanel() { // common part: create layout Panel resourcePropertiesPanel = new Panel(); resourcePropertiesPanel.setImmediate(false); resourcePropertiesPanel.setWidth("100.0%"); resourcePropertiesPanel.setHeight("100%"); resourcePropertiesPanel.setStyleName(Runo.PANEL_LIGHT); // vlResourceProperties vlResourceProperties = buildVlResourceProperties(); resourcePropertiesPanel.setContent(vlResourceProperties); return resourcePropertiesPanel; }