/** * 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 } }
value = props.getProperty(name, ""); registerEditor(name, value);
/** * 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 } }
value = props.getProperty(name, ""); registerEditor(name, value);