public abstract class AbstractDockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>> extends Object implements DockingAreaContainer<D,DATA,E>, AutoCloseable
ACTIVE_DOCKABLE_PROPERTY_NAME
Constructor and Description |
---|
AbstractDockingAreaContainer(DockableEntryFactory<D,DATA,E> dockableEntryFactory,
DockableDataFactory<DATA> dockableDataFactory) |
Modifier and Type | Method and Description |
---|---|
boolean |
addDockable(E dockableEntry,
boolean active,
Context... implicitLocalContexts) |
void |
addDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener) |
void |
addDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener) |
void |
addImplicitLocalContext(D dockable,
Context... implicitLocalContexts) |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Registers a
PropertyChangeListener for the specified property. |
void |
close() |
protected void |
fireActiveDockableChanged(E oldActiveDockableEntry,
E newActiveDockableEntry) |
protected void |
fireDockableAdded(Set<E> sourceSet,
E dockableEntry) |
protected void |
fireDockableRemoved(Set<E> sourceSet,
E dockableEntry) |
protected void |
fireDockingAreaAdded(Set<DockingAreaDescriptor> sourceSet,
DockingAreaDescriptor dockingAreaDescriptor) |
protected void |
fireDockingAreaRemoved(Set<DockingAreaDescriptor> sourceSet,
DockingAreaDescriptor dockingAreaDescriptor) |
Context |
getActiveContext() |
Context |
getApplicationContext() |
<T> T |
getContent(D dockable,
Class<T> contentType) |
DockablePreferences |
getDockablePreferences(D dockable) |
boolean |
openAndRegisterNewView(D dockable,
boolean active,
String displayName,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader) |
boolean |
openEditorForContent(Object content,
Class<? extends D> editorType,
String icon,
org.softsmithy.lib.util.ResourceLoader resourceLoader)
Opens an Editor for the specified content.
|
boolean |
openView(D dockable,
boolean active) |
void |
registerDefaultDockablePreferences(Class<?> dockableClass,
DockablePreferences dockablePreferences) |
void |
removeDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener) |
void |
removeDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener) |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Unegisters a
PropertyChangeListener for the specified property. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDockingArea, getActiveDockable, getDefaultEditorAreaId, getDockables, getSortedModifiedDockables, setActiveDockable
public AbstractDockingAreaContainer(DockableEntryFactory<D,DATA,E> dockableEntryFactory, DockableDataFactory<DATA> dockableDataFactory)
public Context getActiveContext()
public Context getApplicationContext()
public boolean addDockable(E dockableEntry, boolean active, Context... implicitLocalContexts)
addDockable
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public void addImplicitLocalContext(D dockable, Context... implicitLocalContexts)
public boolean openView(D dockable, boolean active)
openView
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public boolean openAndRegisterNewView(D dockable, 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>>
public boolean 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 registerDefaultDockablePreferences(Class<?> dockableClass, DockablePreferences dockablePreferences)
registerDefaultDockablePreferences
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public DockablePreferences getDockablePreferences(D dockable)
getDockablePreferences
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public final void addDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
addDockingAreaSetChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public final void removeDockingAreaSetChangeListener(org.softsmithy.lib.util.SetChangeListener<DockingAreaDescriptor> listener)
removeDockingAreaSetChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public final void addDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
addDockableSetChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
public final void removeDockableSetChangeListener(org.softsmithy.lib.util.SetChangeListener<E> listener)
removeDockableSetChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
protected final void fireDockingAreaAdded(Set<DockingAreaDescriptor> sourceSet, DockingAreaDescriptor dockingAreaDescriptor)
protected final void fireDockingAreaRemoved(Set<DockingAreaDescriptor> sourceSet, DockingAreaDescriptor dockingAreaDescriptor)
protected final void fireActiveDockableChanged(E oldActiveDockableEntry, E newActiveDockableEntry)
public final void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
for the specified property.addPropertyChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
propertyName
- the property to observelistener
- the PropertyChangeListener to registerpublic final void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
for the specified property.removePropertyChangeListener
in interface DockingAreaContainer<D,DATA extends DockableData,E extends DockableEntry<D,DATA>>
propertyName
- the property to stop to observelistener
- the PropertyChangeListener to unregisterpublic void close()
close
in interface AutoCloseable
Copyright © 2012–2017 Drombler. All rights reserved.