Package org.mt4j.input.inputProcessors.globalProcessors

Examples of org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor


   * @param evtToFire the evt to fire
   */
  private void sendEvtToSceneProcessors(Iscene scene, AbstractCursorInputEvt evtToFire){
    AbstractGlobalInputProcessor[] sceneInputProcessors = this.getInputManager().getGlobalInputProcessors(scene);
    for (int i = 0; i < sceneInputProcessors.length; i++) {
      AbstractGlobalInputProcessor a = sceneInputProcessors[i];
      //Hack, because processInputEvt() is disabled at this moment! -> not anymore..
//      a.processInputEvtImpl(evtToFire);
      a.processInputEvent(evtToFire);
    }
  }
View Full Code Here


    if (!registeredInputSources.contains(newInputSource)){
      registeredInputSources.add(newInputSource);
      //Add all processors to the new input source
      Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet();
      for (Iterator<AbstractGlobalInputProcessor> iter = set.iterator(); iter.hasNext();) {
        AbstractGlobalInputProcessor processor = (AbstractGlobalInputProcessor) iter.next();
        //newInputSource.addInputListener(processor);
        this.saveAddInputListenerToSource(newInputSource, processor);
      }
     
      //Inform the input source that it is now registered with the application
View Full Code Here

  public AbstractGlobalInputProcessor[] getGlobalInputProcessors(Iscene scene){
    List<AbstractGlobalInputProcessor> processors = new ArrayList<AbstractGlobalInputProcessor>();
   
    Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet();
    for (Iterator<AbstractGlobalInputProcessor> iter = set.iterator(); iter.hasNext();) {
      AbstractGlobalInputProcessor processor = (AbstractGlobalInputProcessor) iter.next();
     
      if (inputProcessorsToScene.get(processor).equals(scene)){
        processors.add(processor)
      }
    }
View Full Code Here

   * @param scene the scene
   */
  public void enableGlobalInputProcessors(Iscene scene){
    Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet();
    for (Iterator<AbstractGlobalInputProcessor> iter = set.iterator(); iter.hasNext();) {
      AbstractGlobalInputProcessor processor = (AbstractGlobalInputProcessor) iter.next();
      if (inputProcessorsToScene.get(processor).equals(scene)){
        processor.setDisabled(false);
      }
    }
  }
View Full Code Here

   * @param scene the scene
   */
  public void disableGlobalInputProcessors(Iscene scene){
    Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet();
    for (Iterator<AbstractGlobalInputProcessor> iter = set.iterator(); iter.hasNext();) {
      AbstractGlobalInputProcessor processor = (AbstractGlobalInputProcessor) iter.next();
      if (inputProcessorsToScene.get(processor).equals(scene)){
        processor.setDisabled(true);
      }
    }
  }
View Full Code Here

   * @param scene the scene
   */
  public void removeGlobalInputProcessors(Iscene scene){
    AbstractGlobalInputProcessor[] sceneProcessors = this.getGlobalInputProcessors(scene);
    for (int i = 0; i < sceneProcessors.length; i++) {
      AbstractGlobalInputProcessor abstractGlobalInputProcessor = sceneProcessors[i];
      this.unregisterGlobalInputProcessor(abstractGlobalInputProcessor);
    }
  }
View Full Code Here

      this.mtApplication.invokeLater(new Runnable() {
        public void run() {
          //Remove all global input processors of this scene from listening the the input sources
          AbstractGlobalInputProcessor[] inputProcessors = getGlobalInputProcessors();
          for (int i = 0; i < inputProcessors.length; i++) {
            AbstractGlobalInputProcessor abstractGlobalInputProcessor = inputProcessors[i];
            unregisterGlobalInputProcessor(abstractGlobalInputProcessor);
          }
        }
      });
     
View Full Code Here

    super(mtApplication, name);

    //Remove all global input processors - we dont want the transition to respond to input
    AbstractGlobalInputProcessor[] inputProcessors = this.getGlobalInputProcessors();
    for (int i = 0; i < inputProcessors.length; i++) {
      AbstractGlobalInputProcessor abstractGlobalInputProcessor = inputProcessors[i];
      this.unregisterGlobalInputProcessor(abstractGlobalInputProcessor);
    }
    //    this.previousScene = previousScene;
    //    this.nextScene = nextScene;
  }
View Full Code Here

          posEvt;
     
      //Send similar event to the windowed scenes global input processors
      AbstractGlobalInputProcessor[] globalAnalyzer = app.getInputManager().getGlobalInputProcessors(scene);
      for (int i = 0; i < globalAnalyzer.length; i++) {
        AbstractGlobalInputProcessor a = globalAnalyzer[i];
        if (!(a instanceof CursorTracer)){
          //Hack because actually processors are disabled so they dont recieve
          //input directly, so we dont call processInputEvt()!
          a.processInputEvtImpl(evtToFire)
        }
       
      }
      return false;
    }else{
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor

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.