public class LivePreviewController extends java.lang.Object implements LivePreview.Delegate, FindUtil.ReplaceDelegate
Modifier and Type | Field and Description |
---|---|
static int |
MATCHES_LIMIT |
protected EditorSearchSession |
myComponent |
protected SearchResults |
mySearchResults |
static int |
USER_ACTIVITY_TRIGGERING_DELAY |
Constructor and Description |
---|
LivePreviewController(SearchResults searchResults,
EditorSearchSession component,
Disposable parentDisposable) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReplace() |
void |
dispose() |
void |
exclude() |
java.lang.String |
getStringToReplace(Editor editor,
FindResult findResult) |
boolean |
isReplaceDenied() |
void |
moveCursor(SearchResults.Direction direction) |
void |
off() |
void |
on() |
void |
performReplace() |
TextRange |
performReplace(FindResult occurrence,
java.lang.String replacement,
Editor editor) |
void |
performReplaceAll() |
void |
setLivePreview(LivePreview livePreview) |
void |
setTrackingDocument(boolean trackingDocument) |
void |
setTrackingSelection(boolean b) |
void |
setUserActivityDelay(int userActivityDelay) |
boolean |
shouldReplace(TextRange range,
java.lang.String replace) |
void |
updateInBackground(FindModel findModel,
boolean allowedToChangedEditorSelection) |
public static final int USER_ACTIVITY_TRIGGERING_DELAY
public static final int MATCHES_LIMIT
protected EditorSearchSession myComponent
protected SearchResults mySearchResults
public LivePreviewController(SearchResults searchResults, EditorSearchSession component, Disposable parentDisposable)
public void setTrackingSelection(boolean b)
public void moveCursor(SearchResults.Direction direction)
public boolean isReplaceDenied()
public void setUserActivityDelay(int userActivityDelay)
public void updateInBackground(FindModel findModel, boolean allowedToChangedEditorSelection)
public java.lang.String getStringToReplace(Editor editor, FindResult findResult) throws FindManager.MalformedReplacementStringException
getStringToReplace
in interface LivePreview.Delegate
FindManager.MalformedReplacementStringException
public TextRange performReplace(FindResult occurrence, java.lang.String replacement, Editor editor)
public boolean shouldReplace(TextRange range, java.lang.String replace)
shouldReplace
in interface FindUtil.ReplaceDelegate
public boolean canReplace()
public void performReplace() throws FindManager.MalformedReplacementStringException
public void exclude()
public void performReplaceAll()
public void setTrackingDocument(boolean trackingDocument)
public void setLivePreview(LivePreview livePreview)
public void dispose()
public void on()
public void off()