D - the Dockable typeDATA - the Dockable data typeE - the Dockable entry typepublic class DockingManager<D,DATA extends DockableData,E extends DockableEntry<D,DATA>> extends Object implements AutoCloseable
| Constructor and Description |
|---|
DockingManager(DockableEntryFactory<D,DATA,E> dockableEntryFactory,
DockableDataFactory<DATA> dockableDataFactory,
org.softsmithy.lib.util.Injector<? super D>... additionalInjectors)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
containsRegisteredEditor(Object uniqueKey)
Checks if their is a registered editor Dockable for the provided unique key of some content.
|
E |
createAndRegisterViewEntry(Class<? extends D> viewType,
String displayName,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader)
Creates and registers a view
DockableEntry. |
E |
createEditorEntry(Object content,
Class<? extends D> editorType,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader)
Creates an editor
DockableEntry. |
DockablePreferences |
getDockablePreferences(D dockable)
Gets the Dockable preferences for the provided Dockable instance.
|
E |
getRegisteredEditor(Object uniqueKey)
Gets the registered editor Dockable for the provided unique key of some content.
|
void |
registerDefaultDockablePreferences(Class<?> dockableClass,
DockablePreferences dockablePreferences)
Registers the default
DockablePreferences for the provided Dockable class. |
void |
registerEditor(Object uniqueKey,
E dockableEntry)
Registers an editor for an non-null unique key of some content.
|
DockablePreferences |
unregisterDefaultDockablePreferences(Class<?> dockableClass)
Unregisters the default
DockablePreferences for the provided Dockable class. |
void |
unregisterEditor(E editorEntry)
Unregisters an editor Dockable entry.
|
void |
unregisterView(E viewEntry)
Unregisters a view Dockable entry.
|
public DockingManager(DockableEntryFactory<D,DATA,E> dockableEntryFactory, DockableDataFactory<DATA> dockableDataFactory, org.softsmithy.lib.util.Injector<? super D>... additionalInjectors)
dockableEntryFactory - the Dockable entry factorydockableDataFactory - the Dockable data factoryadditionalInjectors - additional injectors to be applied to Dockablespublic boolean containsRegisteredEditor(Object uniqueKey)
uniqueKey - the unique key of some contentpublic E getRegisteredEditor(Object uniqueKey)
uniqueKey - the unique key of some contentpublic E createEditorEntry(Object content, Class<? extends D> editorType, String icon, org.softsmithy.lib.util.ResourceLoader resourceLoader) throws SecurityException, InvocationTargetException, IllegalAccessException, IllegalArgumentException, NoSuchMethodException, InstantiationException
DockableEntry.content - the content to create the editor foreditorType - the editor typeicon - the icon name patternresourceLoader - the resource loader to load the iconSecurityExceptionInvocationTargetExceptionIllegalAccessExceptionIllegalArgumentExceptionNoSuchMethodExceptionInstantiationExceptionDockableKind.EDITORpublic void registerDefaultDockablePreferences(Class<?> dockableClass, DockablePreferences dockablePreferences)
DockablePreferences for the provided Dockable class.dockableClass - the Dockable classdockablePreferences - the default Dockable preferencespublic DockablePreferences unregisterDefaultDockablePreferences(Class<?> dockableClass)
DockablePreferences for the provided Dockable class.dockableClass - the Dockable classpublic DockablePreferences getDockablePreferences(D dockable)
dockable - the Dockable instancepublic E createAndRegisterViewEntry(Class<? extends D> viewType, String displayName, String icon, org.softsmithy.lib.util.ResourceLoader resourceLoader) throws InstantiationException, IllegalAccessException
DockableEntry.viewType - the view typedisplayName - the display name to be used as the titleicon - the icon name patternresourceLoader - the resource loaderInstantiationExceptionIllegalAccessExceptionpublic void registerEditor(Object uniqueKey, E dockableEntry)
uniqueKey - the unique iddockableEntry - the editor Dockable entrypublic void unregisterEditor(E editorEntry) throws Exception
editorEntry - the editor Dockable entry to unregisterExceptionpublic void unregisterView(E viewEntry) throws Exception
viewEntry - the view Dockable entry to unregisterExceptionpublic void close()
close in interface AutoCloseableCopyright © 2012–2019 Drombler. All rights reserved.