Class MouseJointAdapter.Manager

java.lang.Object
com.badlogic.gdx.InputAdapter
net.dermetfan.gdx.physics.box2d.MouseJointAdapter.Manager
All Implemented Interfaces:
com.badlogic.gdx.InputProcessor
Enclosing class:
MouseJointAdapter

public class MouseJointAdapter.Manager
extends com.badlogic.gdx.InputAdapter
Manages MouseJointAdapters by creating new ones if necessary. Override newMouseJointAdapter(byte) to define how now ones will be created (by default a copy of the enclosing instance).
  • Constructor Summary

    Constructors
    Constructor Description
    Manager()  
  • Method Summary

    Modifier and Type Method Description
    com.badlogic.gdx.utils.Array<MouseJointAdapter> getAdapters()  
    byte getMax()  
    boolean mouseMoved​(int screenX, int screenY)
    calls mouseMoved on all adapters
    MouseJointAdapter newMouseJointAdapter​(byte pointer)
    override this to define how new MouseJointAdapters should be created
    void setAdapters​(com.badlogic.gdx.utils.Array<MouseJointAdapter> adapters)  
    void setMax​(byte max)  
    boolean touchDown​(int screenX, int screenY, int pointer, int button)
    calls touchDown on all adapters and creates a new one if necessary
    boolean touchDragged​(int screenX, int screenY, int pointer)
    calls touchDragged on all adapters
    boolean touchUp​(int screenX, int screenY, int pointer, int button)
    calls touchUp on all adapters

    Methods inherited from class com.badlogic.gdx.InputAdapter

    keyDown, keyTyped, keyUp, scrolled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Manager

      public Manager()
  • Method Details

    • touchDown

      public boolean touchDown​(int screenX, int screenY, int pointer, int button)
      calls touchDown on all adapters and creates a new one if necessary
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class com.badlogic.gdx.InputAdapter
    • touchDragged

      public boolean touchDragged​(int screenX, int screenY, int pointer)
      calls touchDragged on all adapters
      Specified by:
      touchDragged in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDragged in class com.badlogic.gdx.InputAdapter
    • mouseMoved

      public boolean mouseMoved​(int screenX, int screenY)
      calls mouseMoved on all adapters
      Specified by:
      mouseMoved in interface com.badlogic.gdx.InputProcessor
      Overrides:
      mouseMoved in class com.badlogic.gdx.InputAdapter
    • touchUp

      public boolean touchUp​(int screenX, int screenY, int pointer, int button)
      calls touchUp on all adapters
      Specified by:
      touchUp in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchUp in class com.badlogic.gdx.InputAdapter
    • newMouseJointAdapter

      public MouseJointAdapter newMouseJointAdapter​(byte pointer)
      override this to define how new MouseJointAdapters should be created
      Parameters:
      pointer - the pointer to set to the returned MouseJointAdapter
      Returns:
      a new MouseJointAdapter just like this Manager's enclosing instance
    • getMax

      public byte getMax()
      Returns:
      the max
    • setMax

      public void setMax​(byte max)
      Parameters:
      max - the max to set
    • getAdapters

      public com.badlogic.gdx.utils.Array<MouseJointAdapter> getAdapters()
      Returns:
      the adapters
    • setAdapters

      public void setAdapters​(com.badlogic.gdx.utils.Array<MouseJointAdapter> adapters)
      Parameters:
      adapters - the adapters to set. If the size of the given Array is greater than max, it will be increased