@Override public void actionPerformed(ActionEvent e) { m_ClassifierEditor.setValue(classifier); } });
@Override public void actionPerformed(ActionEvent e) { m_ClustererEditor.setValue(clusterer); } });
@Override public void actionPerformed(ActionEvent e) { m_AssociatorEditor.setValue(model); } });
@Override public void actionPerformed(ActionEvent e) { m_ClassifierEditor.setValue(classifier); } });
@Override public void actionPerformed(ActionEvent e) { m_ClustererEditor.setValue(clusterer); } });
@Override public void actionPerformed(ActionEvent e) { m_AssociatorEditor.setValue(model); } });
@Override public void actionPerformed(ActionEvent e) { Object object = openObject(); if (object != null) { // setValue takes care of: Making sure obj is of right type, // and firing property change. setValue(object); // Need a second setValue to get property values filled in OK. // Not sure why. setValue(object); } } });
@Override public void actionPerformed(ActionEvent e) { Object object = openObject(); if (object != null) { // setValue takes care of: Making sure obj is of right type, // and firing property change. setValue(object); // Need a second setValue to get property values filled in OK. // Not sure why. setValue(object); } } });
/** * initializes the GUI components with the data. */ private void setData() { m_IgnoreChanges = true; // Precision m_MeanPrecSpinner.setValue(m_ResultMatrix.getMeanPrec()); m_StdDevPrecSpinner.setValue(m_ResultMatrix.getStdDevPrec()); // format for (int i = 0; i < m_OutputFormatClasses.size(); i++) { if (m_OutputFormatClasses.get(i).equals(m_ResultMatrix.getClass())) { m_OutputFormatComboBox.setSelectedItem(m_OutputFormatNames.get(i)); break; } } // average m_ShowAverageCheckBox.setSelected(m_ResultMatrix.getShowAverage()); // filter names m_RemoveFilterNameCheckBox .setSelected(m_ResultMatrix.getRemoveFilterName()); // GOE m_ResultMatrixEditor.setValue(m_ResultMatrix); m_IgnoreChanges = false; }
/** * initializes the GUI components with the data. */ private void setData() { m_IgnoreChanges = true; // Precision m_MeanPrecSpinner.setValue(m_ResultMatrix.getMeanPrec()); m_StdDevPrecSpinner.setValue(m_ResultMatrix.getStdDevPrec()); // format for (int i = 0; i < m_OutputFormatClasses.size(); i++) { if (m_OutputFormatClasses.get(i).equals(m_ResultMatrix.getClass())) { m_OutputFormatComboBox.setSelectedItem(m_OutputFormatNames.get(i)); break; } } // average m_ShowAverageCheckBox.setSelected(m_ResultMatrix.getShowAverage()); // filter names m_RemoveFilterNameCheckBox .setSelected(m_ResultMatrix.getRemoveFilterName()); // GOE m_ResultMatrixEditor.setValue(m_ResultMatrix); m_IgnoreChanges = false; }
@Override public void propertyChange(PropertyChangeEvent e) { // user selected different class? if (!m_ResultMatrix.getClass().equals( m_ResultMatrixEditor.getValue().getClass())) { // if it's the preferred class, then automaticallly use the // Experimenter defaults if (m_ResultMatrixEditor.getValue().getClass() .equals(ExperimenterDefaults.getOutputFormat().getClass())) { m_ResultMatrix = ExperimenterDefaults.getOutputFormat(); m_ResultMatrixEditor.setValue(ExperimenterDefaults .getOutputFormat()); } else { m_ResultMatrix = (ResultMatrix) m_ResultMatrixEditor.getValue(); } setData(); } repaint(); } });
@Override public void propertyChange(PropertyChangeEvent e) { // user selected different class? if (!m_ResultMatrix.getClass().equals( m_ResultMatrixEditor.getValue().getClass())) { // if it's the preferred class, then automaticallly use the // Experimenter defaults if (m_ResultMatrixEditor.getValue().getClass() .equals(ExperimenterDefaults.getOutputFormat().getClass())) { m_ResultMatrix = ExperimenterDefaults.getOutputFormat(); m_ResultMatrixEditor.setValue(ExperimenterDefaults .getOutputFormat()); } else { m_ResultMatrix = (ResultMatrix) m_ResultMatrixEditor.getValue(); } setData(); } repaint(); } });
setValue(WekaPackageClassLoaderManager.forName(defaultValue).newInstance());
/** * Pops up generic object editor with list of conversion filters * * @param f the File */ private void converterQuery(final File f) { final GenericObjectEditor convEd = new GenericObjectEditor(true); try { convEd.setClassType(weka.core.converters.Loader.class); convEd.setValue(new weka.core.converters.CSVLoader()); ((GenericObjectEditor.GOEPanel) convEd.getCustomEditor()) .addOkListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tryConverter((Loader) convEd.getValue(), f); } }); } catch (Exception ex) { } PropertyDialog pd; if (PropertyDialog.getParentDialog(this) != null) pd = new PropertyDialog(PropertyDialog.getParentDialog(this), convEd, -1, -1); else pd = new PropertyDialog(PropertyDialog.getParentFrame(this), convEd, -1, -1); pd.setVisible(true); }
/** * Pops up generic object editor with list of conversion filters * * @param f the File */ private void converterQuery(final File f) { final GenericObjectEditor convEd = new GenericObjectEditor(true); try { convEd.setClassType(weka.core.converters.Loader.class); convEd.setValue(new weka.core.converters.CSVLoader()); ((GenericObjectEditor.GOEPanel) convEd.getCustomEditor()) .addOkListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tryConverter((Loader) convEd.getValue(), f); } }); } catch (Exception ex) { } PropertyDialog pd; if (PropertyDialog.getParentDialog(this) != null) pd = new PropertyDialog(PropertyDialog.getParentDialog(this), convEd, -1, -1); else pd = new PropertyDialog(PropertyDialog.getParentFrame(this), convEd, -1, -1); pd.setVisible(true); }
getPerspectiveID(), AssociationsPanelDefaults.ASSOCIATOR_KEY, AssociationsPanelDefaults.ASSOCIATOR, Environment.getSystemWide()); m_AssociatorEditor.setValue(initialA);