com.partnersoft.editor.browser
Class CodexBrowserConfig
java.lang.Object
com.partnersoft.editor.browser.CodexBrowserConfig
public class CodexBrowserConfig
- extends java.lang.Object
CodexBrowserConfig does a lot of weird things with generics, the gist of which is that
the Class objects that you pass into the add*EditorFactory() methods
must be subclasses of the right interfaces. Passing in untyped Class
objects isn't type-safe or documented. Factory interfaces are too verbose.
Using some of the less obvious features of generics gives us the benefits of
type safety without the clutter of factory interfaces, although it does make
this code ugly and hard to read.
- Author:
- Russell Cagle
Copyright 2006 Partner Software, Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CodexBrowserConfig
public CodexBrowserConfig(EditorApp app)
addCodexEditorFactory
public <T extends CodexEditor> void addCodexEditorFactory(CodexType codexType,
java.lang.Class<T> codexEditorClass)
addResourceEditorFactory
public <T extends CodexResourceModelEditor,U extends CodexResourceModel> void addResourceEditorFactory(CodexType codexType,
java.lang.String pattern,
java.lang.Class<U> modelClass,
java.lang.Class<T> factoryClass)
addSectionEditorFactory
public <T extends CodexSectionEditor> void addSectionEditorFactory(CodexType codexType,
java.lang.String pattern,
java.lang.Class<T> sectionEditorClass)
createCodexEditor
public CodexEditor createCodexEditor(Codex codex)
createHome
public WorkspaceEditor createHome()
createResourceEditor
public CodexResourceModelEditor createResourceEditor(CodexResource resource,
CodexResourceModel model)
createSectionEditor
public CodexBrowserPage createSectionEditor(CodexSection section)
setHomeBuilder
public <T extends WorkspaceEditor> void setHomeBuilder(java.lang.Class<T> homeBuilder)