Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package web.diva.client.unused; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.VerticalPanel; import com.smartgwt.client.widgets.layout.VLayout; import web.diva.client.DivaServiceAsync; import web.diva.client.selectionmanager.SelectionManager; import web.diva.client.somclust.view.SplitHeatmapImg; import web.diva.client.somclust.view.TopTreeImg; import web.diva.client.somclust.view.UpdatedSomClustPanel; import web.diva.shared.beans.SomClusteringResult; /** * * @author y-mok_000 */ public class ClusteringLayoutComponent { @Override public String toString() { return "SomClustView"; //To change body of generated methods, choose Tools | Templates. } private SelectionManager selectionManager; private String defaultSideTreeImgURL; private String defaultTopTreeImgURL; private boolean update = true; private boolean clustColumn = true; private final DivaServiceAsync DivaClientService; private TopTreeImg sideTreeImg; private TopTreeImg upperTreeImg; private SplitHeatmapImg heatMapImg; private Image interactiveColImage; private final Image scaleImg; private final VerticalPanel clusterLayout = new VerticalPanel(); private final HorizontalPanel topClusterLayout = new HorizontalPanel(); private final ScrollPanel mainClusterPanelLayout = new ScrollPanel(); private final HorizontalPanel middleClusterLayout = new HorizontalPanel(); private final HorizontalPanel bottomClusterLayout = new HorizontalPanel(); private final HorizontalPanel tooltipPanel = new HorizontalPanel(); private final VLayout mainThumbClusteringLayout; private final HTML tooltip = new HTML(); private final Image spacer = new Image("images/w.png"), spacer2 = new Image("images/w.png"), maxSpacer = new Image("images/w.png");//,maxSpacer2 = new Image("images/w.png"); private final Label clustInfoLabel = new Label(), maxClustInfoLabel = new Label(); public ClusteringLayoutComponent(SomClusteringResult somClusteringResults, SelectionManager selectionManager, DivaServiceAsync DivaClientService, int width, int height, boolean clusterColumn) { this.clustColumn = clusterColumn; this.DivaClientService = DivaClientService; tooltip.setStyleName("clustertooltip"); mainThumbClusteringLayout = new VLayout(); mainThumbClusteringLayout.setStyleName("somclustering"); mainThumbClusteringLayout.setHeight("89%"); mainThumbClusteringLayout.setWidth("29%"); mainThumbClusteringLayout.setMargin(2); mainThumbClusteringLayout.setMembersMargin(0); HorizontalPanel topLayout = new HorizontalPanel(); mainThumbClusteringLayout.addMember(topLayout); topLayout.setWidth("100%"); topLayout.setHeight("18px"); topLayout.setStyleName("whiteLayout"); Label title = new Label("Hierarchical Clustering"); title.setStyleName("labelheader"); topLayout.add(title); title.setWidth("70%"); title.setHeight("18px"); topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT); HorizontalPanel btnsLayout = new HorizontalPanel(); btnsLayout.setWidth("34px"); btnsLayout.setHeight("18px"); topLayout.add(btnsLayout); topLayout.setCellHorizontalAlignment(btnsLayout, HorizontalPanel.ALIGN_RIGHT); topLayout.setCellVerticalAlignment(btnsLayout, HorizontalPanel.ALIGN_TOP); Label minSettingBtn = new Label(); minSettingBtn.addStyleName("settings"); minSettingBtn.setHeight("16px"); minSettingBtn.setWidth("16px"); btnsLayout.add(minSettingBtn); btnsLayout.setCellHorizontalAlignment(minSettingBtn, HorizontalPanel.ALIGN_RIGHT); Label maxmizeBtn = new Label(); maxmizeBtn.addStyleName("maxmize"); maxmizeBtn.setHeight("16px"); maxmizeBtn.setWidth("16px"); btnsLayout.add(maxmizeBtn); btnsLayout.setCellHorizontalAlignment(maxmizeBtn, HorizontalPanel.ALIGN_RIGHT); mainThumbClusteringLayout.addMember(mainClusterPanelLayout); //add tooltip panel after clustering panel mainThumbClusteringLayout.addMember(tooltipPanel); tooltipPanel.setWidth("100%"); tooltipPanel.setHeight("25px"); tooltipPanel.setStyleName("whiteLayout"); tooltipPanel.add(tooltip); tooltipPanel.setCellHorizontalAlignment(tooltip, HorizontalPanel.ALIGN_CENTER); tooltipPanel.setCellVerticalAlignment(tooltip, HorizontalPanel.ALIGN_TOP); tooltip.setWidth("100%"); tooltip.setHeight("24px"); // sideTreeImg = new TopTreeImg(somClusteringResults.getSideTreeImg(), somClusteringResults.getRowNode(), 2, tooltip,0);//"data:sideTreeImg/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAMPCAIAAAAfPw1YAAAUM0lEQVR42u3d2XYjqRIFUP//T/u+3nZpSCACAtgsP3S7pJy0fQhQDj+/mpbQfkpshHZeKwLLn7jEAkt78RH++QFLC8IksbQwWP/+t8TSBju7v7D++0uwtPZ8evcbiaW1JdOrKur346cGlvaMy0tY73/A0nphfV4MWNpTWC0/YGlDySSxtCmwJJYWCcs8lva9chrhKLG0t5MIA0GlxtKCYP37Loml9cB62W/+80uwwGqH9fnFEkt7BOvzSQ3vFgzWpUO/518t//nNu7NlzLyLpbZ8+gDrwzrBAqvt7b4r1FJgPVwnWGANlWgSC6yoNJJY2gNYOT9g3Q0rb51ggRW/OokFVqwn3xWCFcfo1RfSYIEVtMz//gYssOJgGRWCFdD3GRWCFb+Qb+c4gAVWL6yP6QUWWMMLeZVeYB3h5utPyAIfvl5i3RJIHbC6FyKxwEqBpcYCKx6WUSFYPbBaijmwwIobRUossDoHgGossJ7C6lugM0jBSoElscAKgNU+WQoWWM9gvfvfN+bAAqsL1ocL8CUWWJ2wHvwTWGA9G/Q1jhDBAitiFRILrBhY5rHAioHlnHew4mF9fqPEuhdW1MmlT2YcJNYtsJLe+zG9wAIrYgPMvIMVD+sVMrDAytkosMAKjyuJBVbQqNA572CFwZJYYI2+18w7WFmwJBZYk2CpscBqrsH7vvmRWGBlrwIssEJXIbHAilmFq3TAyirFJBZY09YOFlgpYQZWeTThtxids+FgbZ9Gy4+exAIrS5LEAit+q5zzDlYWLPNYYMUMIL69GCyw2pfvjn5gTYVlVAjWKCznY4E1YxskFliRpboaC6zUUt2oEKwgWN/KLLDA6oUlscBKGQOqscCKHwNKLLDSYamxwIqE9bJblFhghS3N+VhgjVflD5cD1t2w0vIPLLCiY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Oe9gxefTr6t0wJqTTxILrEd5E1D2gXUnrPTYAwuskG2WWIfDCngAfcRMB1i/GYe4+J9uxlZJrKmLugeWGgus32Wn/4F1NqwZnwJYYKUEIVhgZXSAYIEVtpESC6z82QewwEo5JwKsk2BNmxww834drNh39Z8BARZYTTexfbgisMDqhGXmHayhysyoEKz41bUuUGKBFbbA11euggXW+PyFxFoAq8LdquYfcLAK5c2mG2xUCNbELQELrJTQAguskKpRYoE1OuaQWGDFL+fpNbFHwrr2YpPAx6WMHl6JdWdiZd++AazTYK29yl5inQmrzq6BdS8sV0KDteGnABZYKeEHFljjvafEAmuo5JJYYMXvadPRAAusBlhGhWA1azAqBCt+F/ov85JYYHW/zDOhz4eVNAcef7IDWNvBmr8LnqUDVhYs3xWCVWIXwDof1poG1ipYZ39kYK2EdfJAFSywxvNVYoHV3zVLrFqPlYutllJhRQ4awNprO1dBNyo8HNYu2wOW7czJQrBsZ8regXVIQlRrYGkSC6x9QtTR0TI8+OPWJJa2T/sfzLKROygb1PEAAAAASUVORK5CYII="); // heatMapImg = new SplitHeatmapImg(somClusteringResults.getHeatMapImg(), somClusteringResults.getRowNames(), somClusteringResults.getColNames(), somClusteringResults.getValues(), tooltip,1,0,0); interactiveColImage = new Image("images/w.png"); scaleImg = new Image(somClusteringResults.getScaleImgUrl()); mainClusterPanelLayout.setWidth("100%"); mainClusterPanelLayout.setHeight("95%"); mainClusterPanelLayout.setStyleName("whiteLayout"); mainClusterPanelLayout.setAlwaysShowScrollBars(false); mainClusterPanelLayout.add(clusterLayout); clusterLayout.setWidth("100%"); clusterLayout.setHeight("100%"); clusterLayout.setSpacing(0); clusterLayout.add(topClusterLayout); clusterLayout.setCellHorizontalAlignment(topClusterLayout, VerticalPanel.ALIGN_CENTER); clusterLayout.setCellVerticalAlignment(topClusterLayout, VerticalPanel.ALIGN_MIDDLE); clusterLayout.add(middleClusterLayout); clusterLayout.setCellHorizontalAlignment(middleClusterLayout, VerticalPanel.ALIGN_CENTER); clusterLayout.setCellVerticalAlignment(middleClusterLayout, VerticalPanel.ALIGN_MIDDLE); clusterLayout.add(bottomClusterLayout); clusterLayout.setCellHorizontalAlignment(bottomClusterLayout, VerticalPanel.ALIGN_CENTER); clusterLayout.setCellVerticalAlignment(bottomClusterLayout, VerticalPanel.ALIGN_MIDDLE); if (clusterColumn) { topClusterLayout.setHeight(70 + "px"); topClusterLayout.setWidth("20%"); // upperTreeImg = new TopTreeImg(somClusteringResults.getUpperTreeImgUrl(), somClusteringResults.getColNode(), 1, tooltip,0,0); spacer.setSize((200 + "px"), (70 + "px")); spacer.setStyleName("borderless"); spacer2.setSize((10 + "px"), (70 + "px")); spacer2.setStyleName("borderless"); topClusterLayout.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT); topClusterLayout.add(spacer); topClusterLayout.setCellHorizontalAlignment(spacer, HorizontalPanel.ALIGN_LEFT); topClusterLayout.setCellWidth(spacer, 200 + "px"); topClusterLayout.add(upperTreeImg); topClusterLayout.setCellHorizontalAlignment(upperTreeImg, HorizontalPanel.ALIGN_LEFT); topClusterLayout.setCellWidth(upperTreeImg, upperTreeImg.getWidth() + "px"); topClusterLayout.add(spacer2); topClusterLayout.setCellHorizontalAlignment(spacer2, HorizontalPanel.ALIGN_LEFT); topClusterLayout.setCellWidth(spacer2, "10px"); } else { topClusterLayout.setHeight(0 + "px"); } initThumLayout(somClusteringResults); clustInfoLabel.setWidth(210 + "px"); clustInfoLabel.setHeight("20px"); clustInfoLabel.setStyleName("info"); // bottomClusterLayout.add(clustInfoLabel); bottomClusterLayout.add(scaleImg); if (upperTreeImg != null) { upperTreeImg.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { int y = (int) (event.getY()); int x = ((int) (event.getX())); if (upperTreeImg.isSelectedNode()) { // updateUpperTreeSelection(x, y); } } }); } // sideTreeImg.addClickHandler(new ClickHandler() { // @Override // public void onClick(ClickEvent event) { // int y = (int) (event.getY()); // int x = ((int) (event.getX())); // if (sideTreeImg.isSelectedNode()) { //// updateSideTreeSelection(x, y); // } // // } // // }); // this.selectionManager = selectionManager; // final UpdatedSomClustPanel clusteringSettingPanel = new UpdatedSomClustPanel(); ///done with normal mode start setteing and maxmize mode ClickHandler settingClickHandler = new ClickHandler() { @Override public void onClick(ClickEvent event) { // if (clusteringPopup.isShowing()) { // clusteringPopup.hide(true); // } clusteringSettingPanel.center(); clusteringSettingPanel.show(); } }; minSettingBtn.addClickHandler(settingClickHandler); clusteringSettingPanel.getProcessBtn() .addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { clusteringSettingPanel.hide(); clustColumn = clusteringSettingPanel.isClusterColumns(); // runSomClustering(clusteringSettingPanel.getLinkageValue(), clusteringSettingPanel.getDistanceMeasureValue(), clustColumn); } }); maxmizeBtn.addClickHandler(new com.google.gwt.event.dom.client.ClickHandler() { @Override public void onClick(com.google.gwt.event.dom.client.ClickEvent event) { // clusteringPopup.center(); // clusteringPopup.show(); // if (newUpdatedDrawPanel == null) { // newUpdatedDrawPanel = new MaxmizeClustering(sideTreeImg.getWidth(),sideTreeImg.getHeight(), defaultSideTreeImgURL, clustColumn); // mainClusteringPopupBodyLayout.addMember(newUpdatedDrawPanel); // } } }); } private void initThumLayout(SomClusteringResult somClusteringResults) { // this.defaultSideTreeImgURL = somClusteringResults.getSideTreeImg(); if (clustColumn) { // topClusterLayout.setHeight(70 + "px"); upperTreeImg.setUrl(somClusteringResults.getUpperTreeImgUrl()); defaultTopTreeImgURL = somClusteringResults.getUpperTreeImgUrl(); upperTreeImg.setVisible(clustColumn); spacer.setVisible(clustColumn); spacer2.setVisible(clustColumn); } // sideTreeImg.setUrl(somClusteringResults.getSideTreeImg());//"data:sideTreeImg/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAMPCAIAAAAfPw1YAAAUM0lEQVR42u3d2XYjqRIFUP//T/u+3nZpSCACAtgsP3S7pJy0fQhQDj+/mpbQfkpshHZeKwLLn7jEA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FL+fpNbFHwrr2YpPAx6WMHl6JdWdiZd++AazTYK29yl5inQmrzq6BdS8sV0KDteGnABZYKeEHFljjvafEAmuo5JJYYMXvadPRAAusBlhGhWA1azAqBCt+F/ov85JYYHW/zDOhz4eVNAcef7IDWNvBmr8LnqUDVhYs3xWCVWIXwDof1poG1ipYZ39kYK2EdfJAFSywxvNVYoHV3zVLrFqPlYutllJhRQ4awNprO1dBNyo8HNYu2wOW7czJQrBsZ8regXVIQlRrYGkSC6x9QtTR0TI8+OPWJJa2T/sfzLKROygb1PEAAAAASUVORK5CYII="); // heatMapImg .setUrl(somClusteringResults.getHeatMapImg()); heatMapImg.updateTooltips(somClusteringResults.getRowNames(), somClusteringResults.getColNames(), somClusteringResults.getValues()); interactiveColImage.setUrl("images/w.png"); scaleImg.setUrl(somClusteringResults.getScaleImgUrl()); middleClusterLayout.setWidth("20%"); interactiveColImage.setSize("10px", sideTreeImg.getHeight() + "px"); if (upperTreeImg != null) { // heatMapImg.setSize(upperTreeImg.getWidth() + "px", sideTreeImg.getHeight() + "px"); } else { // heatMapImg.setSize((width - 220) + "px", sideTreeImg.getHeight() + "px"); } middleClusterLayout.setHeight(sideTreeImg.getHeight() + "px"); middleClusterLayout.add(sideTreeImg); middleClusterLayout.setCellWidth(sideTreeImg, sideTreeImg.getWidth() + "px"); middleClusterLayout.add(heatMapImg); // middleClusterLayout.setCellWidth(heatMapImg, heatMapImg.getWidth() + "px"); middleClusterLayout.add(interactiveColImage); middleClusterLayout.setCellWidth(interactiveColImage, "10px"); clustInfoLabel.setText("Distance metrics: " + somClusteringResults.getDistanceMeasure() + " - " + "Linkage: " + somClusteringResults.getLinkage()); } }