public void run() { if (inputMethod != null) { inputMethod.buttonPressed(button, '\0'); } }
public static void mouseReleased() { if ((task != null) && (task.inputMethod != null)) { task.inputMethod.buttonReleased(task.button, '\0'); stop(); } }
public void keyTyped(KeyEvent ev) { if (MIDletBridge.getCurrentMIDlet() == null) { return; } J2SEInputMethod inputMethod = ((J2SEInputMethod) DeviceFactory.getDevice().getInputMethod()); J2SEButton button = inputMethod.getButton(ev); if (button != null) { inputMethod.buttonTyped(button); } }
case TextField.EMAILADDR: case TextField.URL: if (getInputMode() == InputMethod.INPUT_123) { setInputMode(InputMethod.INPUT_ABC_UPPER); } else if (getInputMode() == InputMethod.INPUT_ABC_UPPER) { setInputMode(InputMethod.INPUT_ABC_LOWER); } else if (getInputMode() == InputMethod.INPUT_ABC_LOWER) { setInputMode(InputMethod.INPUT_123); if (!validate(tmp, inputMethodListener.getConstraints())) { return true; if (!validate(tmp, inputMethodListener.getConstraints())) { return true; synchronized (this) { lastButtonCharIndex++; char[] buttonChars = filterConstraints(filterInputMode(button.getChars(getInputMode()))); if (keyChar != '\0') { notify(); if (!validate(editText.toString(), inputMethodListener.getConstraints())) { return false;
Object data = transferable.getTransferData(DataFlavor.stringFlavor); if (data instanceof String) { inputMethod.clipboardPaste((String) data); keyChar = ev.getKeyChar(); J2SEButton button = inputMethod.getButton(ev); if (button != null) { pressedButton = button; inputMethod.buttonPressed(button, keyChar);
inputMethod.buttonReleased(inputMethod.getButton(ev), keyChar);
public J2SEButton getButton(KeyEvent ev) { J2SEButton button = J2SEDeviceButtonsHelper.getButton(ev); if (button != null) { return button; } if (getInputMode() != INPUT_123) { for (Enumeration e = DeviceFactory.getDevice().getButtons().elements(); e.hasMoreElements();) { button = (J2SEButton) e.nextElement(); if (button.isChar(ev.getKeyChar(), getInputMode())) { return button; } } } return null; } }
private DisplayComponent displayComponent = new NoUiDisplayComponent(); private InputMethod inputMethod = new J2SEInputMethod();
if (fireInputMethodListener(button, keyChar)) { eventAlreadyConsumed = true; return;
public void mouseReleased(MouseEvent e) { mouseButtonDown = false; MouseRepeatedTimerTask.stop(); if (pressedButton == null) { return; } if (MIDletBridge.getCurrentMIDlet() == null) { return; } Device device = DeviceFactory.getDevice(); J2SEInputMethod inputMethod = (J2SEInputMethod) device.getInputMethod(); J2SEButton prevOverButton = J2SEDeviceButtonsHelper.getSkinButton(e); if (prevOverButton != null) { inputMethod.buttonReleased(prevOverButton, '\0'); } pressedButton = null; // optimize for some video cards. if (prevOverButton != null) { repaint(prevOverButton.getShape().getBounds()); } else { repaint(); } }
inputMethod.buttonPressed(pressedButton, '\0'); MouseRepeatedTimerTask.schedule(SwingDeviceComponent.this, pressedButton, inputMethod);