Class AbstractAdaptedFactory.AbstractAdaptedModel<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedModel<M>,F extends AbstractAdaptedFactory<R,O,M,E,A>>
- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory.AbstractAdaptedModel<R,O,M,E,A,F>
-
- All Implemented Interfaces:
AdaptedModel<M>
- Direct Known Subclasses:
AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable
,AdaptedConnectionFactory.AdaptedConnectionImpl
- Enclosing class:
- AbstractAdaptedFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedModel<M>>
protected abstract static class AbstractAdaptedFactory.AbstractAdaptedModel<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedModel<M>,F extends AbstractAdaptedFactory<R,O,M,E,A>> extends java.lang.Object implements AdaptedModel<M>
Builder to create theAbstractAdaptedFactory
for a particularModel
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAdaptedModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ChangeExecutor
getChangeExecutor()
Obtains theChangeExecutor
.AdaptedErrorHandler
getErrorHandler()
Obtains theAdaptedErrorHandler
.protected F
getFactory()
Obtains theAbstractAdaptedFactory
.com.google.inject.Injector
getInjector()
Obtains theInjector
.M
getModel()
Obtains theModel
.O
getOperations()
Obtains the operations.AdaptedModel<?>
getParent()
Obtains the parentAdaptedModel
.R
getRootModel()
Obtains the rootModel
.protected abstract void
init()
Initialises thisAdaptedModel
.M
position(M model)
Positions the model.void
refreshContent()
Triggers refreshing the contentModel
instances.protected void
registerEventListener(E[] events, java.beans.PropertyChangeListener listener)
Registers an event listener.
-
-
-
Method Detail
-
init
protected abstract void init()
Initialises thisAdaptedModel
.
-
getModel
public M getModel()
Description copied from interface:AdaptedModel
Obtains theModel
.- Specified by:
getModel
in interfaceAdaptedModel<R extends Model>
- Returns:
Model
.
-
getParent
public AdaptedModel<?> getParent()
Description copied from interface:AdaptedModel
Obtains the parentAdaptedModel
.- Specified by:
getParent
in interfaceAdaptedModel<R extends Model>
- Returns:
- Parent
AdaptedModel
ornull
ifAdaptedParent
.
-
getErrorHandler
public AdaptedErrorHandler getErrorHandler()
Description copied from interface:AdaptedModel
Obtains theAdaptedErrorHandler
.- Specified by:
getErrorHandler
in interfaceAdaptedModel<R extends Model>
- Returns:
AdaptedErrorHandler
.
-
getFactory
protected F getFactory()
Obtains theAbstractAdaptedFactory
.- Returns:
AbstractAdaptedFactory
.
-
getOperations
public O getOperations()
Obtains the operations.- Returns:
- Operations.
-
refreshContent
public void refreshContent()
Triggers refreshing the contentModel
instances. This includes theConnectionModel
instances.
-
getInjector
public com.google.inject.Injector getInjector()
Obtains theInjector
.- Returns:
Injector
.
-
getChangeExecutor
public ChangeExecutor getChangeExecutor()
Obtains theChangeExecutor
.- Returns:
ChangeExecutor
.
-
registerEventListener
protected void registerEventListener(E[] events, java.beans.PropertyChangeListener listener)
Registers an event listener.- Parameters:
events
- Events to listen on.listener
-PropertyChangeListener
for the events.
-
-