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 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
Modifier and Type
Field
Description
`static final 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

Modifier and Type
Method
Description
`void`
`closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)`
Closes the active execution transaction, removes the given `IGesture` 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 given `IUndoableOperation`.
`Map<AdapterKey<? extends org.eclipse.gef.mvc.fx.gestures.IGesture>,org.eclipse.gef.mvc.fx.gestures.IGesture>`
`getGestures()`
Returns the `IGesture`s registered at this `IDomain` (via `IAdaptable.setAdapter(TypeToken, Object)`) with the `AdapterKey`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>`
`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 gesture)`
Returns `true` if the given `IGesture` 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 given `IGesture` to the currently opened transaction for executing operations (via `execute(ITransactionalOperation, IProgressMonitor)`) on the `IOperationHistory` used by this `IDomain`.

### 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

static final String CONTENT_VIEWER_ROLE
The adapter role for the content viewer.

See Also:
  - Constant Field Values

## Method Details

### closeExecutionTransaction

void closeExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Closes the active execution transaction, removes the given `IGesture` from the transaction context, and opens a new execution transaction if there are any gestures remaining in the context.

Parameters:
  `gesture` - The `IGesture` that should be removed from the transaction context.
See Also:
  - `openExecutionTransaction(IGesture)`

### execute

void execute(ITransactionalOperation operation, IProgressMonitor monitor) throws ExecutionException
Executes the given `IUndoableOperation`.

Parameters:
  `operation` - The `IUndoableOperation` to be executed on the `IOperationHistory` of this `IDomain`.
  `monitor` - An `IProgressMonitor` used to indicate progress. May be `null`.
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 the `IGesture`s registered at this `IDomain` (via `IAdaptable.setAdapter(TypeToken, Object)`) with the `AdapterKey`s used for registration.

Returns:
  A `Map` containing the registered `IGesture`s mapped to their respective `AdapterKey`s.
Since:
  5.1
See Also:
  - `IAdaptable.setAdapter(TypeToken, Object)`

### 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 use `getGestures()` instead.
Returns the `IGesture`s registered at this `IDomain` (via `IAdaptable.setAdapter(TypeToken, Object)`) with the `AdapterKey`s used for registration.

Returns:
  A `Map` containing the registered `IGesture`s mapped to their respective `AdapterKey`s.
See Also:
  - `IAdaptable.setAdapter(TypeToken, Object)`

### getViewers

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.

Returns:
  A `Map` containing the registered `IViewer`s mapped to their respective `AdapterKey`s.
See Also:
  - `IAdaptable.setAdapter(TypeToken, Object)`

### isExecutionTransactionOpen

boolean isExecutionTransactionOpen(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
Returns `true` if the given `IGesture` is taking part in the currently open execution transaction. Otherwise returns `false`.

Parameters:
  `gesture` - The `IGesture` that is checked.
Returns:
  `true` if the given `IGesture` is taking part in the currently open execution transaction, otherwise `false`.

### openExecutionTransaction

void openExecutionTransaction(org.eclipse.gef.mvc.fx.gestures.IGesture gesture)
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`.

Parameters:
  `gesture` - The `IGesture` starting/joining the transaction.