< prev index next >

modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassViewEventHandler.java

Print this page

        

*** 458,484 **** PulseLogger.newInput(null); } } } - // TODO: Define these somewhere else. It is Windows specific for now. - private final static byte ATTR_INPUT = 0x00; - private final static byte ATTR_TARGET_CONVERTED = 0x01; - private final static byte ATTR_CONVERTED = 0x02; - private final static byte ATTR_TARGET_NOTCONVERTED = 0x03; - private final static byte ATTR_INPUT_ERROR = 0x04; - private static byte inputMethodEventAttrValue(int pos, int[] attrBoundary, byte[] attrValue) { if (attrBoundary != null) { for (int current = 0; current < attrBoundary.length-1; current++) { if (pos >= attrBoundary[current] && pos < attrBoundary[current+1]) { return attrValue[current]; } } } ! return ATTR_INPUT_ERROR; } private static ObservableList<InputMethodTextRun> inputMethodEventComposed( String text, int commitCount, int[] clauseBoundary, int[] attrBoundary, byte[] attrValue) { --- 458,477 ---- PulseLogger.newInput(null); } } } private static byte inputMethodEventAttrValue(int pos, int[] attrBoundary, byte[] attrValue) { if (attrBoundary != null) { for (int current = 0; current < attrBoundary.length-1; current++) { if (pos >= attrBoundary[current] && pos < attrBoundary[current+1]) { return attrValue[current]; } } } ! return View.IME_ATTR_INPUT_ERROR; } private static ObservableList<InputMethodTextRun> inputMethodEventComposed( String text, int commitCount, int[] clauseBoundary, int[] attrBoundary, byte[] attrValue) {
*** 500,520 **** continue; } InputMethodHighlight highlight; switch (inputMethodEventAttrValue(clauseBoundary[current], attrBoundary, attrValue)) { ! case ATTR_TARGET_CONVERTED: highlight = InputMethodHighlight.SELECTED_CONVERTED; break; ! case ATTR_CONVERTED: highlight = InputMethodHighlight.UNSELECTED_CONVERTED; break; ! case ATTR_TARGET_NOTCONVERTED: highlight = InputMethodHighlight.SELECTED_RAW; break; ! case ATTR_INPUT: ! case ATTR_INPUT_ERROR: default: highlight = InputMethodHighlight.UNSELECTED_RAW; break; } composed.add(new InputMethodTextRun( --- 493,513 ---- continue; } InputMethodHighlight highlight; switch (inputMethodEventAttrValue(clauseBoundary[current], attrBoundary, attrValue)) { ! case View.IME_ATTR_TARGET_CONVERTED: highlight = InputMethodHighlight.SELECTED_CONVERTED; break; ! case View.IME_ATTR_CONVERTED: highlight = InputMethodHighlight.UNSELECTED_CONVERTED; break; ! case View.IME_ATTR_TARGET_NOTCONVERTED: highlight = InputMethodHighlight.SELECTED_RAW; break; ! case View.IME_ATTR_INPUT: ! case View.IME_ATTR_INPUT_ERROR: default: highlight = InputMethodHighlight.UNSELECTED_RAW; break; } composed.add(new InputMethodTextRun(
< prev index next >