@Override public void attach() { super.attach(); rootPanel = new Panel("Connect to..."); rootPanel.addStyleName(ValoTheme.PANEL_WELL); rootPanel.setWidth("500px"); rootPanel.setHeight("300px"); recreateRootLayout(); setSizeFull(); addComponent(rootPanel); setComponentAlignment(rootPanel, Alignment.MIDDLE_CENTER); }
@Override public void display( Panel mainContainer, Panel facetContent, Panel headerPanel, Panel logoutPanel, Panel notificationPanel) { mainContainer.clear(); facetContent.clear(); bind(); mainContainer.addStyleName("Border"); mainContainer.add(this.display.getPublishContainer()); }
public SelectWindow( float width, int units, Collection<T> items, T selectedItem, Resource icon, String caption, String message, String okButtonText, String cancelButtonText) { super(); if (caption != null) { setCaption(caption); } if (icon != null) { setIcon(icon); } setWidth(width, units); setModal(true); setClosable(false); setResizable(false); setDraggable(false); VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); verticalLayout.setSpacing(true); setContent(verticalLayout); Label label = new Label(message); addComponent(label); mySelect = new Select(null, items); mySelect.setNullSelectionAllowed(false); mySelect.setValue(selectedItem != null ? selectedItem : items.iterator().next()); mySelect.setWidth(100, Sizeable.UNITS_PERCENTAGE); addComponent(mySelect); Panel panel = new Panel(); addComponent(panel); verticalLayout.setComponentAlignment(panel, Alignment.MIDDLE_RIGHT); panel.addStyleName("light"); HorizontalLayout horizontalLayout = new HorizontalLayout(); panel.setContent(horizontalLayout); horizontalLayout.setSpacing(true); verticalLayout.setComponentAlignment(panel, Alignment.MIDDLE_RIGHT); myCancelButton = new Button(cancelButtonText, this); panel.addComponent(myCancelButton); myOkButton = new Button(okButtonText, this); panel.addComponent(myOkButton); }
@Override public void attach() { super.attach(); init( getBundleString("streamingConfigPanel.caption"), getComponentFactory().createGridLayout(1, 5, true, true)); myVlcEnabled = getComponentFactory().createCheckBox("streamingConfigPanel.vlcEnabled"); myVlcBinary = getComponentFactory() .createTextField( "streamingConfigPanel.vlcBinary", new VlcExecutableFileValidator( getBundleString("streamingConfigPanel.vlcBinary.invalidBinary"))); myVlcBinary.setImmediate(false); myVlcBinarySelect = getComponentFactory().createButton("streamingConfigPanel.vlcBinary.select", this); myVlcHomepageButton = getComponentFactory().createButton("streamingConfigPanel.vlcHomepage", this); myVlcForm = getComponentFactory().createForm(null, true); myVlcForm.addField(myVlcEnabled, myVlcEnabled); myVlcForm.addField(myVlcBinary, myVlcBinary); myVlcForm.addField(myVlcBinarySelect, myVlcBinarySelect); myVlcForm.addField(myVlcHomepageButton, myVlcHomepageButton); Panel vlcPanel = getComponentFactory() .surroundWithPanel( myVlcForm, FORM_PANEL_MARGIN_INFO, getBundleString("streamingConfigPanel.caption.vlc")); addComponent(vlcPanel); Panel transcoderPanel = new Panel(getBundleString("streamingConfigPanel.caption.transcoder")); transcoderPanel.setContent(getComponentFactory().createVerticalLayout(true, true)); Panel addTranscoderButtons = new Panel(); addTranscoderButtons.addStyleName("light"); addTranscoderButtons.setContent( getApplication().getComponentFactory().createHorizontalLayout(false, true)); myAddTranscoder = getComponentFactory().createButton("streamingConfigPanel.transcoder.add", this); addTranscoderButtons.addComponent(myAddTranscoder); myTranscoderTable = new Table(); myTranscoderTable.setCacheRate(50); myTranscoderTable.addContainerProperty( "name", String.class, null, getBundleString("streamingConfigPanel.transcoder.name"), null, null); myTranscoderTable.addContainerProperty("edit", Button.class, null, "", null, null); myTranscoderTable.addContainerProperty("delete", Button.class, null, "", null, null); myTranscoderTable.setSortContainerPropertyId("name"); transcoderPanel.addComponent(myTranscoderTable); transcoderPanel.addComponent(addTranscoderButtons); addComponent(transcoderPanel); myCacheForm = getComponentFactory().createForm(null, true); myTranscodingCacheMaxGiB = getComponentFactory() .createTextField( "streamingConfigPanel.cache.transcodingCacheMaxGiB", getApplication().getValidatorFactory().createMinMaxValidator(1, 1024)); myCacheForm.addField("limitTranscoding", myTranscodingCacheMaxGiB); myHttpLiveStreamCacheMaxGiB = getComponentFactory() .createTextField( "streamingConfigPanel.cache.httpLiveStreamCacheMaxGiB", getApplication().getValidatorFactory().createMinMaxValidator(1, 1024)); myCacheForm.addField("limitHttpLiveStream", myHttpLiveStreamCacheMaxGiB); myClearAllCachesButton = getComponentFactory().createButton("streamingConfigPanel.clearAllCaches", this); myCacheForm.addField(myClearAllCachesButton, myClearAllCachesButton); addComponent( getComponentFactory() .surroundWithPanel( myCacheForm, FORM_PANEL_MARGIN_INFO, getBundleString("streamingConfigPanel.caption.cache"))); addDefaultComponents(0, 4, 0, 4, false); initFromConfig(); }