List of usage examples for com.vaadin.server ThemeResource ThemeResource
public ThemeResource(String resourceId)
From source file:org.vaadin.tori.component.PanicComponent.java
License:Apache License
public PanicComponent() { setCompositionRoot(layout);//from w w w . j a v a 2 s .com setSizeFull(); layout.setSizeFull(); final Image panicImage = new Image(null, new ThemeResource("images/panic.png")); layout.addComponent(panicImage); layout.setComponentAlignment(panicImage, Alignment.MIDDLE_CENTER); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.ComparisonsSelectionOverviewBubbleChart.java
public ComparisonsSelectionOverviewBubbleChart(final QuantCentralManager Quant_Central_Manager, final CSFPRHandler CSFPR_Handler, int chartWidth, int chartHeight, Set<QuantDiseaseGroupsComparison> selectedComparisonList, List<QuantProtein> searchQuantificationProtList) { userDataCounter = 0;/* w w w . j av a 2 s . c o m*/ this.searchQuantificationProtList = searchQuantificationProtList; Map<String, String> diseaseHashedColorMap = Quant_Central_Manager.getDiseaseHashedColorMap(); for (String str : diseaseHashedColorMap.keySet()) { diseaseColorMap.put(str, Color.decode(diseaseHashedColorMap.get(str))); } this.width = chartWidth; this.height = 600; this.CSFPR_Handler = CSFPR_Handler; this.setWidth(width + "px"); this.setHeightUndefined(); this.Quant_Central_Manager = Quant_Central_Manager; this.Quant_Central_Manager.registerStudySelectionListener(ComparisonsSelectionOverviewBubbleChart.this); this.setSpacing(true); //init toplayout topLayout.setHeight(30 + "px"); topLayout.setSpacing(true); topLayout.setMargin(new MarginInfo(false, false, true, false)); this.addComponent(topLayout); Label overviewLabel = new Label("<font style='margin-left :50px;'>Overview</font> "); overviewLabel.setContentMode(ContentMode.HTML); topLayout.addComponent(overviewLabel); overviewLabel.setStyleName("subtitle"); overviewLabel.setWidth("120px"); InfoPopupBtn info = new InfoPopupBtn( "The bubble chart give an overview for the proteins existed in the selected comparisons.<br/>The diameter of the bubble represents the number of the proteins in the selected comparison and the color represents the trend<br/>"); info.setWidth("16px"); info.setHeight("16px"); topLayout.addComponent(info); this.topLayout.setVisible(false); //end of toplayout //init chartlayout this.chartLayoutContainer.setVisible(false); this.addComponent(chartLayoutContainer); chartLayoutContainer.setWidth(width + "px"); chartLayoutContainer.setHeight(height + "px"); chartLayoutContainer.addComponent(chartImage, "left: " + 0 + "px; top: " + 0 + "px;"); chartLayoutContainer.addComponent(chartLayout, "left: " + 0 + "px; top: " + 0 + "px;"); chartLayout.setWidth(width + "px"); chartLayout.setHeight(height + "px"); chartLayout.addLayoutClickListener(ComparisonsSelectionOverviewBubbleChart.this); //end of chartlayout //init bottomlayout bottomLayout.setWidth("100%"); this.addComponent(bottomLayout); this.setComponentAlignment(bottomLayout, Alignment.BOTTOM_RIGHT); bottomLayout.setVisible(false); HorizontalLayout btnContainerLayout = new HorizontalLayout(); btnContainerLayout.setSpacing(true); // btnContainerLayout.setMargin(new MarginInfo(false, false, false, false)); btnContainerLayout.setWidthUndefined(); btnContainerLayout.setHeightUndefined(); // btnContainerLayout.addStyleName("leftspacer"); bottomLayout.addComponent(btnContainerLayout); bottomLayout.setComponentAlignment(btnContainerLayout, Alignment.TOP_RIGHT); TrendLegend legendLayout = new TrendLegend("bubblechart"); legendLayout.setWidthUndefined(); legendLayout.setHeight("24px"); btnContainerLayout.addComponent(legendLayout); btnContainerLayout.setComponentAlignment(legendLayout, Alignment.TOP_RIGHT); // btnContainerLayout.setExpandRatio(legendLayout, 600); // btnContainerLayout.setExpandRatio(btnContainerLayout, 210); // VerticalLayout stableBtnWrapper = new VerticalLayout(); //// stableBtnWrapper.setWidth("64px"); // HorizontalLayout stableBtn = new HorizontalLayout(); // stableBtnWrapper.addComponent(stableBtn); // stableBtnWrapper.setComponentAlignment(stableBtn, Alignment.TOP_LEFT); // btnContainerLayout.addComponent(stableBtnWrapper); groupSwichBtn = new GroupSwichBtn(Quant_Central_Manager, searchQuantificationProtList); btnContainerLayout.addComponent(groupSwichBtn); final VerticalLayout appliedIcon = new VerticalLayout(); appliedIcon.setStyleName("appliedicon"); appliedIcon.setWidth("24px"); appliedIcon.setHeight("24px"); appliedIcon.setDescription("Hide stable proteins"); btnContainerLayout.addComponent(appliedIcon); // stableBtn.setStyleName("stablebtn"); // stableBtn.setHeight("24px"); // Label stableLabel = new Label("Equal"); // stableLabel.setWidth("44px"); // stableBtn.addComponent(stableLabel); appliedIcon.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (appliedIcon.getStyleName().equalsIgnoreCase("appliedicon")) { appliedIcon.setStyleName("unappliedicon"); Quant_Central_Manager.updateSignificantOnlySelection(true); appliedIcon.setDescription("Show stable proteins"); } else { appliedIcon.setStyleName("appliedicon"); Quant_Central_Manager.updateSignificantOnlySelection(false); appliedIcon.setDescription("Hide stable proteins"); } } }); exportPdfBtn = new Button(""); exportPdfBtn.setWidth("24px"); exportPdfBtn.setHeight("24px"); exportPdfBtn.setPrimaryStyleName("exportpdfbtn"); exportPdfBtn.setDescription("Export chart image"); StreamResource myResource = createResource(); FileDownloader fileDownloader = new FileDownloader(myResource); fileDownloader.extend(exportPdfBtn); btnContainerLayout.addComponent(exportPdfBtn); VerticalLayout unselectAllBtn = new VerticalLayout(); unselectAllBtn.setStyleName("unselectallbtn"); btnContainerLayout.addComponent(unselectAllBtn); btnContainerLayout.setComponentAlignment(unselectAllBtn, Alignment.TOP_LEFT); unselectAllBtn.setDescription("Clear selection"); unselectAllBtn.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { Quant_Central_Manager.setBubbleChartQuantProteinsSelection(new HashSet<String>(), ""); resetChart(); } }); final VerticalLayout selectMultiBtn = new VerticalLayout(); selectMultiBtn.setStyleName("selectmultiselectedbtn"); btnContainerLayout.addComponent(selectMultiBtn); btnContainerLayout.setComponentAlignment(selectMultiBtn, Alignment.TOP_LEFT); selectMultiBtn.setDescription("Multiple selection"); activeMultiSelect = true; selectMultiBtn.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (selectMultiBtn.getStyleName().equalsIgnoreCase("selectmultiselectedbtn")) { selectMultiBtn.setStyleName("selectmultibtn"); activeMultiSelect = false; } else { selectMultiBtn.setStyleName("selectmultiselectedbtn"); activeMultiSelect = true; } } }); //end of btns layout //init empty layout emptySelectionLayout = new VerticalLayout(); this.addComponent(emptySelectionLayout); emptySelectionLayout.setWidth(100 + "%"); emptySelectionLayout.setHeightUndefined(); VerticalLayout spacer = new VerticalLayout(); spacer.setHeight("100px"); spacer.setWidth("10px"); spacer.setStyleName(Reindeer.LAYOUT_WHITE); emptySelectionLayout.addComponent(spacer); emptySelectionLayout.setComponentAlignment(spacer, Alignment.BOTTOM_RIGHT); Label startLabel = new Label( "<center><h2 style='color:gray;'><b>Select comparison from the table</b></h2></center>"); startLabel.setContentMode(ContentMode.HTML); emptySelectionLayout.addComponent(startLabel); emptySelectionLayout.setComponentAlignment(startLabel, Alignment.MIDDLE_CENTER); Image handleft = new Image(); handleft.setSource(new ThemeResource("img/handleft.png")); emptySelectionLayout.addComponent(handleft); emptySelectionLayout.setComponentAlignment(handleft, Alignment.MIDDLE_CENTER); //init bubble chart }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.ComparisonsSelectionOverviewBubbleChart.java
public ComparisonsSelectionOverviewBubbleChart(final QuantCentralManager Quant_Central_Manager, final CSFPRHandler CSFPR_Handler, int chartWidth, int chartHeight, Set<QuantDiseaseGroupsComparison> selectedComparisonList, List<QuantProtein> searchQuantificationProtList, QuantDiseaseGroupsComparison userCustomizedComparison) { this.userCustomizedComparison = userCustomizedComparison; userDataCounter = 1;//www. j a v a 2s.c o m this.searchQuantificationProtList = searchQuantificationProtList; Map<String, String> diseaseHashedColorMap = Quant_Central_Manager.getDiseaseHashedColorMap(); for (String str : diseaseHashedColorMap.keySet()) { diseaseColorMap.put(str, Color.decode(diseaseHashedColorMap.get(str))); } this.width = chartWidth; this.height = 600; this.CSFPR_Handler = CSFPR_Handler; this.setWidth(width + "px"); this.setHeightUndefined(); this.Quant_Central_Manager = Quant_Central_Manager; this.Quant_Central_Manager.registerStudySelectionListener(ComparisonsSelectionOverviewBubbleChart.this); this.setSpacing(true); //init toplayout topLayout.setHeight(30 + "px"); topLayout.setSpacing(true); topLayout.setMargin(new MarginInfo(false, false, true, false)); this.addComponent(topLayout); Label overviewLabel = new Label("<font style='margin-left :50px;'>Overview</font> "); overviewLabel.setContentMode(ContentMode.HTML); topLayout.addComponent(overviewLabel); overviewLabel.setStyleName("subtitle"); overviewLabel.setWidth("120px"); InfoPopupBtn info = new InfoPopupBtn( "The bubble chart give an overview for the proteins existed in the selected comparisons.<br/>The diameter of the bubble represents the number of the proteins in the selected comparison and the color represents the trend<br/>"); info.setWidth("16px"); info.setHeight("16px"); topLayout.addComponent(info); //end of toplayout //init chartlayout this.chartLayoutContainer.setVisible(false); this.addComponent(chartLayoutContainer); this.addComponent(chartLayoutContainer); chartLayoutContainer.setWidth(width + "px"); chartLayoutContainer.setHeight(height + "px"); chartLayoutContainer.addComponent(chartImage, "left: " + 0 + "px; top: " + 0 + "px;"); chartLayoutContainer.addComponent(chartLayout, "left: " + 0 + "px; top: " + 0 + "px;"); chartLayout.setWidth(width + "px"); chartLayout.setHeight(height + "px"); chartLayout.addLayoutClickListener(ComparisonsSelectionOverviewBubbleChart.this); //end of chartlayout //init bottomlayout bottomLayout.setWidth("100%"); this.addComponent(bottomLayout); this.setComponentAlignment(bottomLayout, Alignment.BOTTOM_RIGHT); bottomLayout.setVisible(false); HorizontalLayout btnContainerLayout = new HorizontalLayout(); btnContainerLayout.setSpacing(true); // btnContainerLayout.setMargin(new MarginInfo(false, false, false, false)); btnContainerLayout.setWidthUndefined(); btnContainerLayout.setHeightUndefined(); // btnContainerLayout.addStyleName("leftspacer"); bottomLayout.addComponent(btnContainerLayout); bottomLayout.setComponentAlignment(btnContainerLayout, Alignment.TOP_RIGHT); TrendLegend legendLayout = new TrendLegend("bubblechart"); legendLayout.setWidthUndefined(); legendLayout.setHeight("24px"); btnContainerLayout.addComponent(legendLayout); btnContainerLayout.setComponentAlignment(legendLayout, Alignment.TOP_RIGHT); Quant_Central_Manager.insertNoftfication("Quantitative Datasets", "Remeber you can flip the disease group comparisons using (Swich disease groups button)<img src='VAADIN/themes/dario-theme/img/flip-v-updated.png' height='25px' width='25' alt='Reorder and select' Align='center'/> ", width, width, "flipnotification"); // btnContainerLayout.setExpandRatio(legendLayout, 600); // btnContainerLayout.setExpandRatio(btnContainerLayout, 210); // VerticalLayout stableBtnWrapper = new VerticalLayout(); //// stableBtnWrapper.setWidth("64px"); // HorizontalLayout stableBtn = new HorizontalLayout(); // stableBtnWrapper.addComponent(stableBtn); // stableBtnWrapper.setComponentAlignment(stableBtn, Alignment.TOP_LEFT); // btnContainerLayout.addComponent(stableBtnWrapper); groupSwichBtn = new GroupSwichBtn(Quant_Central_Manager, searchQuantificationProtList); btnContainerLayout.addComponent(groupSwichBtn); final VerticalLayout appliedIcon = new VerticalLayout(); appliedIcon.setStyleName("appliedicon"); appliedIcon.setWidth("24px"); appliedIcon.setHeight("24px"); appliedIcon.setDescription("Hide stable proteins"); btnContainerLayout.addComponent(appliedIcon); // stableBtn.setStyleName("stablebtn"); // stableBtn.setHeight("24px"); // Label stableLabel = new Label("Equal"); // stableLabel.setWidth("44px"); // stableBtn.addComponent(stableLabel); appliedIcon.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (appliedIcon.getStyleName().equalsIgnoreCase("appliedicon")) { appliedIcon.setStyleName("unappliedicon"); Quant_Central_Manager.updateSignificantOnlySelection(true); appliedIcon.setDescription("Show stable proteins"); } else { appliedIcon.setStyleName("appliedicon"); Quant_Central_Manager.updateSignificantOnlySelection(false); appliedIcon.setDescription("Hide stable proteins"); } } }); exportPdfBtn = new Button(""); exportPdfBtn.setWidth("24px"); exportPdfBtn.setHeight("24px"); exportPdfBtn.setPrimaryStyleName("exportpdfbtn"); exportPdfBtn.setDescription("Export chart image"); StreamResource myResource = createResource(); FileDownloader fileDownloader = new FileDownloader(myResource); fileDownloader.extend(exportPdfBtn); btnContainerLayout.addComponent(exportPdfBtn); VerticalLayout unselectAllBtn = new VerticalLayout(); unselectAllBtn.setStyleName("unselectallbtn"); btnContainerLayout.addComponent(unselectAllBtn); btnContainerLayout.setComponentAlignment(unselectAllBtn, Alignment.TOP_LEFT); unselectAllBtn.setDescription("Clear selection"); unselectAllBtn.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { Quant_Central_Manager.setBubbleChartQuantProteinsSelection(new HashSet<String>(), ""); resetChart(); } }); final VerticalLayout selectMultiBtn = new VerticalLayout(); selectMultiBtn.setStyleName("selectmultiselectedbtn"); btnContainerLayout.addComponent(selectMultiBtn); btnContainerLayout.setComponentAlignment(selectMultiBtn, Alignment.TOP_LEFT); selectMultiBtn.setDescription("Multiple selection"); activeMultiSelect = true; selectMultiBtn.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (selectMultiBtn.getStyleName().equalsIgnoreCase("selectmultiselectedbtn")) { selectMultiBtn.setStyleName("selectmultibtn"); activeMultiSelect = false; } else { selectMultiBtn.setStyleName("selectmultiselectedbtn"); activeMultiSelect = true; } } }); //end of btns layout //init empty layout emptySelectionLayout = new VerticalLayout(); this.addComponent(emptySelectionLayout); emptySelectionLayout.setWidth(width + "px"); emptySelectionLayout.setHeightUndefined(); VerticalLayout spacer = new VerticalLayout(); spacer.setHeight("100px"); spacer.setWidth("10px"); spacer.setStyleName(Reindeer.LAYOUT_WHITE); emptySelectionLayout.addComponent(spacer); emptySelectionLayout.setComponentAlignment(spacer, Alignment.BOTTOM_RIGHT); Label startLabel = new Label( "<center><h2 style='color:gray;'><b>Select comparison from the table</b></h2></center>"); startLabel.setContentMode(ContentMode.HTML); emptySelectionLayout.addComponent(startLabel); emptySelectionLayout.setComponentAlignment(startLabel, Alignment.MIDDLE_CENTER); Image handleft = new Image(); handleft.setSource(new ThemeResource("img/handleft.png")); emptySelectionLayout.addComponent(handleft); emptySelectionLayout.setComponentAlignment(handleft, Alignment.MIDDLE_CENTER); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.heatmap.HeatMapComponent.java
/** * @param heatmapCellWidth//from w w w . j a v a 2 s .c o m * @param heatmapHeaderCellWidth * @param diseaseStyleMap */ public HeatMapComponent(int heatmapCellWidth, int heatmapHeaderCellWidth, Map<String, String> diseaseStyleMap) { this.diseaseStyleMap = diseaseStyleMap; this.setMargin(false); this.setSpacing(true); this.setWidth("100%"); this.heatmapCellWidth = heatmapCellWidth; this.heatmapHeaderCellWidth = heatmapHeaderCellWidth; columnContainer = new VerticalLayout(); columnContainer.setWidth("100%"); columnContainer.setSpacing(true); diseaseGroupsColumnsLabels = new HorizontalLayout(); diseaseGroupsColumnsLabels.setWidth("10px"); diseaseGroupsColumnsLabels.setHeight("20px"); diseaseGroupsColumnsLabels.setStyleName(Reindeer.LAYOUT_BLUE); columnContainer.addComponent(diseaseGroupsColumnsLabels); this.columnHeader = new GridLayout(); columnContainer.addComponent(columnHeader); columnContainer.setComponentAlignment(columnHeader, Alignment.TOP_LEFT); this.rowHeader = new GridLayout(); this.heatmapBody = new GridLayout(); heatmapBody.setStyleName("hmbackground"); topLayout = new HorizontalLayout(); topLayout.setHeight((heatmapHeaderCellWidth + 24) + "px"); topLayout.setSpacing(false); spacer = new VerticalLayout(); spacer.setWidth((heatmapHeaderCellWidth + 25) + "px"); spacer.setHeight((heatmapHeaderCellWidth + 24) + "px"); spacer.setStyleName(Reindeer.LAYOUT_WHITE); hideCompBtn = new VerticalLayout(); hideCompBtn.setSpacing(true); hideCompBtn.setWidth((heatmapHeaderCellWidth + 25) + "px"); // hideCompBtn.setHeight((heatmapHeaderCellWidth) + "px"); hideCompBtn.setStyleName("matrixbtn"); icon = new Image(); defaultResource = new ThemeResource("img/logo.png"); icon.setSource(defaultResource); hideCompBtn.setDescription("Expand chart and hide comparisons table"); hideCompBtn.addComponent(icon); hideCompBtn.setComponentAlignment(icon, Alignment.MIDDLE_CENTER); icon.setHeight((heatmapHeaderCellWidth - 20 + 10) + "px"); hideShowBtnLabel = new Label("Expand Chart"); hideShowBtnLabel.setHeight((20) + "px"); hideCompBtn.addComponent(hideShowBtnLabel); hideCompBtn.setComponentAlignment(hideShowBtnLabel, Alignment.BOTTOM_CENTER); spacer.addComponent(hideCompBtn); spacer.setComponentAlignment(hideCompBtn, Alignment.MIDDLE_CENTER); hideCompBtn.setEnabled(false); topLayout.addComponent(spacer); topLayout.setComponentAlignment(spacer, Alignment.BOTTOM_LEFT); topLayout.setSpacing(true); topLayout.addComponent(columnContainer); topLayout.setComponentAlignment(columnContainer, Alignment.TOP_LEFT); this.addComponent(topLayout); bottomLayout = new HorizontalLayout(); diseaseGroupsRowsLabels = new VerticalLayout(); diseaseGroupsRowsLabels.setHeight("10px"); diseaseGroupsRowsLabels.setWidth("20px"); diseaseGroupsRowsLabels.setStyleName(Reindeer.LAYOUT_BLUE); bottomLayout.addComponent(diseaseGroupsRowsLabels); rowHeader.setWidth(heatmapHeaderCellWidth + "px"); rowHeader.setHeight("100%"); bottomLayout.addComponent(rowHeader); bottomLayout.addComponent(heatmapBody); bottomLayout.setSpacing(true); bottomLayout.setComponentAlignment(heatmapBody, Alignment.MIDDLE_LEFT); this.addComponent(bottomLayout); }
From source file:probe.com.view.core.FilterConfirmLabel.java
/** * *//*from ww w. j ava 2 s . c o m*/ public FilterConfirmLabel() { this.setIcon(new ThemeResource("img/true_s.jpg")); this.setStyleName("custLabel"); this.setContentMode(ContentMode.HTML); this.setVisible(false); this.setDescription("Filter Applied"); this.setHeight("20px"); }
From source file:probe.com.view.core.ShowMiniLabel.java
/** * * @param show/*from ww w .jav a 2 s. com*/ */ public final void updateIcon(boolean show) { if (show) { show = false; setIcon(new ThemeResource("img/down-mini.jpg"));//setIcon(new ExternalResource("https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-prn2/1185892_173022819547985_676735970_n.jpg")); } else { show = true; setIcon(new ThemeResource("img/right-mini.jpg"));//new ExternalResource("https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-prn2/1175716_173022812881319_804705945_n.jpg")); } }
From source file:songstock.web.extensions.browsing.AlbumDetailsView.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from ww w. j a v a 2 s.co m mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // labelAlbumName labelAlbumName = new Label(); labelAlbumName.setImmediate(false); labelAlbumName.setWidth("-1px"); labelAlbumName.setHeight("-1px"); labelAlbumName.setValue("<b>Album Name</b>"); labelAlbumName.setContentMode(com.vaadin.shared.ui.label.ContentMode.HTML); mainLayout.addComponent(labelAlbumName, "top:20.0px;left:20.0px;"); // labelAlbumArtist labelAlbumArtist = new Label(); labelAlbumArtist.setImmediate(false); labelAlbumArtist.setWidth("-1px"); labelAlbumArtist.setHeight("-1px"); labelAlbumArtist.setValue("Album Artist"); mainLayout.addComponent(labelAlbumArtist, "top:40.0px;left:20.0px;"); // labelAlbumReleaseYear labelAlbumReleaseYear = new Label(); labelAlbumReleaseYear.setImmediate(false); labelAlbumReleaseYear.setWidth("-1px"); labelAlbumReleaseYear.setHeight("-1px"); labelAlbumReleaseYear.setValue("<i>Album Release Year</i>"); labelAlbumReleaseYear.setContentMode(com.vaadin.shared.ui.label.ContentMode.HTML); mainLayout.addComponent(labelAlbumReleaseYear, "top:60.0px;left:20.0px;"); // embeddedAlbumArtwork embeddedAlbumArtwork = new Embedded(); embeddedAlbumArtwork.setImmediate(false); embeddedAlbumArtwork.setWidth("90px"); embeddedAlbumArtwork.setHeight("-1px"); embeddedAlbumArtwork.setSource(new ThemeResource("img/component/embedded_icon.png")); embeddedAlbumArtwork.setType(1); embeddedAlbumArtwork.setMimeType("image/png"); mainLayout.addComponent(embeddedAlbumArtwork, "top:20.0px;right:20.0px;"); // tableAlbumSongs tableAlbumSongs = new Table(); tableAlbumSongs.setImmediate(false); tableAlbumSongs.setWidth("100.0%"); tableAlbumSongs.setHeight("100.0%"); mainLayout.addComponent(tableAlbumSongs, "top:100.0px;right:20.0px;bottom:20.0px;left:20.0px;"); return mainLayout; }
From source file:sph.vaadin.ui.ComponentFactory.java
License:Apache License
/** * Creates a new image push Button an optional icon image. * /* w w w . j a v a 2 s . co m*/ * @.post <em>RESULT.getStyleNames().equals(com.vaadin.ui.themes.BaseTheme.BUTTON_LINK)</em> * @param description the description text of the image button. * @param pathToIcon the path to the icon image of the button. * @param enabled a boolean value specifying if the component should be enabled or not. * @return the created component. */ public static Button createImageButton(String description, String pathToIcon, boolean enabled) { Button btn = new Button(); btn.setDescription(description); btn.setIcon(new ThemeResource(pathToIcon)); btn.setStyleName(BaseTheme.BUTTON_LINK); btn.setEnabled(enabled); return btn; }
From source file:sph.vaadin.ui.ComponentFactory.java
License:Apache License
/** * Creates a new image push Button an optional icon image. * /* ww w .j a v a 2s. c o m*/ * @.post <em>RESULT.getStyleNames().equals(com.vaadin.ui.themes.BaseTheme.BUTTON_LINK)</em> * @param caption button's caption String. Caption is the visible name of the button. * @param description the description text of the image button. * @param pathToIcon the path to the icon image of the button. * @param enabled a boolean value specifying if the component should be enabled or not. * @return the created component. */ public static Button createImageButtonWithCaption(String caption, String description, String pathToIcon, boolean enabled) { Button btn = new Button(caption); btn.setDescription(description); btn.setIcon(new ThemeResource(pathToIcon)); btn.setStyleName(BaseTheme.BUTTON_LINK); btn.setEnabled(enabled); return btn; }
From source file:sph.vaadin.ui.ComponentFactory.java
License:Apache License
/** * Creates a new blue push Button with an optional icon image. * //from www . j a v a2 s. c om * @.post <em>RESULT.getStyleNames().equals({@link SPH_Theme#BLUE_BUTTON})</em> * @param caption button's caption String. Caption is the visible name of the button. * @param enabled a boolean value specifying if the component should be enabled or not. * @param pathToIcon the path to the icon image of the button or null. * @return the created component. */ public static Button createBlueButton(String caption, boolean enabled, String pathToIcon) { Button btn = new Button(caption); btn.setStyleName(SPH_Theme.BLUE_BUTTON); btn.setEnabled(enabled); if (pathToIcon != null) { btn.setIcon(new ThemeResource(pathToIcon)); } return btn; }