Package de.lessvoid.nifty.input

Examples of de.lessvoid.nifty.input.NiftyInputMapping


    Screen screen = new Screen(nifty, id, screenController, timeProvider);
    screen.setDefaultFocusElement(getAttributes().get("defaultFocusElement"));

    String inputMappingClass = getAttributes().get("inputMapping");
    if (inputMappingClass != null) {
      NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
      if (!(screenController instanceof KeyInputHandler)) {
        log.info("class [" + controller + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
      } else {
        screen.addKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
      }
    }
    String inputMappingPreClass = getAttributes().get("inputMappingPre");
    if (inputMappingPreClass != null) {
      NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingPreClass, NiftyInputMapping.class);
      if (!(screenController instanceof KeyInputHandler)) {
        log.info("class [" + controller + "] tries to use inputMapping [" + inputMappingPreClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
      } else {
        screen.addPreKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
      }
View Full Code Here


    String inputMappingClass = controlDefinitionAttributes.get("inputMapping");
    if (inputMappingClass == null) {
      inputMappingClass = DefaultInputMapping.class.getName();
    }

    NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
    return new NiftyInputControl(controller, inputMapping);
  }
View Full Code Here

    screen.setDefaultFocusElement(defaultFocusElement);
  }

  private void addInputMapping(final Screen screen, final String inputMappingClass) {
    if (inputMappingClass != null) {
      NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
      if (!(screenController instanceof KeyInputHandler)) {
        log.info("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
      } else {
        screen.addKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
      }
View Full Code Here

    }
  }

  private void addPreInputMapping(final Screen screen, final String inputMappingClass) {
    if (inputMappingClass != null) {
      NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
      if (!(screenController instanceof KeyInputHandler)) {
        log.info("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
      } else {
        screen.addPreKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
      }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.input.NiftyInputMapping

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.