mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
rename TextAreaPainter.getCompositionTextpainter() to getCompositionTextPainter()
This commit is contained in:
@@ -100,7 +100,7 @@ public class TextAreaPainter extends JComponent implements TabExpander {
|
||||
/**
|
||||
* Get CompositionTextPainter, creating one if it doesn't exist.
|
||||
*/
|
||||
public CompositionTextPainter getCompositionTextpainter() {
|
||||
public CompositionTextPainter getCompositionTextPainter() {
|
||||
if (compositionTextPainter == null) {
|
||||
compositionTextPainter = new CompositionTextPainter(textArea);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CompositionTextManager {
|
||||
*/
|
||||
public void processCompositionText(AttributedCharacterIterator text, int committed_count) {
|
||||
int layoutCaretPosition = initialCaretPosition + committed_count;
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextpainter();
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextPainter();
|
||||
compositionPainter.setComposedTextLayout(getTextLayout(text, committed_count), layoutCaretPosition);
|
||||
int textLength = text.getEndIndex() - text.getBeginIndex() - committed_count;
|
||||
StringBuilder unCommitedStringBuf = new StringBuilder(textLength);
|
||||
@@ -140,7 +140,7 @@ public class CompositionTextManager {
|
||||
if(committed_count == 0){
|
||||
removeNotCommittedText(text);
|
||||
}
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextpainter();
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextPainter();
|
||||
compositionPainter.invalidateComposedTextLayout(initialCaretPosition + committed_count);
|
||||
prevComposeString = "";
|
||||
isInputProcess = false;
|
||||
|
||||
@@ -194,13 +194,13 @@ public class InputMethodSupport implements InputMethodRequests, InputMethodListe
|
||||
textArea.getInputHandler().handleInputMethodCommit();
|
||||
}
|
||||
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextpainter();
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextPainter();
|
||||
Messages.log("textArea.getCaretPosition() + committed_count: " + (textArea.getCaretPosition() + committedCount));
|
||||
compositionPainter.setComposedTextLayout(getTextLayout(text, committedCount), textArea.getCaretPosition() + committedCount);
|
||||
compositionPainter.setCaret(event.getCaret());
|
||||
|
||||
} else { // otherwise hide the input method
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextpainter();
|
||||
CompositionTextPainter compositionPainter = textArea.getPainter().getCompositionTextPainter();
|
||||
compositionPainter.setComposedTextLayout(null, 0);
|
||||
compositionPainter.setCaret(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user