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 ofIViewers and relatedIGestures to interact with these. It also holds a reference to theIOperationHistoryandUndoContextused by allIGestureas well asIPolicys (in theIViewers) to executeIUndoableOperations.
-
-
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.StringCONTENT_VIEWER_ROLEThe 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 voidcloseExecutionTransaction(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.java.util.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.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 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, 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 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:
openExecutionTransaction(IGesture)
-
execute
void execute(ITransactionalOperation operation, IProgressMonitor monitor) throws ExecutionException
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
java.util.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:
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 theIGestures registered at thisIDomain(viaIAdaptable.setAdapter(TypeToken, Object)) with theAdapterKeys used for registration.- Returns:
- A
Mapcontaining the registeredIGestures mapped to their respectiveAdapterKeys. - See Also:
IAdaptable.setAdapter(TypeToken, Object)
-
getViewers
java.util.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:
IAdaptable.setAdapter(TypeToken, Object)
-
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.
-
-