/** Initializes and returns the JPanel that contains the button. */ private JPanel getButtonsPanel() { if (this.bpButtonPanel == null) { bpButtonPanel = new BestPracticeButtonPanel(); bpButtonPanel.setScrollPane(getScrollPane()); bpButtonPanel.setNoOfRecords(noOfRecords); } return this.bpButtonPanel; }
/** Updates the table. */ public void updateTableForPrint() { // Check if already expanded, do nothing. BestPracticeButtonPanel bpanel = ((BestPracticeButtonPanel) getButtonsPanel()); JButton viewBtn = bpanel.getViewBtn(); if (!bpanel.isExpanded() && this.noOfRecords > 5) { viewBtn.doClick(); this.scrollPane.revalidate(); } }
/** * Sets the async loading of scripts result data. * * @param data - The data to be displayed in the result content table. */ public void setData(Collection<AsyncCheckEntry> data) { LOGGER.log(Level.FINE, "setData, size: {0}", new Object[] {data.size()}); this.tableModel.setData(data); noOfRecords = data.size(); if (bpButtonPanel != null) { bpButtonPanel.setNoOfRecords(noOfRecords); } }