com.jmex.bui
Class CanvasRootNode

java.lang.Object
  extended by com.jme.scene.SceneElement
      extended by com.jme.scene.Spatial
          extended by com.jme.scene.Geometry
              extended by com.jmex.bui.BRootNode
                  extended by com.jmex.bui.CanvasRootNode
All Implemented Interfaces:
Savable, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, Serializable, EventListener

public class CanvasRootNode
extends BRootNode
implements MouseListener, MouseMotionListener, MouseWheelListener, KeyListener

Bridges between the AWT and the BUI input event system when we are being used in an AWT canvas.

See Also:
Serialized Form

Field Summary
protected  Canvas _canvas
           
 
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
batchList
 
Fields inherited from class com.jme.scene.Spatial
geometricalControllers, localRotation, localScale, localTranslation, parent, worldRotation, worldScale, worldTranslation
 
Fields inherited from class com.jme.scene.SceneElement
COMPOSITE_MESH, CULL_ALWAYS, CULL_DYNAMIC, CULL_INHERIT, CULL_NEVER, cullMode, frustrumIntersects, GEOMBATCH, GEOMETRY, isCollidable, lightCombineMode, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, NM_GL_NORMALIZE_IF_SCALED, NM_GL_NORMALIZE_PROVIDED, NM_INHERIT, NM_OFF, NM_USE_PROVIDED, NODE, normalsMode, QUADBATCH, queueDistance, renderQueueMode, renderStateList, SHARED_MESH, SHAREDBATCH, SKY_BOX, TERRAIN_BLOCK, TERRAIN_PAGE, textureCombineMode, TRIANGLEBATCH, TRIMESH, worldBound, zOrder
 
Constructor Summary
CanvasRootNode(Canvas canvas)
           
 
Method Summary
protected  int convertButton(MouseEvent e)
           
protected  int convertKeyCode(KeyEvent e)
           
protected  int convertModifiers(int modifiers)
           
protected  BComponent getTargetComponent()
           
 long getTickStamp()
          Returns the current timestamp used to stamp event times.
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void mouseWheelMoved(MouseWheelEvent e)
           
 void rootInvalidated(BComponent root)
          This is called by a window or a scroll pane when it has become invalid.
protected  boolean updateState(MouseEvent e)
           
 
Methods inherited from class com.jmex.bui.BRootNode
addGlobalEventListener, addWindow, addWindow, clearTipWindow, dispatchEvent, draw, findCollisions, getFocus, getTooltipTimeout, 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
addBatch, applyRenderState, clearBatches, clearBuffers, copyTextureCoords, copyTextureCoords, findPick, getBatch, getBatchCount, getBatchIndex, getColorBuffer, getNormalBuffer, getNumberOfUnits, getTextureBuffer, getTextureBuffers, getTotalVertices, getType, getVBOInfo, getVertexBuffer, getWorldCoords, getWorldCoords, getWorldNormals, getWorldNormals, lockBounds, lockMeshes, lockShadows, lockTransforms, randomVertex, read, reconstruct, reconstruct, removeBatch, removeBatch, setColorBuffer, setDefaultColor, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTextureBuffer, setTextureBuffer, setupBatchList, setVBOInfo, setVBOInfo, setVertexBuffer, swapBatches, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, write
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, getController, getControllers, getCullMode, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getNormalsMode, getParent, getRenderQueueMode, getTextureCombineMode, getWorldRotation, getWorldScale, getWorldTranslation, localToWorld, lookAt, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, rotateUpTo, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setParent, updateCollisionTree, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal
 
Methods inherited from class com.jme.scene.SceneElement
clearRenderState, getClassTag, getLastFrustumIntersection, getLocalCullMode, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalTextureCombineMode, getLocks, getName, getRenderState, getWorldBound, getZOrder, isCollidable, lock, lock, lockBranch, lockMeshes, setCullMode, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setZOrder, unlock, unlock, unlockBranch, unlockMeshes, updateRenderState, updateRenderState
 
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

_canvas

protected Canvas _canvas
Constructor Detail

CanvasRootNode

public CanvasRootNode(Canvas canvas)
Method Detail

getTickStamp

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

Specified by:
getTickStamp in class BRootNode

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

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

updateState

protected boolean updateState(MouseEvent e)

getTargetComponent

protected BComponent getTargetComponent()

convertModifiers

protected int convertModifiers(int modifiers)

convertButton

protected int convertButton(MouseEvent e)

convertKeyCode

protected int convertKeyCode(KeyEvent e)


Copyright © 2008 Michael Bayne. All Rights Reserved.