List of usage examples for com.vaadin.ui HorizontalLayout setMargin
@Override public void setMargin(boolean enabled)
From source file:nl.kpmg.lcm.ui.view.administration.AuthorizedLcmPanel.java
License:Apache License
public AuthorizedLcmPanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout menubar = initMenubar(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(menubar); rootVerticalLayout.addComponent(dataLayout); rootVerticalLayout.setHeight("100%"); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);//from ww w . ja v a2s . c om root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.administration.LcmIdPanel.java
License:Apache License
public void refreshLcmIdPanel() { VerticalLayout panelContent = new VerticalLayout(); panelContent.setMargin(true);//from www .j ava2 s . com panelContent.setSpacing(true); HorizontalLayout idLayout = new HorizontalLayout(); idLayout.setMargin(true); idLayout.setSpacing(true); idLayout.addComponent(new Label("Your LCM id: " + lcmId.getItem().getLcmId())); idLayout.addComponent(new Button("Copy", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { StringSelection stringSelection = new StringSelection(lcmId.getItem().getLcmId()); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(stringSelection, null); } })); HorizontalLayout certificateLayout = new HorizontalLayout(); certificateLayout.setMargin(true); certificateLayout.setSpacing(true); certificateLayout.addComponent(new Label("Certificate file that need to be given to the Authorized LCM. ")); FileResource certificateResource = new FileResource(new File(certificateFilepath)); FileDownloader fileDownloader = new FileDownloader(certificateResource); Button certificateDownload = new Button("Download Certificate"); fileDownloader.extend(certificateDownload); certificateLayout.addComponent(certificateDownload); panelContent.addComponent(idLayout); panelContent.addComponent(certificateLayout); panel.setContent(panelContent); }
From source file:nl.kpmg.lcm.ui.view.administration.RemoteLcmPanel.java
License:Apache License
public RemoteLcmPanel(RestClientService restClientService) { this.restClientService = restClientService; VerticalLayout rootVerticalLayout = new VerticalLayout(); HorizontalLayout menubar = initMenuBar(restClientService); rootVerticalLayout.addComponent(menubar); HorizontalLayout dataLayout = initDataLayout(); rootVerticalLayout.addComponent(dataLayout); rootVerticalLayout.setHeight("100%"); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);//w w w . j a v a2 s . co m root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.administration.StoragePanel.java
License:Apache License
public StoragePanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout menubar = initMenubar(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(menubar); rootVerticalLayout.addComponent(dataLayout); rootVerticalLayout.setHeight("100%"); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);/* w w w. j a va2s.co m*/ root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.administration.UserGroupPanel.java
License:Apache License
public UserGroupPanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout menubar = initMenubar(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(menubar); rootVerticalLayout.addComponent(dataLayout); rootVerticalLayout.setHeight("100%"); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);//from w ww . j a v a2 s.c om root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.administration.UserPanel.java
License:Apache License
public UserPanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout menubar = initMenubar(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(menubar); rootVerticalLayout.addComponent(dataLayout); rootVerticalLayout.setHeight("100%"); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);/*from w w w . ja va 2s.co m*/ root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.AdministrationViewImpl.java
License:Apache License
/** * Builds the interface.//from w ww. ja v a 2 s .c om */ @PostConstruct public final void init() { HorizontalLayout root = new HorizontalLayout(); root.setWidth("100%"); root.setMargin(true); root.setSpacing(true); storagePanel = new StoragePanel(restClientService); storagePanel.setHeight("100%"); tabsheet.addTab(storagePanel, "Storage"); tasksPanel = new TasksPanel(); tabsheet.addTab(tasksPanel, "Tasks"); usersPanel = new UserPanel(restClientService); tabsheet.addTab(usersPanel, "Users"); userGroupsPanel = new UserGroupPanel(restClientService); tabsheet.addTab(userGroupsPanel, "User groups"); remoteLcmPanel = new RemoteLcmPanel(restClientService); tabsheet.addTab(remoteLcmPanel, "Remote LCM"); authorizedLcmPanel = new AuthorizedLcmPanel(restClientService); tabsheet.addTab(authorizedLcmPanel, "Authorized LCMs"); lcmIdPanel = new LcmIdPanel(certificateFilepath); tabsheet.addTab(lcmIdPanel, "Local LCM identity"); tabsheet.setHeight("100%"); root.addComponent(tabsheet); addComponent(root); }
From source file:nl.kpmg.lcm.ui.view.transfer.MonitorPanel.java
License:Apache License
public MonitorPanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout searchlayout = initSearchLayout(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(searchlayout); rootVerticalLayout.addComponent(dataLayout); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);/*from w w w .ja va2 s. c o m*/ root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); reloadTasks("", ALL_KEY); taskStatusComboBox.select(ALL_KEY); }
From source file:nl.kpmg.lcm.ui.view.transfer.SchedulePanel.java
License:Apache License
public SchedulePanel(RestClientService restClientService) { this.restClientService = restClientService; HorizontalLayout searchlayout = initSearchLayout(restClientService); HorizontalLayout dataLayout = initDataLayout(); VerticalLayout rootVerticalLayout = new VerticalLayout(); rootVerticalLayout.addComponent(searchlayout); rootVerticalLayout.addComponent(dataLayout); HorizontalLayout root = new HorizontalLayout(); root.addComponent(rootVerticalLayout); root.setSpacing(true);// w ww . j a v a2s . c om root.setMargin(true); root.setWidth("100%"); root.setHeight("100%"); root.setExpandRatio(rootVerticalLayout, 1f); setCompositionRoot(root); }
From source file:nl.kpmg.lcm.ui.view.TransferViewImpl.java
License:Apache License
/** * Builds the interface.//www . j a v a 2 s . com */ @PostConstruct public final void init() { HorizontalLayout root = new HorizontalLayout(); root.setWidth("100%"); root.setMargin(true); root.setSpacing(true); schedulePanel = new SchedulePanel(restClientService); tabsheet.addTab(schedulePanel, "Schedule"); monitorPanel = new MonitorPanel(restClientService); tabsheet.addTab(monitorPanel, "Monitor"); tabsheet.setHeight("100%"); root.addComponent(tabsheet); addComponent(root); }