Interface IEditingSupport
-
public interface IEditingSupportImplemented by tools supporting the editing process.Clients may ask an
IEditingSupportwhether it is currently displaying a shell that has focus, and whether it is the origin of a document event. Depending on the answers to these queries, clients may decide to react differently to incoming notifications about events. For example, a special editing mode, that usually deactivates when the main shell looses focus, may decide to not deactivate if the focus event was triggered by anIEditingSupport.Clients may implement this interface.
- Since:
- 3.1
- See Also:
IEditingSupportRegistry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisOriginator(DocumentEvent event, IRegion subjectRegion)Returnstrueif the receiver is the originator of aDocumentEventand if thateventis related tosubjectRegion.booleanownsFocusShell()Returnstrueif the receiver is showing a shell which has focus,falseif it does not have focus or the helper has no shell.
-
-
-
Method Detail
-
isOriginator
boolean isOriginator(DocumentEvent event, IRegion subjectRegion)
Returnstrueif the receiver is the originator of aDocumentEventand if thateventis related tosubjectRegion.The relationship between
eventandsubjectRegionis not always obvious. Often, the main editing area being monitored by the caller will be atsubjectRegion, when the receiver modifies the underlying document at a different location without wanting to interrupt the normal typing flow of the user.An example would be an editor that automatically increments the section number of the next section when the user typed in a new section title. In this example, the subject region is the current typing location, while the increment results in a document change further down in the text.
- Parameters:
event- theDocumentEventin questionsubjectRegion- the region that the caller is interested in- Returns:
trueifeventwas triggered by the receiver and relates tosubjectRegion
-
ownsFocusShell
boolean ownsFocusShell()
Returnstrueif the receiver is showing a shell which has focus,falseif it does not have focus or the helper has no shell.- Returns:
trueif the support's shell has focus,falseotherwise
-
-