Codota Logo
InputMethodListener.getText
Code IndexAdd Codota to your IDE (free)

How to use
getText
method
in
org.microemu.device.InputMethodListener

Best Java code snippets using org.microemu.device.InputMethodListener.getText (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.microemu/microemu-javase-swing

public void clipboardPaste(String str) {
  if (inputMethodListener != null && inputMethodListener.getText() != null
      && ((inputMethodListener.getText().length() + str.length()) <= maxSize)) {
    insertText(str);
  }
  eventAlreadyConsumed = true;
}
origin: org.microemu/microemu-javase

public void run() 
{
  while (!cancel) {
    try {
      resetKey = true;
      synchronized (this) {
        wait(1500);
      }
    } catch (InterruptedException ex) {
    }
    synchronized (this) {
      if (resetKey && lastButton != null && inputMethodListener != null) {
        int caret = inputMethodListener.getCaretPosition() + 1;
        if (caret <= inputMethodListener.getText().length()) {
          lastButton = null;
          lastButtonCharIndex = -1;
          InputMethodEvent event = new InputMethodEvent(InputMethodEvent.CARET_POSITION_CHANGED, caret, inputMethodListener.getText());
          inputMethodListener.caretPositionChanged(event);
        }
      }
    }
  }
}

origin: org.microemu/microemu-javase

protected void insertText(String str) {
  if (str.length() > 0) {
    int caret = inputMethodListener.getCaretPosition();
    String tmp = "";
    synchronized (this) {
      if (lastButton != null) {
        caret++;
        lastButton = null;
        lastButtonCharIndex = -1;
      }
      if (caret > 0) {
        tmp += inputMethodListener.getText().substring(0, caret);
      }
      tmp += str;
      if (caret < inputMethodListener.getText().length()) {
        tmp += inputMethodListener.getText().substring(caret);
      }
      caret += str.length();
    }
    if (!validate(tmp, inputMethodListener.getConstraints())) {
      return;
    }
    InputMethodEvent event = new InputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, caret, tmp);
    inputMethodListener.inputMethodTextChanged(event);
    event = new InputMethodEvent(InputMethodEvent.CARET_POSITION_CHANGED, caret, tmp);
    inputMethodListener.caretPositionChanged(event);
  }
}
origin: org.microemu/microemu-javase-swt

if (inputMethodListener.getText().length() < maxSize) {
  for (Enumeration e = DeviceFactory.getDevice().getButtons().elements(); e.hasMoreElements();) {
    SwtButton button = (SwtButton) e.nextElement();
    if (ev.keyCode == button.getKeyCode()) {
      int caret = inputMethodListener.getCaretPosition();
      String tmp = inputMethodListener.getText();
      synchronized (this) {
        lastButtonCharIndex++;
              tmp += inputMethodListener.getText().substring(0, caret);
            if (caret < inputMethodListener.getText().length()) {
              tmp += inputMethodListener.getText().substring(caret);
            tmp = "";
            if (caret > 0) {
              tmp += inputMethodListener.getText().substring(0, caret);
            if (caret < inputMethodListener.getText().length() - 1) {
              tmp += inputMethodListener.getText().substring(caret + 1);
origin: org.microemu/microemu-javase-swt

    caret--;
  if (getGameAction(keyCode) == Canvas.RIGHT && caret < inputMethodListener.getText().length()) {
    caret++;
  lastButtonCharIndex = -1;
InputMethodEvent event = new InputMethodEvent(InputMethodEvent.CARET_POSITION_CHANGED, caret, inputMethodListener.getText());
inputMethodListener.caretPositionChanged(event);
return true;
String tmp = inputMethodListener.getText();
synchronized (this) {
  if (lastButton != null) {
    tmp = "";
    if (caret > 0) {
      tmp += inputMethodListener.getText().substring(0, caret);
    if (caret < inputMethodListener.getText().length() - 1) {
      tmp += inputMethodListener.getText().substring(caret + 1);
String tmp = inputMethodListener.getText();
synchronized (this) {
  if (lastButton != null) {
  if (caret != inputMethodListener.getText().length()) {
    tmp = inputMethodListener.getText().substring(0, caret) + inputMethodListener.getText().substring(caret + 1);
origin: org.microemu/microemu-javase-swing

        inputMethodListener.getText());
    inputMethodListener.caretPositionChanged(event);
    break;
    if ((functionalName == ButtonName.LEFT) && caret > 0) {
      caret--;
    } else if ((functionalName == ButtonName.RIGHT) && caret < inputMethodListener.getText().length()) {
      caret++;
      inputMethodListener.getText());
  inputMethodListener.caretPositionChanged(event);
  return true;
      caret--;
      if (caret > 0) {
        tmp += inputMethodListener.getText().substring(0, caret);
      if (caret < inputMethodListener.getText().length() - 1) {
        tmp += inputMethodListener.getText().substring(caret + 1);
  String tmp = inputMethodListener.getText();
  synchronized (this) {
    if (lastButton != null) {
    if (caret != inputMethodListener.getText().length()) {
      tmp = inputMethodListener.getText().substring(0, caret)
          + inputMethodListener.getText().substring(caret + 1);
if (inputMethodListener.getText().length() < maxSize) {
origin: org.microemu/microemu-javase-swt

if (inputMethodListener.getText().length() < maxSize && (ev.keyCode & SWT.EMBEDDED) == 0) {
  insertText(new Character(ev.character).toString());
org.microemu.deviceInputMethodListenergetText

Popular methods of InputMethodListener

  • caretPositionChanged
  • getCaretPosition
  • getConstraints
  • inputMethodTextChanged

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • startActivity (Activity)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • JTextField (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now