m_ApplyFilterBut.setEnabled(false);
// Set up the GUI layout
JPanel buttons = new JPanel();
buttons.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5));
buttons.setLayout(new GridLayout(1, 6, 5, 5));
buttons.add(m_OpenFileBut);
buttons.add(m_OpenURLBut);
buttons.add(m_OpenDBBut);
buttons.add(m_GenerateBut);
buttons.add(m_UndoBut);
buttons.add(m_EditBut);
buttons.add(m_SaveBut);
JPanel attInfo = new JPanel();
attInfo.setLayout(new BorderLayout());
attInfo.add(attStuffHolderPanel, BorderLayout.CENTER);
JPanel filter = new JPanel();
filter.setBorder(BorderFactory
.createTitledBorder("Filter"));
filter.setLayout(new BorderLayout());
filter.add(m_FilterPanel, BorderLayout.CENTER);
filter.add(m_ApplyFilterBut, BorderLayout.EAST);
JPanel attVis = new JPanel();
attVis.setLayout( new GridLayout(2,1) );
attVis.add(m_AttSummaryPanel);
JComboBox colorBox = m_AttVisualizePanel.getColorBox();
colorBox.setToolTipText("The chosen attribute will also be used as the " +
"class attribute when a filter is applied.");
colorBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent ie) {
if (ie.getStateChange() == ItemEvent.SELECTED) {
updateCapabilitiesFilter(m_FilterEditor.getCapabilitiesFilter());
}
}
});
final JButton visAllBut = new JButton("Visualize All");
visAllBut.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
if (m_Instances != null) {
try {
final weka.gui.beans.AttributeSummarizer as =
new weka.gui.beans.AttributeSummarizer();
as.setColoringIndex(m_AttVisualizePanel.getColoringIndex());
as.setInstances(m_Instances);
final javax.swing.JFrame jf = new javax.swing.JFrame();
jf.getContentPane().setLayout(new java.awt.BorderLayout());
jf.getContentPane().add(as, java.awt.BorderLayout.CENTER);
jf.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
visAllBut.setEnabled(true);
jf.dispose();
}
});
jf.setSize(830,600);
jf.setVisible(true);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
});
JPanel histoHolder = new JPanel();
histoHolder.setLayout(new BorderLayout());
histoHolder.add(m_AttVisualizePanel, BorderLayout.CENTER);
JPanel histoControls = new JPanel();
histoControls.setLayout(new BorderLayout());
histoControls.add(colorBox, BorderLayout.CENTER);
histoControls.add(visAllBut, BorderLayout.EAST);
histoHolder.add(histoControls, BorderLayout.NORTH);
attVis.add(histoHolder);
JPanel lhs = new JPanel();
lhs.setLayout(new BorderLayout());
lhs.add(m_InstSummaryPanel, BorderLayout.NORTH);
lhs.add(attInfo, BorderLayout.CENTER);
JPanel rhs = new JPanel();
rhs.setLayout(new BorderLayout());
rhs.add(attVis, BorderLayout.CENTER);
JPanel relation = new JPanel();
relation.setLayout(new GridLayout(1, 2));
relation.add(lhs);
relation.add(rhs);
JPanel middle = new JPanel();
middle.setLayout(new BorderLayout());