public interface IDomain extends IAdaptable, IActivatable, IDisposable
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.adapters
active
IAdaptable.Bound<A extends IAdaptable>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTENT_VIEWER_ROLE
The adapter role for the content viewer.
|
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
Modifier and Type | Method and Description |
---|---|
void |
closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
Closes the active execution transaction, removes the given
IGesture
from the transaction context, and opens a new execution transaction if
there are any tools remaining in the context. |
void |
execute(ITransactionalOperation operation,
IProgressMonitor monitor)
Executes the given
IUndoableOperation . |
java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture> |
getTools()
Returns the
IGesture s registered at this IDomain (via
IAdaptable.setAdapter(TypeToken, Object) ) with the AdapterKey s used
for registration. |
java.util.Map<AdapterKey<? extends IViewer>,IViewer> |
getViewers()
Returns the
IViewer s registered at this IDomain (via
IAdaptable.setAdapter(TypeToken, Object) ) with the AdapterKey s used
for registration. |
boolean |
isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
Returns
true if the given IGesture is taking part in
the currently open execution transaction. |
void |
openExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
Opens a new transaction or adds the given
IGesture to the currently
opened transaction for executing operations (via
execute(ITransactionalOperation, IProgressMonitor) ) on the
IOperationHistory used by this IDomain . |
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
activate, activeProperty, deactivate, isActive
dispose
static final java.lang.String CONTENT_VIEWER_ROLE
void closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
IGesture
from the transaction context, and opens a new execution transaction if
there are any tools remaining in the context.tool
- The IGesture
that should be removed from the transaction
context.openExecutionTransaction(IGesture)
void execute(ITransactionalOperation operation, IProgressMonitor monitor) throws ExecutionException
IUndoableOperation
.operation
- The IUndoableOperation
to be executed on the
IOperationHistory
of this IDomain
.monitor
- An IProgressMonitor
used to indicate progress. May be
null
.ExecutionException
- In case an exception occurred during the execution of the
operation.java.util.Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture> getTools()
IGesture
s registered at this IDomain
(via
IAdaptable.setAdapter(TypeToken, Object)
) with the AdapterKey
s used
for registration.Map
containing the registered IGesture
s mapped to
their respective AdapterKey
s.IAdaptable.setAdapter(TypeToken, Object)
java.util.Map<AdapterKey<? extends IViewer>,IViewer> getViewers()
IViewer
s registered at this IDomain
(via
IAdaptable.setAdapter(TypeToken, Object)
) with the AdapterKey
s used
for registration.Map
containing the registered IViewer
s mapped
to their respective AdapterKey
s.IAdaptable.setAdapter(TypeToken, Object)
boolean isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
true
if the given IGesture
is taking part in
the currently open execution transaction. Otherwise returns
false
.tool
- The IGesture
that is checked.true
if the given IGesture
is taking part in
the currently open execution transaction, otherwise
false
.void openExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture tool)
IGesture
to the currently
opened transaction for executing operations (via
execute(ITransactionalOperation, IProgressMonitor)
) on the
IOperationHistory
used by this IDomain
.tool
- The IGesture
starting/joining the transaction.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.