Package org.eclipse.gef.mvc.fx.domain
Interface IDomain
-
- All Superinterfaces:
IActivatable
,IAdaptable
,IDisposable
- All Known Implementing Classes:
HistoricizingDomain
public interface IDomain extends IAdaptable, IActivatable, IDisposable
A domain represents the collective state of a MVC application. It brings together a set ofIViewer
s and relatedIGesture
s to interact with these. It also holds a reference to theIOperationHistory
andUndoContext
used by allIGesture
as well asIPolicy
s (in theIViewer
s) to executeIUndoableOperation
s.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
IAdaptable.Bound<A extends IAdaptable>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONTENT_VIEWER_ROLE
The adapter role for the content viewer.-
Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTY
-
Fields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Closes the active execution transaction, removes the givenIGesture
from the transaction context, and opens a new execution transaction if there are any gestures remaining in the context.void
execute(ITransactionalOperation operation, IProgressMonitor monitor)
Executes the givenIUndoableOperation
.java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture>
getGestures()
Returns theIGesture
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture>
getTools()
Deprecated.Will be removed in 6.0.0.java.util.Map<AdapterKey<? extends IViewer>,IViewer>
getViewers()
Returns theIViewer
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.boolean
isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Returnstrue
if the givenIGesture
is taking part in the currently open execution transaction.void
openExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Opens a new transaction or adds the givenIGesture
to the currently opened transaction for executing operations (viaexecute(ITransactionalOperation, IProgressMonitor)
) on theIOperationHistory
used by thisIDomain
.-
Methods inherited from interface org.eclipse.gef.common.activate.IActivatable
activate, activeProperty, deactivate, isActive
-
Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
-
Methods inherited from interface org.eclipse.gef.common.dispose.IDisposable
dispose
-
-
-
-
Field Detail
-
CONTENT_VIEWER_ROLE
static final java.lang.String CONTENT_VIEWER_ROLE
The adapter role for the content viewer.- See Also:
- Constant Field Values
-
-
Method Detail
-
closeExecutionTransaction
void closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Closes the active execution transaction, removes the givenIGesture
from the transaction context, and opens a new execution transaction if there are any gestures remaining in the context.- Parameters:
gesture
- TheIGesture
that should be removed from the transaction context.- See Also:
openExecutionTransaction(IGesture)
-
execute
void execute(ITransactionalOperation operation, IProgressMonitor monitor) throws ExecutionException
Executes the givenIUndoableOperation
.- Parameters:
operation
- TheIUndoableOperation
to be executed on theIOperationHistory
of thisIDomain
.monitor
- AnIProgressMonitor
used to indicate progress. May benull
.- Throws:
ExecutionException
- In case an exception occurred during the execution of the operation.
-
getGestures
java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture> getGestures()
Returns theIGesture
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.- Returns:
- A
Map
containing the registeredIGesture
s mapped to their respectiveAdapterKey
s. - Since:
- 5.1
- See Also:
IAdaptable.setAdapter(TypeToken, Object)
-
getTools
@Deprecated java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture> getTools()
Deprecated.Will be removed in 6.0.0. Please usegetGestures()
instead.Returns theIGesture
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.- Returns:
- A
Map
containing the registeredIGesture
s mapped to their respectiveAdapterKey
s. - See Also:
IAdaptable.setAdapter(TypeToken, Object)
-
getViewers
java.util.Map<AdapterKey<? extends IViewer>,IViewer> getViewers()
Returns theIViewer
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.- Returns:
- A
Map
containing the registeredIViewer
s mapped to their respectiveAdapterKey
s. - See Also:
IAdaptable.setAdapter(TypeToken, Object)
-
isExecutionTransactionOpen
boolean isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Returnstrue
if the givenIGesture
is taking part in the currently open execution transaction. Otherwise returnsfalse
.- Parameters:
gesture
- TheIGesture
that is checked.- Returns:
true
if the givenIGesture
is taking part in the currently open execution transaction, otherwisefalse
.
-
openExecutionTransaction
void openExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Opens a new transaction or adds the givenIGesture
to the currently opened transaction for executing operations (viaexecute(ITransactionalOperation, IProgressMonitor)
) on theIOperationHistory
used by thisIDomain
.- Parameters:
gesture
- TheIGesture
starting/joining the transaction.
-
-