/** * Build and return this view's graphical components * * @return */ public Layout build() { this.root = new VLayout(); this.root.setWidth100(); this.root.setHeight100(); statsDetail = new DetailViewer(); statsDetail.setCanSelectText(true); DetailViewerField sd1 = new DetailViewerField("JobSubmittingPeriod", "Job Submitting Period"); DetailViewerField sd2 = new DetailViewerField("FormattedJobSubmittingPeriod", "Formatted Job Submitting Period"); DetailViewerField sd3 = new DetailViewerField("MeanJobPendingTime", "Mean Job Pending Time"); DetailViewerField sd4 = new DetailViewerField("ConnectedUsersCount", "Connected Users Count"); DetailViewerField sd5 = new DetailViewerField("FinishedTasksCount", "Finished Tasks Count"); DetailViewerField sd6 = new DetailViewerField("RunningJobsCount", "Running Jobs Count"); DetailViewerField sd7 = new DetailViewerField("RunningTasksCount", "Running Tasks Count"); DetailViewerField sd8 = new DetailViewerField("FormattedMeanJobPendingTime", "Formatted Mean Job Pending Time"); DetailViewerField sd9 = new DetailViewerField("MeanJobExecutionTime", "Mean Job Execution Time"); DetailViewerField sd10 = new DetailViewerField("PendingTasksCount", "Pending Tasks Count"); DetailViewerField sd11 = new DetailViewerField("FinishedJobsCount", "Finished Jobs Count"); DetailViewerField sd12 = new DetailViewerField("TotalTasksCount", "Total Tasks Count"); DetailViewerField sd13 = new DetailViewerField("FormattedMeanJobExecutionTime", "Formatted Mean Job Execution Time"); DetailViewerField sd14 = new DetailViewerField("TotalJobsCount", "Total Jobs Count"); DetailViewerField sd15 = new DetailViewerField("PendingJobsCount", "Pending Jobs Count"); statsDetail.setFields( sd1, sd2, sd3, sd4, sd5, sd6, sd7, sd8, sd9, sd10, sd11, sd12, sd13, sd14, sd15); accountDetail = new DetailViewer(); accountDetail.setCanSelectText(true); DetailViewerField ad1 = new DetailViewerField("TotalTaskCount", "Total Task Count"); DetailViewerField ad2 = new DetailViewerField("TotalJobDuration", "Total Job Duration"); DetailViewerField ad3 = new DetailViewerField("TotalJobCount", "Total Job Count"); DetailViewerField ad4 = new DetailViewerField("TotalTaskDuration", "Total Task Duration"); accountDetail.setFields(ad1, ad2, ad3, ad4); l1 = new Label("<h3>Scheduler statistics</h3>"); l1.setHeight(25); l1.hide(); l2 = new Label("<h3>My account</h3>"); l2.setHeight(25); l2.hide(); this.root.addMember(l1); this.root.addMember(statsDetail); this.root.addMember(l2); this.root.addMember(accountDetail); return this.root; }
public DlgOrgInfoViewByPhone(String phone) { super(); setWidth(600); setHeight(700); setTitle("ორგანიზაციები ნომრის მიხედვით"); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); setCanDrag(false); setCanDragReposition(false); setCanDragResize(false); setCanDragScroll(false); centerInPage(); VLayout hLayout = new VLayout(5); hLayout.setWidth100(); hLayout.setHeight100(); DataSource dataSource = DataSource.get("OrgInfoByPhoneDS"); dataSource.getField("org_name").setTitle("ორგანიზაციის დასახელება"); dataSource.getField("note").setTitle("შენიშვნა"); dataSource.getField("workinghours").setTitle("სამუშაო საათები"); dataSource.getField("director").setTitle("დირექტორი"); dataSource.getField("identcode").setTitle("საიდ. კოდი"); dataSource.getField("founded").setTitle("დაარსდა"); dataSource.getField("legaladdress").setTitle("მისამართი"); dataSource.getField("mail").setTitle("ელ. ფოსტა"); dataSource.getField("webaddress").setTitle("ვებ გვერდი"); dataSource.getField("org_info").setTitle("ორგ. ინფორმაცია"); dataSource.getField("contactperson").setTitle("საკონტაქტო პიროვნება"); dataSource.getField("dayoffs").setTitle("დასვენების დღეები"); dataSource.getField("legal_statuse").setTitle("სტატუსი"); dataSource.getField("partnerbank").setTitle("პარტნიორი ბანკი"); dataSource.getField("workpersoncountity").setTitle("თანამშრომლების რაოდენობა"); dataSource.getField("upd_user").setTitle("ვინ განაახლა"); dataSource.getField("upd_date").setTitle("როდის განახლდა"); dataSource.getField("ind").setTitle("ინდექსი"); dataSource.getField("org_name_eng").setTitle("ორგ. დასახელება(ინგლისურად)"); dataSource.getField("new_identcode").setTitle("ახალი კოდი"); ListGridField org_name = new ListGridField("org_name", "ორგანიზაციის დასახელება", 250); ListGridField director = new ListGridField("director", "დირექტორი", 150); ListGridField identcode = new ListGridField("identcode", "საიდ. კოდი", 120); final ListGrid orgGrid = new ListGrid(); orgGrid.setWidth100(); orgGrid.setHeight(100); orgGrid.setAlternateRecordStyles(true); orgGrid.setShowFilterEditor(false); orgGrid.setCanEdit(false); orgGrid.setCanRemoveRecords(false); orgGrid.setShowRowNumbers(true); orgGrid.setCanHover(true); orgGrid.setShowHover(true); orgGrid.setShowHoverComponents(true); orgGrid.setAutoFetchData(true); Criteria criteria = new Criteria(); criteria.setAttribute("phone", phone); orgGrid.setCriteria(criteria); orgGrid.setDataSource(dataSource); orgGrid.setFetchOperation("getOrgInfoByPhoneForAbonent"); orgGrid.setFields(org_name, director, identcode); final DetailViewer detailViewer = new DetailViewer(); detailViewer.setCanSelectText(true); detailViewer.setHeight(520); detailViewer.setWidth100(); detailViewer.setDataSource(dataSource); orgGrid.addRecordClickHandler( new RecordClickHandler() { public void onRecordClick(RecordClickEvent event) { detailViewer.viewSelectedData(orgGrid); } }); HLayout hLayoutItem = new HLayout(5); hLayoutItem.setWidth100(); hLayoutItem.setAlign(Alignment.RIGHT); hLayoutItem.setMargin(10); IButton cancItem = new IButton(); cancItem.setTitle("დახურვა"); cancItem.setWidth(100); hLayoutItem.setMembers(cancItem); hLayout.setMembers(orgGrid, detailViewer, hLayoutItem); addItem(hLayout); cancItem.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { destroy(); } }); }