@Override protected void addDetails() { logger.info( "Company ID : " + companyid + " | User Name : " + username + " > " + "Adding new record..."); // remove the components in the search layout and input controls in the same container hlUserInputLayout.removeAllComponents(); hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout)); assembleInputUserLayout(); // reset the input controls to default value tblMstScrSrchRslt.setVisible(false); hlCmdBtnLayout.setVisible(false); btnaddSpec.setCaption("Add"); tblSmsEnqDtl.setVisible(true); cbBranch.setRequired(true); lsVendorName.setRequired(true); tfEnqNo.setReadOnly(true); lsProduct.setRequired(true); lsProduct.setComponentError(null); dfEnqDate.setComponentError(null); cbUom.setRequired(true); loadPurDtl(); resetFields(); tfEnqNo.setReadOnly(true); try { tfEnqNo.setReadOnly(false); SlnoGenDM slnoObj = serviceSlnogen.getSequenceNumber(companyid, branchId, moduleId, "SM_ENQRYNO ").get(0); if (slnoObj.getAutoGenYN().equals("Y")) { tfEnqNo.setValue(slnoObj.getKeyDesc()); tfEnqNo.setReadOnly(true); } else { tfEnqNo.setReadOnly(false); } } catch (Exception e) { logger.info(e.getMessage()); } comments = new SmsComments( vlTableForm, null, companyid, null, null, null, null, null, null, null, null, null, null, null); }
@Override protected void editDetails() { hlUserInputLayout.removeAllComponents(); hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout)); assembleInputUserLayout(); tblMstScrSrchRslt.setVisible(false); hlCmdBtnLayout.setVisible(false); tblSmsEnqDtl.setVisible(true); if (tfEnqNo.getValue() == null || tfEnqNo.getValue().trim().length() == 0) { tfEnqNo.setReadOnly(false); } cbBranch.setRequired(true); lsVendorName.setRequired(true); resetFields(); editPurHdr(); editSmsPurDetail(); lsProduct.setRequired(true); cbUom.setRequired(true); }
public FractionsLayout( final String accession, final double mw, Map<Integer, ProteinBean> proteinFractionAvgList, List<StandardProteinBean> standardProtPlotList, final String expName) { this.setSpacing(false); this.setWidth("100%"); this.setMargin(new MarginInfo(false, false, false, true)); final HorizontalLayout headerLayout = new HorizontalLayout(); headerLayout.setHeight("45px"); headerLayout.setSpacing(true); final HorizontalLayout clickableheaderLayout = new HorizontalLayout(); clickableheaderLayout.setHeight("45px"); clickableheaderLayout.setSpacing(true); headerLayout.addComponent(clickableheaderLayout); headerLayout.setComponentAlignment(clickableheaderLayout, Alignment.BOTTOM_LEFT); show = new ShowLabel(true); clickableheaderLayout.addComponent(show); clickableheaderLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); stat = true; Label fractionLabel = new Label( "<h4 style='font-family:verdana;color:black;'>Fractions (Protein: " + accession + " MW: " + mw + " kDa)</h4>"); fractionLabel.setContentMode(Label.CONTENT_XHTML); fractionLabel.setHeight("45px"); clickableheaderLayout.addComponent(fractionLabel); clickableheaderLayout.setComponentAlignment(fractionLabel, Alignment.TOP_RIGHT); // Label infoLable = new Label("<center style='background-color:#E6E6FA;'><p // style='background-color:#E6E6FA;font-family:verdana;color:black;font-weight:bold;'>Bar charts // showing the distribution of the protein in the fractions cut from the gel.<br/>Three charts // show number of peptides, number of spectra and average precursor intensity.<br/>The fraction // number represents the gel pieces cut from top to bottom.<br/>Protein standards (dark blue // bars) indicate the molecular weight range of each fraction. Darker blue bars mark the area // where the protein's theoretical mass suggests the protein should occur. </p></center>"); // infoLable.setContentMode(Label.CONTENT_XHTML); // infoLable.setWidth("300px"); // infoLable.setStyleName(Reindeer.LAYOUT_BLUE); // // Help help = new Help(); // HorizontalLayout infoIco = help.getInfoNote(infoLable); // infoIco.setMargin(new MarginInfo(false, false, false, true)); // headerLayout.addComponent(infoIco); // headerLayout.setComponentAlignment(infoIco, Alignment.MIDDLE_LEFT); this.addComponent(headerLayout); mainLayout = new VerticalLayout(); this.addComponent(mainLayout); FractionPlotLayout plotsLayout = new FractionPlotLayout(proteinFractionAvgList, mw, standardProtPlotList); mainLayout.addComponent(plotsLayout); mainLayout.setComponentAlignment(plotsLayout, Alignment.MIDDLE_CENTER); HorizontalLayout lowerLayout = new HorizontalLayout(); lowerLayout.setWidth("100%"); lowerLayout.setHeight("25px"); lowerLayout.setMargin((new MarginInfo(false, true, false, true))); lowerLayout.setSpacing(false); // Panel toolbar = new Panel(lowerLayout); // toolbar.setStyleName(Reindeer.PANEL_LIGHT); //// toolbar.setHeight("35px"); // toolbar.setWidth("100%"); mainLayout.addComponent(lowerLayout); mainLayout.setComponentAlignment(lowerLayout, Alignment.TOP_CENTER); exportFracLayout.setWidth("300px"); lowerLayout.addComponent(exportFracLayout); lowerLayout.setComponentAlignment(exportFracLayout, Alignment.MIDDLE_RIGHT); lowerLayout.setExpandRatio(exportFracLayout, 0.1f); final Table fractTable = getFractionTable(proteinFractionAvgList); fractTable.setVisible(false); this.addComponent(fractTable); expBtnFracTable = new PopupView( "Export Fractions from Selected Dataset for ( " + accession + " )", new CustomExportBtnLayout( null, "fractions", 0, expName, accession, accession, null, null, 0, null, fractTable, null)); expBtnFracTable.setDescription( "Export Fractions from ( " + expName + " ) Dataset for ( " + accession + " )"); // expBtnFracTable = new Help().getExpIcon(new CustomExportBtnLayout(null, "fractions", 0, // expName, accession, accession, null, null, 0, null, fractTable, null), "Export CSF-PR / // "+expName+" / Fractions", "Export CSF-PR / "+expName+" / Fractions"); exportFracLayout.addComponent(expBtnFracTable); exportFracLayout.setMargin(new MarginInfo(false, true, false, false)); exportFracLayout.setComponentAlignment(expBtnFracTable, Alignment.BOTTOM_RIGHT); clickableheaderLayout.addListener( new com.vaadin.event.LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (stat) { stat = false; show.updateIcon(false); mainLayout.setVisible(false); } else { stat = true; show.updateIcon(true); mainLayout.setVisible(true); } } }); }