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
IViewers and related IGestures to interact
with these. It also holds a reference to the IOperationHistory and
UndoContext used by all IGesture as well as IPolicys
(in the IViewers) to execute IUndoableOperations.-
Property Summary
Properties inherited from interface org.eclipse.gef.common.activate.IActivatable
activeProperties 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
FieldsFields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture) Closes the active execution transaction, removes the givenIGesturefrom the transaction context, and opens a new execution transaction if there are any gestures remaining in the context.voidexecute(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 theIGestures registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys 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 theIViewers registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys used for registration.booleanisExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture gesture) Returnstrueif the givenIGestureis taking part in the currently open execution transaction.voidopenExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture) Opens a new transaction or adds the givenIGestureto the currently opened transaction for executing operations (viaexecute(ITransactionalOperation, IProgressMonitor)) on theIOperationHistoryused by thisIDomain.Methods inherited from interface org.eclipse.gef.common.activate.IActivatable
activate, activeProperty, deactivate, isActiveMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapterMethods 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 givenIGesturefrom the transaction context, and opens a new execution transaction if there are any gestures remaining in the context.- Parameters:
gesture- TheIGesturethat should be removed from the transaction context.- See Also:
-
execute
Executes the givenIUndoableOperation.- Parameters:
operation- TheIUndoableOperationto be executed on theIOperationHistoryof thisIDomain.monitor- AnIProgressMonitorused 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 theIGestures registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys used for registration.- Returns:
- A
Mapcontaining the registeredIGestures mapped to their respectiveAdapterKeys. - 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 theIGestures registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys used for registration.- Returns:
- A
Mapcontaining the registeredIGestures mapped to their respectiveAdapterKeys. - See Also:
-
getViewers
Map<AdapterKey<? extends IViewer>,IViewer> getViewers()Returns theIViewers registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys used for registration.- Returns:
- A
Mapcontaining the registeredIViewers mapped to their respectiveAdapterKeys. - See Also:
-
isExecutionTransactionOpen
boolean isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture gesture) Returnstrueif the givenIGestureis taking part in the currently open execution transaction. Otherwise returnsfalse.- Parameters:
gesture- TheIGesturethat is checked.- Returns:
trueif the givenIGestureis 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 givenIGestureto the currently opened transaction for executing operations (viaexecute(ITransactionalOperation, IProgressMonitor)) on theIOperationHistoryused by thisIDomain.- Parameters:
gesture- TheIGesturestarting/joining the transaction.
-