Package jcurses.system

Examples of jcurses.system.InputChar


    }
  }
 
 
  private void drawShortCutIfNeeded() {
    InputChar shortCut = getShortCut();
    if (shortCut != null) {
      String c = shortCut.toString();
      if (_label != null) {
        int index = _label.toLowerCase().indexOf(c.toLowerCase());
        if (index!=-1) {
          String c1 = _label.substring(index,index+1);
          Toolkit.printString(c1, getAbsoluteX()+index+2, getAbsoluteY(), getShortCutColors());
View Full Code Here


    *  Set's button's shortcut char. If this shortcut is typed, than
    * the button will handle the char, as described by <code>Widget</code>, and generate
    * an Event as whether the button would be 'clicked'.
    */
  public void setShortCut(char c) {
    _shortCut = new InputChar(c);
  }
View Full Code Here

  private InputHandler handler;

  public BasicWindow() {
    super(Toolkit.getScreenWidth(), Toolkit.getScreenHeight(), false, "");
    setShadow(false);
    setClosingChar(new InputChar(0));
    getRootPanel().setColors(ColorList.lookup(ColourPair.BLACK_ON_WHITE));
  }
View Full Code Here

    System.exit(-1);
    return true;
  }

  public Collection<KeyBinding> getDescription() {
    return Collections.singleton(new KeyBinding(new InputChar('q'), "General", "Quit"));
  }
View Full Code Here

    return false;
  }

  public Collection<KeyBinding> getDescription() {
    return Arrays.asList(
        new KeyBinding(new InputChar(InputChar.KEY_PPAGE), "Movement", "Page Up"),
        new KeyBinding(new InputChar(InputChar.KEY_NPAGE), "Movement", "Page Down"),
        new KeyBinding(new InputChar(InputChar.KEY_HOME), "Movement", "Start of File"),
        new KeyBinding(new InputChar(InputChar.KEY_END), "Movement", "End of File")
      );
  }
View Full Code Here

   
    return true;
  }

  public Collection<KeyBinding> getDescription() {
    return Collections.singleton(new KeyBinding(new InputChar('h'), "General", "Help"));
  }
View Full Code Here

  private InputHandler handler;

  public BasicWindow() {
    super(Toolkit.getScreenWidth(), Toolkit.getScreenHeight(), false, "");
    setShadow(false);
    setClosingChar(new InputChar(0));
    getRootPanel().setColors(ColorList.blackOnWhite);
  }
View Full Code Here

  private boolean _read = true;
 
  public void run() {
    while(isRunning()) {
      if (isReading()) {
        InputChar inputChar =  Toolkit.readCharacter();
        WindowManager.handleInput(inputChar);
      }
    }
  }
View Full Code Here

 
  protected void block(WindowManagerBlockingCondition cond) {
    Toolkit.endPainting();
    while(cond.evaluate() && isRunning()) {
      if (isReading()) {
        InputChar inputChar =  Toolkit.readCharacter();
        WindowManager.handleInput(inputChar);
      }
    }
  }
View Full Code Here

    }
  }

  public Collection<KeyBinding> getDescription() {
    return Arrays.asList(
        new KeyBinding(new InputChar('/'), "Search", "New Search"),
        new KeyBinding(new InputChar('n'), "Search", "Next Match"),
        new KeyBinding(new InputChar('p'), "Search", "Previous Match")
      );
  }
View Full Code Here

TOP

Related Classes of jcurses.system.InputChar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.