if (e instanceof GenericObjectEditor) { ((GenericObjectEditor) e).setClassType(m_ValueClass);
if (e instanceof GenericObjectEditor) { ((GenericObjectEditor) e).setClassType(m_ValueClass);
m_AssociatorEditor.setClassType(Associator.class); m_AssociatorEditor.setValue(ExplorerDefaults.getAssociator()); m_AssociatorEditor.addPropertyChangeListener(new PropertyChangeListener() {
/** * creates the panel */ public DataGeneratorPanel() { setLayout(new BorderLayout()); add(new PropertyPanel(m_GeneratorEditor), BorderLayout.CENTER); // editor m_GeneratorEditor.setClassType(DataGenerator.class); m_GeneratorEditor.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { repaint(); } }); // set default generator setGenerator(null); }
/** * creates the panel */ public DataGeneratorPanel() { setLayout(new BorderLayout()); add(new PropertyPanel(m_GeneratorEditor), BorderLayout.CENTER); // editor m_GeneratorEditor.setClassType(DataGenerator.class); m_GeneratorEditor.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { repaint(); } }); // set default generator setGenerator(null); }
if (editor != null) { if (editor instanceof GenericObjectEditor) { ((GenericObjectEditor) editor).setClassType(elementClass);
if (editor != null) { if (editor instanceof GenericObjectEditor) { ((GenericObjectEditor) editor).setClassType(elementClass);
((GenericObjectEditor) m_Editor).setClassType(m_ElementClass);
((GenericObjectEditor) m_Editor).setClassType(m_ElementClass);
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class); Object initial = new weka.classifiers.rules.ZeroR(); if (args.length > 0) { ce.setClassType(WekaPackageClassLoaderManager.forName(args[0])); if (args.length > 1) {
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class); Object initial = new weka.classifiers.rules.ZeroR(); if (args.length > 0) { ce.setClassType(WekaPackageClassLoaderManager.forName(args[0])); if (args.length > 1) {
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class); ce.setValue(m_BayesNet);
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class); ce.setValue(m_BayesNet);
m_Editor.setClassType(AbstractFileLoader.class); m_Editor.setValue(new weka.core.converters.ArffLoader()); } else { m_Editor.setClassType(AbstractFileSaver.class); m_Editor.setValue(new weka.core.converters.ArffSaver());
m_ClassifierEditor.setClassType(weka.classifiers.Classifier.class);
m_ClassifierEditor.setClassType(weka.classifiers.Classifier.class);
m_Editor.setClassType(AbstractFileLoader.class); m_Editor.setValue(new weka.core.converters.ArffLoader()); } else { m_Editor.setClassType(AbstractFileSaver.class); m_Editor.setValue(new weka.core.converters.ArffSaver());
public void editObject() { final GenericObjectEditor goe = new GenericObjectEditor(true); goe.setClassType(editedOption.getRequiredType()); try { String[] options = Utils.splitOptions(editedOption.getValueAsCLIString());
/** * 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); }