sdr 0.7

net.cscott.sdr.anim
Class MenuItem

java.lang.Object
  extended by com.jme.scene.SceneElement
      extended by com.jme.scene.Spatial
          extended by com.jme.scene.Node
              extended by net.cscott.sdr.anim.MenuItem
All Implemented Interfaces:
com.jme.util.export.Savable, Serializable

public class MenuItem
extends com.jme.scene.Node

A MenuItem is one row of the MenuState. It is in charge of its own highlight state and input processing.

Version:
$Id: MenuItem.java,v 1.6 2007-03-07 19:17:20 cananian Exp $
Author:
C. Scott Ananian
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.Node
children
 
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
MenuItem(String nodeName, String labelText, net.cscott.sdr.anim.BaseState st, int initialValue, String... valueText)
           
 
Method Summary
 void dec()
           
 com.jme.input.action.MouseInputAction getMouseInputAction()
           
protected  String getValue(int which)
           
protected  int getWhich()
           
 void inc()
           
protected  void onChange(int which)
          Subclasses can override this method to get notification of state changes.
protected  void onHoverChange(boolean isEnabled)
          Subclasses can override this method to get notification of hover events.
protected  void refreshValues(int newWhich, String[] newValues, boolean emitChanged)
           
 void setEnabled(boolean isEnabled)
           
 
Methods inherited from class com.jme.scene.Node
applyRenderState, attachChild, attachChildAt, batchChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getType, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, read, setModelBound, swapChildren, 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, getUserData, getWorldRotation, getWorldScale, getWorldTranslation, localToWorld, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setParent, setUserData, setZOrder, updateGeometricState, 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, toString, 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
 

Constructor Detail

MenuItem

public MenuItem(String nodeName,
                String labelText,
                net.cscott.sdr.anim.BaseState st,
                int initialValue,
                String... valueText)
Method Detail

refreshValues

protected void refreshValues(int newWhich,
                             String[] newValues,
                             boolean emitChanged)

setEnabled

public void setEnabled(boolean isEnabled)

getWhich

protected int getWhich()

getValue

protected String getValue(int which)

inc

public void inc()

dec

public void dec()

onChange

protected void onChange(int which)
Subclasses can override this method to get notification of state changes.


onHoverChange

protected void onHoverChange(boolean isEnabled)
Subclasses can override this method to get notification of hover events.


getMouseInputAction

public com.jme.input.action.MouseInputAction getMouseInputAction()

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian