/** * Sets the attribute that statistics will be displayed for. * * @param index the index of the attribute to display */ public void setAttribute(final int index) { setHeader(index); if (m_AttributeStats[index] == null) { Thread t = new Thread() { @Override public void run() { m_AttributeStats[index] = m_Instances.attributeStats(index); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { setDerived(index); m_StatsTable.sizeColumnsToFit(-1); m_StatsTable.revalidate(); m_StatsTable.repaint(); } }); } }; t.setPriority(Thread.MIN_PRIORITY); t.start(); } else { setDerived(index); } }
/** * Sets the attribute that statistics will be displayed for. * * @param index the index of the attribute to display */ public void setAttribute(final int index) { setHeader(index); if (m_AttributeStats[index] == null) { Thread t = new Thread() { @Override public void run() { m_AttributeStats[index] = m_Instances.attributeStats(index); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { setDerived(index); m_StatsTable.sizeColumnsToFit(-1); m_StatsTable.revalidate(); m_StatsTable.repaint(); } }); } }; t.setPriority(Thread.MIN_PRIORITY); t.start(); } else { setDerived(index); } }