Package org.mt4j.input.inputProcessors.componentProcessors

Examples of org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor


        p.preProcess(inEvt);
      }
    }
   
    for (int i = 0; i < registeredProcessors.size(); i++) {
      AbstractComponentProcessor inputProcessor = registeredProcessors.get(i);
      //Send events
      if (inputProcessor.isInterestedIn(inEvt)
        && this.associatedComponent.isGestureAllowed(inputProcessor.getClass())
      ){
        handled = true;
        inputProcessor.processInputEvent(inEvt);
      }
    }
    return handled;
//    */
  }
 
View Full Code Here


    }
   
    private boolean hasDragProcessor(MTComponent comp){
      AbstractComponentProcessor[] ps = comp.getInputProcessors();
      for (int i = 0; i < ps.length; i++) {
        AbstractComponentProcessor p = ps[i];
        if (p instanceof DragProcessor){
          return true;
        }
      }
      return false;
View Full Code Here

//    knob = new MTRectangle(x+innerOffset, y+innerOffset,   knobWidth, knobHeight, applet);
    knob = new MTEllipse(applet,  new Vector3D(0,0,0), knobWidth*0.5f, knobHeight*0.5f);
    knob.setFillColor(new MTColor(140, 140, 140, 255));
    AbstractComponentProcessor[] inputPs = knob.getInputProcessors();
    for (int i = 0; i < inputPs.length; i++) {
      AbstractComponentProcessor p = inputPs[i];
      if (!(p instanceof DragProcessor)){
        knob.unregisterInputProcessor(p);
      }
    }
    knob.removeAllGestureEventListeners(DragProcessor.class);
View Full Code Here

      comp.removeAllGestureEventListeners(DragProcessor.class);
     
      boolean hasDragProcessor = false;
      AbstractComponentProcessor[] p = comp.getInputProcessors();
      for (int i = 0; i < p.length; i++) {
        AbstractComponentProcessor abstractComponentProcessor = p[i];
        if (abstractComponentProcessor instanceof DragProcessor) {
          hasDragProcessor = true;
        }
      }
      if (!hasDragProcessor){
View Full Code Here

   * @param inputProcessor the input processor
   */
  public void registerInputProcessor(AbstractComponentProcessor inputProcessor) {
    AbstractComponentProcessor[] processors = inputProcessorsSupport.getInputProcessors();
    for (int i = 0; i < processors.length; i++) {
      AbstractComponentProcessor abstractComponentProcessor = processors[i];
      if (inputProcessor.getClass() == abstractComponentProcessor.getClass()){
        logger.warn("Warning: The same type of input processor (" + inputProcessor.getName() + ") is already registered at component: " + this );
      }
    }
    inputProcessorsSupport.registerInputProcessor(inputProcessor);
    this.setGestureAllowance(inputProcessor.getClass(), true); //Enable by default
View Full Code Here

   * Unregister all previously registered component input processors.
   */
  public void unregisterAllInputProcessors() {
    AbstractComponentProcessor[] ps = inputProcessorsSupport.getInputProcessors();
    for (int i = 0; i < ps.length; i++) {
      AbstractComponentProcessor p = ps[i];
      inputProcessorsSupport.unregisterInputProcessor(p);
    }
  }
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor

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.