public class PreferenceEditorFactory extends Object
Modifier and Type | Method and Description |
---|---|
static PreferenceEditor |
getEditor(PreferenceSection co,
HashSet<PreferenceEditor.PROPERTY> props)
Creates a new instance of an editor.
|
static void |
registerEditor(String type,
PreferenceEditor editor)
Register a new editor.
|
public static PreferenceEditor getEditor(PreferenceSection co, HashSet<PreferenceEditor.PROPERTY> props) throws PreferenceException
co
- the PreferenceSection for which the editor has to be createdprops
- the set of properties to apply to the editorPreferenceException
public static void registerEditor(String type, PreferenceEditor editor)
type
- is an editor type. It can be one of PreferenceEditor.TYPE values or a user defined
new string. In the former case, framework-defined default editor will be replaced by the one passed
in with argument editor.editor
- a instance of an editor. Please note that this instance will not be returned when calling
getEditor(PreferenceSection,HashSet<PreferenceEditor.PROPERTIES>) factory. Instead, the factory will
use method newInstance() as defined by PreferenceEditor interface to always return a fresh
instance of the editor.Plealog Software - 2003-2017