/** * Process a package's GUIEditors.props file * * @param propsFile the properties file to process * @param verbose true to output more info */ protected static void processGUIEditorsProps(File propsFile, boolean verbose) { GenericObjectEditor.registerEditors(); try { Properties editorProps = new Properties(); BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile)); editorProps.load(bi); bi.close(); bi = null; Enumeration<?> enm = editorProps.propertyNames(); while (enm.hasMoreElements()) { String name = enm.nextElement().toString(); String value = editorProps.getProperty(name, ""); if (verbose) { System.err.println("Registering " + name + " " + value); } GenericObjectEditor.registerEditor(name, value); } } catch (Exception ex) { // ignore } }
/** * Process a package's GUIEditors.props file * * @param propsFile the properties file to process * @param verbose true to output more info */ protected static void processGUIEditorsProps(File propsFile, boolean verbose) { GenericObjectEditor.registerEditors(); try { Properties editorProps = new Properties(); BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile)); editorProps.load(bi); bi.close(); bi = null; Enumeration<?> enm = editorProps.propertyNames(); while (enm.hasMoreElements()) { String name = enm.nextElement().toString(); String value = editorProps.getProperty(name, ""); if (verbose) { System.err.println("Registering " + name + " " + value); } GenericObjectEditor.registerEditor(name, value); } } catch (Exception ex) { // ignore } }
/** * Creates a single stand-alone settings editor panel * * @param settingsToEdit the settings to edit * @return a single settings editor panel for the supplied settings */ public static SingleSettingsEditor createSingleSettingsEditor( Map<Settings.SettingKey, Object> settingsToEdit) { GenericObjectEditor.registerEditors(); PropertyEditorManager.registerEditor(Color.class, ColorEditor.class); return new SingleSettingsEditor(settingsToEdit); }
/** * Creates a single stand-alone settings editor panel * * @param settingsToEdit the settings to edit * @return a single settings editor panel for the supplied settings */ public static SingleSettingsEditor createSingleSettingsEditor( Map<Settings.SettingKey, Object> settingsToEdit) { GenericObjectEditor.registerEditors(); PropertyEditorManager.registerEditor(Color.class, ColorEditor.class); return new SingleSettingsEditor(settingsToEdit); }
GenericObjectEditor.registerEditors();
GenericObjectEditor.registerEditors();
/** * Main method. Builds up menus and reads from file if one is specified. */ public static void main(String[] args) { weka.core.logging.Logger.log(weka.core.logging.Logger.Level.INFO, "Logging started"); LookAndFeel.setLookAndFeel(); JFrame jf = new JFrame("Bayes Network Editor"); final GUI g = new GUI(); JMenuBar menuBar = g.getMenuBar(); if (args.length > 0) { try { g.readBIFFromFile(args[0]); } catch (IOException ex) { ex.printStackTrace(); } catch (BIFFormatException bf) { bf.printStackTrace(); System.exit(-1); } } jf.setJMenuBar(menuBar); jf.getContentPane().add(g); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jf.setSize(800, 600); jf.setVisible(true); g.m_Selection.updateGUI(); GenericObjectEditor.registerEditors(); } // main
GenericObjectEditor.registerEditors(); Tag [] tags = { new Tag(1, "First option"),
/** * Main method. Builds up menus and reads from file if one is specified. */ public static void main(String[] args) { weka.core.logging.Logger.log(weka.core.logging.Logger.Level.INFO, "Logging started"); LookAndFeel.setLookAndFeel(); JFrame jf = new JFrame("Bayes Network Editor"); final GUI g = new GUI(); JMenuBar menuBar = g.getMenuBar(); if (args.length > 0) { try { g.readBIFFromFile(args[0]); } catch (IOException ex) { ex.printStackTrace(); } catch (BIFFormatException bf) { bf.printStackTrace(); System.exit(-1); } } jf.setJMenuBar(menuBar); jf.getContentPane().add(g); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jf.setSize(800, 600); jf.setVisible(true); g.m_Selection.updateGUI(); GenericObjectEditor.registerEditors(); } // main
public SettingsEditor(Settings settings, GUIApplication ownerApp) { setLayout(new BorderLayout()); m_settings = settings; m_ownerApp = ownerApp; GenericObjectEditor.registerEditors(); PropertyEditorManager.registerEditor(Color.class, ColorEditor.class); if (m_ownerApp.getPerspectiveManager().getLoadedPerspectives().size() > 0) { setupPerspectiveSelector(); } setupPerspectiveSettings(); add(m_settingsTabs, BorderLayout.CENTER); }
GenericObjectEditor.registerEditors(); Tag [] tags = { new Tag(1, "First option"),
public SettingsEditor(Settings settings, GUIApplication ownerApp) { setLayout(new BorderLayout()); m_settings = settings; m_ownerApp = ownerApp; GenericObjectEditor.registerEditors(); PropertyEditorManager.registerEditor(Color.class, ColorEditor.class); if (m_ownerApp.getPerspectiveManager().getLoadedPerspectives().size() > 0) { setupPerspectiveSelector(); } setupPerspectiveSettings(); add(m_settingsTabs, BorderLayout.CENTER); }
GenericObjectEditor.registerEditors();
GenericObjectEditor.registerEditors();
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class);
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class);
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class);
GenericObjectEditor.registerEditors(); GenericObjectEditor ce = new GenericObjectEditor(true); ce.setClassType(weka.classifiers.Classifier.class);