Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.plugin.editing.TextEditingDelta Class Reference

Public Member Functions

 TextEditingDelta ( @NonNull CharSequence oldEditable, int replacementDestinationStart, int replacementDestinationEnd, @NonNull CharSequence replacementSource, int selectionStart, int selectionEnd, int composingStart, int composingEnd)
 
 TextEditingDelta ( @NonNull CharSequence oldText, int selectionStart, int selectionEnd, int composingStart, int composingEnd)
 
CharSequence getOldText ()
 
CharSequence getDeltaText ()
 
int getDeltaStart ()
 
int getDeltaEnd ()
 
int getNewSelectionStart ()
 
int getNewSelectionEnd ()
 
int getNewComposingStart ()
 
int getNewComposingEnd ()
 
JSONObject toJSON ()
 

Detailed Description

A representation of the change that occured to an editing state, along with the resulting composing and selection regions.

Definition at line 15 of file TextEditingDelta.java.

Constructor & Destructor Documentation

◆ TextEditingDelta() [1/2]

io.flutter.plugin.editing.TextEditingDelta.TextEditingDelta ( @NonNull CharSequence  oldEditable,
int  replacementDestinationStart,
int  replacementDestinationEnd,
@NonNull CharSequence  replacementSource,
int  selectionStart,
int  selectionEnd,
int  composingStart,
int  composingEnd 
)
inline

Definition at line 27 of file TextEditingDelta.java.

35 {
36 newSelectionStart = selectionStart;
37 newSelectionEnd = selectionEnd;
38 newComposingStart = composingStart;
39 newComposingEnd = composingEnd;
40
41 setDeltas(
42 oldEditable,
43 replacementSource.toString(),
44 replacementDestinationStart,
45 replacementDestinationEnd);
46 }

◆ TextEditingDelta() [2/2]

io.flutter.plugin.editing.TextEditingDelta.TextEditingDelta ( @NonNull CharSequence  oldText,
int  selectionStart,
int  selectionEnd,
int  composingStart,
int  composingEnd 
)
inline

Definition at line 49 of file TextEditingDelta.java.

54 {
55 newSelectionStart = selectionStart;
56 newSelectionEnd = selectionEnd;
57 newComposingStart = composingStart;
58 newComposingEnd = composingEnd;
59
60 setDeltas(oldText, "", -1, -1);
61 }

Member Function Documentation

◆ getDeltaEnd()

int io.flutter.plugin.editing.TextEditingDelta.getDeltaEnd ( )
inline

Definition at line 81 of file TextEditingDelta.java.

81 {
82 return deltaEnd;
83 }

◆ getDeltaStart()

int io.flutter.plugin.editing.TextEditingDelta.getDeltaStart ( )
inline

Definition at line 76 of file TextEditingDelta.java.

76 {
77 return deltaStart;
78 }

◆ getDeltaText()

CharSequence io.flutter.plugin.editing.TextEditingDelta.getDeltaText ( )
inline

Definition at line 71 of file TextEditingDelta.java.

71 {
72 return deltaText;
73 }

◆ getNewComposingEnd()

int io.flutter.plugin.editing.TextEditingDelta.getNewComposingEnd ( )
inline

Definition at line 101 of file TextEditingDelta.java.

101 {
102 return newComposingEnd;
103 }

◆ getNewComposingStart()

int io.flutter.plugin.editing.TextEditingDelta.getNewComposingStart ( )
inline

Definition at line 96 of file TextEditingDelta.java.

96 {
97 return newComposingStart;
98 }

◆ getNewSelectionEnd()

int io.flutter.plugin.editing.TextEditingDelta.getNewSelectionEnd ( )
inline

Definition at line 91 of file TextEditingDelta.java.

91 {
92 return newSelectionEnd;
93 }

◆ getNewSelectionStart()

int io.flutter.plugin.editing.TextEditingDelta.getNewSelectionStart ( )
inline

Definition at line 86 of file TextEditingDelta.java.

86 {
87 return newSelectionStart;
88 }

◆ getOldText()

CharSequence io.flutter.plugin.editing.TextEditingDelta.getOldText ( )
inline

Definition at line 65 of file TextEditingDelta.java.

65 {
66 return oldText;
67 }

◆ toJSON()

JSONObject io.flutter.plugin.editing.TextEditingDelta.toJSON ( )
inline

Definition at line 114 of file TextEditingDelta.java.

114 {
115 JSONObject delta = new JSONObject();
116
117 try {
118 delta.put("oldText", oldText.toString());
119 delta.put("deltaText", deltaText.toString());
120 delta.put("deltaStart", deltaStart);
121 delta.put("deltaEnd", deltaEnd);
122 delta.put("selectionBase", newSelectionStart);
123 delta.put("selectionExtent", newSelectionEnd);
124 delta.put("composingBase", newComposingStart);
125 delta.put("composingExtent", newComposingEnd);
126 } catch (JSONException e) {
127 Log.e(TAG, "unable to create JSONObject: " + e);
128 }
129
130 return delta;
131 }
void Log(const char *format,...) SK_PRINTF_LIKE(1
Definition: TestRunner.cpp:137

The documentation for this class was generated from the following file: