public void mousePressed(MouseEvent evt) { JTextComponent c = component; if (c != null) { Utilities.getEditorUI(c).getWordMatch().clear(); // [PENDING] // should be // done cleanly // Position the cursor at the appropriate place in the document if ((SwingUtilities.isLeftMouseButton(evt) && (evt.getModifiers() & (InputEvent.META_MASK | InputEvent.ALT_MASK)) == 0) || !isSelectionVisible()) { int offset = ((BaseTextUI) c.getUI()).viewToModel(c, evt.getX(), evt.getY()); if (offset >= 0) { if ((evt.getModifiers() & InputEvent.SHIFT_MASK) != 0) { moveDot(offset); } else { setDot(offset); } setMagicCaretPosition(null); } if (c.isEnabled()) { c.requestFocus(); } } } }
public void mousePressed(MouseEvent evt) { JTextComponent c = component; if (c != null) { Utilities.getEditorUI(c).getWordMatch().clear(); // [PENDING] should be done cleanly // Position the cursor at the appropriate place in the document if ((SwingUtilities.isLeftMouseButton(evt) && (evt.getModifiers() & (InputEvent.META_MASK|InputEvent.ALT_MASK)) == 0) || !isSelectionVisible()) { int offset = ((BaseTextUI)c.getUI()).viewToModel(c, evt.getX(), evt.getY()); if (offset >= 0) { if ((evt.getModifiers() & InputEvent.SHIFT_MASK) != 0) { moveDot(offset); } else { setDot(offset); } setMagicCaretPosition(null); } if (c.isEnabled()) { c.requestFocus(); } } } }
String s = editorUI.getWordMatch().getMatchWord(dotPos, direction); String prevWord = editorUI.getWordMatch().getPreviousWord(); if (s != null) { doc.atomicLock();
String s = editorUI.getWordMatch().getMatchWord(dotPos, direction); String prevWord = editorUI.getWordMatch().getPreviousWord(); if (s != null) { doc.atomicLock();
editorUI.getWordMatch().clear(); // reset word
char ch = cmd.charAt(0); if ((ch >= 0x20) && (ch != 0x7F)) { // valid character editorUI.getWordMatch().clear(); // reset word matching
((BaseTextUI) target.getUI()).getEditorUI().getWordMatch().clear();
((BaseTextUI)target.getUI()).getEditorUI().getWordMatch().clear();