Package org.eclipse.gef.mvc.fx.domain
Interface IDomain
- All Superinterfaces:
IActivatable
,IAdaptable
,IDisposable
- All Known Implementing Classes:
HistoricizingDomain
A domain represents the collective state of a MVC application. It brings
together a set of
IViewer
s and related IGesture
s to interact
with these. It also holds a reference to the IOperationHistory
and
UndoContext
used by all IGesture
as well as IPolicy
s
(in the IViewer
s) to execute IUndoableOperation
s.-
Property Summary
Properties inherited from interface org.eclipse.gef.common.activate.IActivatable
active
Properties inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adapters
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
IAdaptable.Bound<A extends IAdaptable>
-
Field Summary
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
Modifier and TypeMethodDescriptionvoid
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
.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,
org.eclipse.gef.mvc.fx.gestures.IGesture> Returns theIGesture
s registered at thisIDomain
(viaIAdaptable.setAdapter(TypeToken, Object)
) with theAdapterKey
s used for registration.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.Map<AdapterKey<? extends IViewer>,
IViewer> 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 Details
-
CONTENT_VIEWER_ROLE
The adapter role for the content viewer.- See Also:
-
-
Method Details
-
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:
-
execute
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
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:
-
getTools
@Deprecated 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:
-
getViewers
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:
-
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.
-