public Object getValueAt(int row, int col) { if (col == 0) { return matrix.getAnovaAttributeNames().get(row); } else { return Tools.formatNumber(matrix.getProbabilities()[row][col - 1]); } }
@Override public String getColumnName(int col) { if (col == 0) { return "ANOVA Attribute"; } else { return "group " + matrix.getGroupingAttributeNames().get(col - 1); } }
public ANOVAMatrixViewer(ANOVAMatrix matrix) { super(new BorderLayout()); JPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); // info string JTextPane infoText = new JTextPane(); infoText.setEditable(false); infoText.setBackground(infoPanel.getBackground()); infoText.setFont(infoText.getFont().deriveFont(Font.BOLD)); infoText.setText( "A dark background indicates that the probability for non-difference between the groups is less than " + Tools.formatNumber(matrix.getSignificanceLevel())); infoPanel.add(infoText); infoPanel.setBorder(BorderFactory.createEtchedBorder()); add(infoPanel, BorderLayout.NORTH); // table ANOVAMatrixViewerTable table = new ANOVAMatrixViewerTable(matrix); table.setBorder(BorderFactory.createEtchedBorder()); add(new ExtendedJScrollPane(table), BorderLayout.CENTER); }
public int getColumnCount() { return matrix.getGroupingAttributeNames().size() + 1; }
public int getRowCount() { return matrix.getAnovaAttributeNames().size(); }