equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
509 String flush = (committedText != null ? committedText : ""); |
509 String flush = (committedText != null ? committedText : ""); |
510 if (composedText != null) { |
510 if (composedText != null) { |
511 flush += composedText.toString(); |
511 flush += composedText.toString(); |
512 } |
512 } |
513 |
513 |
514 if (!flush.equals("")) { |
514 if (!flush.isEmpty()) { |
515 AttributedString attrstr = new AttributedString(flush); |
515 AttributedString attrstr = new AttributedString(flush); |
516 postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, |
516 postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, |
517 attrstr.getIterator(), |
517 attrstr.getIterator(), |
518 flush.length(), |
518 flush.length(), |
519 null, |
519 null, |