com.jmex.bui
Class PolledRootNode

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jmex.bui.BRootNode
              extended by com.jmex.bui.PolledRootNode
All Implemented Interfaces:
com.jme.util.export.Savable, java.io.Serializable

public class PolledRootNode
extends BRootNode

Processes the polled input information available from the underlying input system into input events and dispatches those to the appropriate parties.

See Also:
Serialized Form

Nested Class Summary
 
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
protected  com.jme.input.InputHandler _handler
           
protected  java.util.ArrayList<BComponent> _invalidRoots
           
protected  com.jme.input.KeyInputListener _keyListener
          This listener is notified when a key is pressed or released.
protected  com.jme.input.MouseInputListener _mouseListener
          This listener is notified when the mouse is updated.
protected  long _nextRepeat
          This is used for key repeat.
protected  char _presschar
          This is used for key repeat.
protected  int _pressed
          This is used for key repeat.
protected  long _tickStamp
           
protected  com.jme.util.Timer _timer
           
protected static int ANY_BUTTON_PRESSED
          Used to check whether any button remains pressed.
protected static long INITIAL_REPEAT_DELAY
           
protected static int[] KEY_MODIFIER_MAP
          Maps key codes to modifier flags.
protected static int[] MOUSE_MODIFIER_MAP
          Maps button indices to modifier flags.
protected static long SUBSEQ_REPEAT_DELAY
           
 
Fields inherited from class com.jmex.bui.BRootNode
_ccomponent, _defaults, _focus, _geomviews, _globals, _hcomponent, _lastMoveTime, _lastTipTime, _modalShade, _modifiers, _mouseX, _mouseY, _tipTime, _tipWidth, _tipwin, _windows, TIP_MODE_RESET
 
Fields inherited from class com.jme.scene.Geometry
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity
 
Fields inherited from class com.jme.scene.Spatial
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
PolledRootNode(com.jme.util.Timer timer)
           
PolledRootNode(com.jme.util.Timer timer, com.jme.input.InputHandler handler)
           
 
Method Summary
 void addKeyListener(com.jme.input.KeyInputListener listener)
           
 void addMouseListener(com.jme.input.MouseInputListener listener)
           
 void addUpdateListener(BUpdateListener listener)
           
 void fireOnMouseButton(int button, boolean pressed, int x, int y)
           
 long getTickStamp()
          Returns the current timestamp used to stamp event times.
 float getTooltipTimeout()
          Returns the tool tip timeout.
 void rootInvalidated(BComponent root)
          This is called by a window or a scroll pane when it has become invalid.
 void updateWorldData(float timePerFrame)
           
 
Methods inherited from class com.jmex.bui.BRootNode
addGlobalEventListener, addWindow, addWindow, clearTipWindow, dispatchEvent, draw, findCollisions, getAllWindows, getFocus, getWindow, getWindowCount, hasCollision, isOnTop, mouseDidMove, onDraw, popDefaultEventTarget, pushDefaultEventTarget, registerGeomView, removeAllWindows, removeGlobalEventListener, removeWindow, renderModalShade, requestFocus, resortWindows, setFocus, setModalShade, setTooltipPreferredWidth, setTooltipTimeout, tipTextChanged, toString, unregisterGeomView, updateGeometricState, updateHoverComponent, windowDidMove
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearBuffers, clearTextureBuffers, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getTriangleCount, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, read, 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, write
 
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, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Field Detail

_keyListener

protected com.jme.input.KeyInputListener _keyListener
This listener is notified when a key is pressed or released.


_mouseListener

protected com.jme.input.MouseInputListener _mouseListener
This listener is notified when the mouse is updated.


_tickStamp

protected long _tickStamp

_timer

protected com.jme.util.Timer _timer

_handler

protected com.jme.input.InputHandler _handler

_invalidRoots

protected java.util.ArrayList<BComponent> _invalidRoots

_pressed

protected int _pressed
This is used for key repeat.


_presschar

protected char _presschar
This is used for key repeat.


_nextRepeat

protected long _nextRepeat
This is used for key repeat.


KEY_MODIFIER_MAP

protected static final int[] KEY_MODIFIER_MAP
Maps key codes to modifier flags.


MOUSE_MODIFIER_MAP

protected static final int[] MOUSE_MODIFIER_MAP
Maps button indices to modifier flags.


ANY_BUTTON_PRESSED

protected static final int ANY_BUTTON_PRESSED
Used to check whether any button remains pressed.

See Also:
Constant Field Values

INITIAL_REPEAT_DELAY

protected static final long INITIAL_REPEAT_DELAY
See Also:
Constant Field Values

SUBSEQ_REPEAT_DELAY

protected static final long SUBSEQ_REPEAT_DELAY
See Also:
Constant Field Values
Constructor Detail

PolledRootNode

public PolledRootNode(com.jme.util.Timer timer)

PolledRootNode

public PolledRootNode(com.jme.util.Timer timer,
                      com.jme.input.InputHandler handler)
Method Detail

addMouseListener

public void addMouseListener(com.jme.input.MouseInputListener listener)

addKeyListener

public void addKeyListener(com.jme.input.KeyInputListener listener)

addUpdateListener

public void addUpdateListener(BUpdateListener listener)

fireOnMouseButton

public void fireOnMouseButton(int button,
                              boolean pressed,
                              int x,
                              int y)

getTickStamp

public long getTickStamp()
Description copied from class: BRootNode
Returns the current timestamp used to stamp event times.

Specified by:
getTickStamp in class BRootNode
Returns:
long tickstamp

rootInvalidated

public void rootInvalidated(BComponent root)
Description copied from class: BRootNode
This is called by a window or a scroll pane when it has become invalid. The root node should schedule a revalidation of this component on the next tick or the next time an event is processed.

Specified by:
rootInvalidated in class BRootNode

updateWorldData

public void updateWorldData(float timePerFrame)
Overrides:
updateWorldData in class com.jme.scene.Spatial

getTooltipTimeout

public float getTooltipTimeout()
Description copied from class: BRootNode
Returns the tool tip timeout. See BRootNode.setTooltipTimeout(float) for details.

Overrides:
getTooltipTimeout in class BRootNode


Copyright © 2011 Michael Bayne. All Rights Reserved.