D - the Dockable typeDATA - the Dockable data typeE - the Dockable entry typepublic abstract class AbstractDockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>> extends Object implements DockingAreaContainer<D,DATA,E>, AutoCloseable
DockingAreaContainer implementations.ACTIVE_DOCKABLE_PROPERTY_NAME| Constructor and Description |
|---|
AbstractDockingAreaContainer(DockableEntryFactory<D,DATA,E> dockableEntryFactory,
DockableDataFactory<DATA> dockableDataFactory,
ContextManager contextManager)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addDockable(E dockableEntry,
boolean active,
Context... implicitLocalContexts)
Adds a Dockable to this container.
|
void |
addDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
Adds a Dockable set change listener.
|
void |
addDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
Adds a Docking Area set change listener.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
close() |
void |
closeAndUnregisterView(E viewEntry)
Closes and unregisters a view.
|
void |
closeEditors(Class<? extends D> editorType)
Closes all editors of the specified type.
|
protected void |
fireActiveDockableChanged(E oldActiveDockableEntry,
E newActiveDockableEntry)
Fires a property change event for the 'activeDockable' property.
|
protected void |
fireDockableAdded(Set<E> sourceSet,
E dockableEntry)
Fires an elementAdded event to the Dockable
SetChangeListeners. |
protected void |
fireDockableRemoved(Set<E> sourceSet,
E dockableEntry)
Fires an elementRemoved event to the Dockable
SetChangeListeners. |
protected void |
fireDockingAreaAdded(Set<DockingAreaDescriptor> sourceSet,
DockingAreaDescriptor dockingAreaDescriptor)
Fires an elementAdded event to the Docking Area
SetChangeListeners. |
protected void |
fireDockingAreaRemoved(Set<DockingAreaDescriptor> sourceSet,
DockingAreaDescriptor dockingAreaDescriptor)
Fires an elementRemoved event to the Docking Area
SetChangeListeners. |
<T> T |
getContent(D dockable,
Class<T> contentType)
Gets the content of the specified type from the local context of the specified Dockable.
|
DockablePreferences |
getDockablePreferences(D dockable)
Gets the
DockablePreferences for the specified Dockable. |
E |
openAndRegisterNewView(Class<? extends D> viewType,
boolean active,
String displayName,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader)
Opens and registers a new view Dockable.
|
E |
openEditorForContent(Object content,
Class<? extends D> editorType,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader)
Opens an Editor for the specified content.
|
void |
registerDefaultDockablePreferences(Class<?> dockableClass,
DockablePreferences dockablePreferences)
Registers the default
DockablePreferences for the specified Dockable class. |
void |
removeDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
Removes a Dockable set change listener.
|
void |
removeDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
Removes a Docking Area set change listener.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
DockablePreferences |
unregisterDefaultDockablePreferences(Class<?> dockableClass)
Unregisters the default
DockablePreferences for the specified Dockable class. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDockingArea, getActiveDockable, getDefaultEditorAreaId, getDockables, getSortedModifiedDockables, setActiveDockablepublic AbstractDockingAreaContainer(DockableEntryFactory<D,DATA,E> dockableEntryFactory, DockableDataFactory<DATA> dockableDataFactory, ContextManager contextManager)
dockableEntryFactory - the Dockable entry factorydockableDataFactory - the Dockable data factorycontextManager - the context managerpublic boolean addDockable(E dockableEntry, boolean active, Context... implicitLocalContexts)
addDockable in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>dockableEntry - the Dockable entry to addactive - flag if the added Dockable entry should be activeimplicitLocalContexts - a list of implicit local contexts to be associated with the Dockablepublic <T> T getContent(D dockable, Class<T> contentType)
T - the content typedockable - the DockablecontentType - the content typepublic E openAndRegisterNewView(Class<? extends D> viewType, boolean active, String displayName, String icon, org.softsmithy.lib.util.ResourceLoader resourceLoader)
openAndRegisterNewView in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>viewType - the view typeactive - flag if the new view should be set as the active Dockable in this container.displayName - the display name of th the viewicon - the icon name pattern to get icon for the viewresourceLoader - the resource loader to load the iconpublic void closeAndUnregisterView(E viewEntry)
closeAndUnregisterView in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>viewEntry - the view entry for the view to close and unregisterpublic E openEditorForContent(Object content, Class<? extends D> editorType, String icon, org.softsmithy.lib.util.ResourceLoader resourceLoader)
openEditorForContent in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>content - the content for the editor to open/ select.editorType - the type of the Editor. It must provide a constructor which takes the specified content as its single parameter.icon - the icon to use for the EditorresourceLoader - the ResourceLoader to load the iconpublic void closeEditors(Class<? extends D> editorType)
closeEditors in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>editorType - the editor typepublic void registerDefaultDockablePreferences(Class<?> dockableClass, DockablePreferences dockablePreferences)
DockablePreferences for the specified Dockable class.registerDefaultDockablePreferences in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>dockableClass - the Dockable classdockablePreferences - the default DockablePreferencespublic DockablePreferences unregisterDefaultDockablePreferences(Class<?> dockableClass)
DockablePreferences for the specified Dockable class.unregisterDefaultDockablePreferences in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>dockableClass - the Dockable classpublic DockablePreferences getDockablePreferences(D dockable)
DockablePreferences for the specified Dockable.getDockablePreferences in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>dockable - the Dockablepublic final void addDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
addDockingAreaSetChangeListener in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>listener - a Docking Area set change listenerpublic final void removeDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
removeDockingAreaSetChangeListener in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>listener - a Docking Area set change listenerpublic final void addDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
addDockableSetChangeListener in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>listener - a Dockable set change listenerpublic final void removeDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
removeDockableSetChangeListener in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>listener - a Dockable set change listenerprotected final void fireDockingAreaAdded(Set<DockingAreaDescriptor> sourceSet, DockingAreaDescriptor dockingAreaDescriptor)
SetChangeListeners.sourceSet - the source setdockingAreaDescriptor - the Docking Area descriptor which was added to the setprotected final void fireDockingAreaRemoved(Set<DockingAreaDescriptor> sourceSet, DockingAreaDescriptor dockingAreaDescriptor)
SetChangeListeners.sourceSet - the source setdockingAreaDescriptor - the Docking Area descriptor which was removed from the setprotected final void fireDockableAdded(Set<E> sourceSet, E dockableEntry)
SetChangeListeners.sourceSet - the source setdockableEntry - the Dockable entry which was added to the setprotected final void fireDockableRemoved(Set<E> sourceSet, E dockableEntry)
SetChangeListeners.sourceSet - the source setdockableEntry - the Dockable entry which was removed from the setprotected final void fireActiveDockableChanged(E oldActiveDockableEntry, E newActiveDockableEntry)
oldActiveDockableEntry - the previously active Dockable entry if any, else nullnewActiveDockableEntry - the new active Dockable entry if any, else nullpublic final void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener in interface org.softsmithy.lib.beans.Beanpublic final void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener in interface org.softsmithy.lib.beans.Beanpublic void close()
close in interface AutoCloseableCopyright © 2012–2019 Drombler. All rights reserved.