synergynetframework.jme.gfx.twod.keyboard
Class MTKeyboard

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.Quad
                  extended by synergynetframework.jme.gfx.twod.utils.GraphicsImageQuad
                      extended by synergynetframework.jme.gfx.twod.keyboard.MTKeyboard
All Implemented Interfaces:
com.jme.util.export.Savable, java.io.Serializable, DrawableSpatialImage

public class MTKeyboard
extends GraphicsImageQuad
implements DrawableSpatialImage

The Class MTKeyboard.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.TriMesh
com.jme.scene.TriMesh.Mode
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode
 
Field Summary
 
Fields inherited from class com.jme.scene.Geometry
states
 
Fields inherited from class com.jme.scene.Spatial
LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, queueDistance
 
Constructor Summary
MTKeyboard(java.lang.String name, java.awt.Image keyboardImage, java.util.List<Key> keys, float width, float height, int imgWidth, int imgHeight)
          Instantiates a new MT keyboard.
 
Method Summary
 void addKeyListener(MTKeyListener listener)
          Adds the key listener.
 void cursorClicked(long cursorID, int x, int y)
          Cursor clicked.
 void cursorDragged(long id, int x, int y)
          Cursor dragged.
 void cursorPressed(long cursorID, int x, int y)
          Cursor pressed.
 void cursorReleased(long cursorID, int x, int y)
          Cursor released.
 void draw()
          Draw.
 com.jme.scene.Spatial getSpatial()
          Gets the spatial.
 boolean isKeyPressed(int vk)
          Checks if is key pressed.
 
Methods inherited from class synergynetframework.jme.gfx.twod.utils.GraphicsImageQuad
getImageGraphics, getImageHeight, getImageWidth, getTextureState, recreateImageForSize, setTextureApplyMode, updateGraphics
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, getHeight, getWidth, initialize, resize, updateGeometry
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateWorldData, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface synergynetframework.jme.gfx.twod.DrawableSpatialImage
getHeight, getImageHeight, getImageWidth, getWidth
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Constructor Detail

MTKeyboard

public MTKeyboard(java.lang.String name,
                  java.awt.Image keyboardImage,
                  java.util.List<Key> keys,
                  float width,
                  float height,
                  int imgWidth,
                  int imgHeight)
Instantiates a new MT keyboard.

Parameters:
name - the name
keyboardImage - the keyboard image
keys - the keys
width - the width
height - the height
imgWidth - the img width
imgHeight - the img height
Method Detail

addKeyListener

public void addKeyListener(MTKeyListener listener)
Adds the key listener.

Parameters:
listener - the listener

cursorClicked

public void cursorClicked(long cursorID,
                          int x,
                          int y)
Description copied from interface: DrawableSpatialImage
Cursor clicked.

Specified by:
cursorClicked in interface DrawableSpatialImage
Parameters:
cursorID - the cursor id
x - the x
y - the y

cursorDragged

public void cursorDragged(long id,
                          int x,
                          int y)
Description copied from interface: DrawableSpatialImage
Cursor dragged.

Specified by:
cursorDragged in interface DrawableSpatialImage
Parameters:
id - the id
x - the x
y - the y

cursorPressed

public void cursorPressed(long cursorID,
                          int x,
                          int y)
Description copied from interface: DrawableSpatialImage
Cursor pressed.

Specified by:
cursorPressed in interface DrawableSpatialImage
Parameters:
cursorID - the cursor id
x - the x
y - the y

cursorReleased

public void cursorReleased(long cursorID,
                           int x,
                           int y)
Description copied from interface: DrawableSpatialImage
Cursor released.

Specified by:
cursorReleased in interface DrawableSpatialImage
Parameters:
cursorID - the cursor id
x - the x
y - the y

draw

public void draw()
Description copied from interface: DrawableSpatialImage
Draw.

Specified by:
draw in interface DrawableSpatialImage

getSpatial

public com.jme.scene.Spatial getSpatial()
Description copied from interface: DrawableSpatialImage
Gets the spatial.

Specified by:
getSpatial in interface DrawableSpatialImage
Returns:
the spatial

isKeyPressed

public boolean isKeyPressed(int vk)
Checks if is key pressed.

Parameters:
vk - the vk
Returns:
true, if is key pressed