com.jme.widget.button
Class WidgetButton

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Node
          extended bycom.jme.widget.WidgetAbstractContainer
              extended bycom.jme.widget.panel.WidgetPanel
                  extended bycom.jme.widget.text.WidgetLabel
                      extended bycom.jme.widget.button.WidgetButton
All Implemented Interfaces:
java.io.Serializable, Widget, WidgetMouseHandlerInterface
Direct Known Subclasses:
WidgetScrollerButton, WidgetScrollerThumb

public class WidgetButton
extends WidgetLabel

WidgetButton

Version:
$Id: WidgetButton.java,v 1.8 2004/09/14 21:52:21 mojomonkey Exp $
Author:
Gregg Patton
See Also:
Serialized Form

Field Summary
protected  WidgetButtonStateType buttonState
           
 
Fields inherited from class com.jme.widget.text.WidgetLabel
text
 
Fields inherited from class com.jme.widget.WidgetAbstractContainer
DEFAULT_INSET_SIZE, insets, layout, panOffset, widgetImpl, widgetList
 
Fields inherited from class com.jme.scene.Node
children
 
Fields inherited from class com.jme.scene.Spatial
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
WidgetButton()
           
WidgetButton(java.lang.String title)
           
WidgetButton(java.lang.String title, WidgetAlignmentType textAlignment)
           
 
Method Summary
 void doMouseButtonDown()
          doMouseButtonDown
 void doMouseButtonUp()
          doMouseButtonUp
 WidgetButtonStateType getButtonState()
           
 void onDraw(Renderer r)
          onDraw checks the node with the camera to see if it should be culled, if not, the node's draw method is called.
 void setButtonState(WidgetButtonStateType type)
           
 java.lang.String toString()
          Returns the Spatial's name followed by the class of the spatial
Example: "MyNode (com.jme.scene.Spatial)
 
Methods inherited from class com.jme.widget.text.WidgetLabel
getText, getTextAlignment, getTitle, setFgColor, setText, setTextAlignment, setTitle
 
Methods inherited from class com.jme.widget.panel.WidgetPanel
draw, initWidgetRenderer
 
Methods inherited from class com.jme.widget.WidgetAbstractContainer
add, add, addMouseButtonDownObserver, addMouseButtonUpObserver, addMouseDragObserver, addMouseEnterObserver, addMouseExitObserver, addMouseMoveObserver, calcViewport, canClose, close, contains, deleteMouseButtonDownObserver, deleteMouseButtonDownObservers, deleteMouseButtonUpObserver, deleteMouseButtonUpObservers, deleteMouseDragObserver, deleteMouseDragObservers, deleteMouseEnterObserver, deleteMouseEnterObservers, deleteMouseExitObserver, deleteMouseExitObservers, deleteMouseMoveObserver, deleteMouseMoveObservers, dispose, doAlignment, doLayout, doMouseDrag, doMouseEnter, doMouseExit, doMouseMove, doParentLayout, getAbsoluteLocation, getAlignment, getBgColor, getBorder, getExtents, getFgColor, getHeight, getInputHandler, getInsets, getLastWidgetUnderMouse, getLayout, getLocation, getMouseInput, getMouseOwner, getNotifierMouseButtonDown, getNotifierMouseButtonUp, getNotifierMouseDrag, getNotifierMouseEnter, getNotifierMouseExit, getNotifierMouseMove, getOwner, getPanOffset, getPanOffsetX, getPanOffsetY, getPreferredSize, getSize, getTextureCoords, getViewRectangle, getWidget, getWidgetCount, getWidgetParent, getWidgetRenderer, getWidgetUnderMouse, getWidth, getWorldBound, getX, getXOffset, getY, getYOffset, getZOrder, handleMouseButtonDown, handleMouseButtonUp, handleMouseDrag, handleMouseEnter, handleMouseExit, handleMouseMove, isApplyOffsetX, isApplyOffsetY, isCantOwnMouse, isMouseInWidget, isOpaque, isVisible, pack, remove, remove, removeAll, setAlignment, setApplyOffsetX, setApplyOffsetY, setBgColor, setBorder, setCantOwnMouse, setForceView, setHeight, setInputHandler, setInsets, setLastWidgetUnderMouse, setLayout, setLocation, setLocation, setMouseOwner, setOwner, setPanOffset, setPanOffset, setPanXOffset, setPanYOffset, setPreferredSize, setPreferredSize, setSize, setSize, setTextureCoords, setViewRectangle, setVisible, setWidgetParent, setWidgetRenderer, setWidgetUnderMouse, setWidth, setX, setY, setZOrder, update, updateChildrenViewports, updateWorldBound
 
Methods inherited from class com.jme.scene.Node
applyRenderState, attachChild, detachAllChildren, detachChild, detachChildAt, detachChildNamed, drawBounds, findCollisions, findPick, getChild, getChild, getChildren, getQuantity, hasChild, hasCollision, putClone, setChild, updateCollisionTree, updateWorldData
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldRotation, getWorldScale, getWorldTranslation, isForceCulled, isForceView, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, updateGeometricState, updateRenderState, updateRenderState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buttonState

protected WidgetButtonStateType buttonState
Constructor Detail

WidgetButton

public WidgetButton()

WidgetButton

public WidgetButton(java.lang.String title)

WidgetButton

public WidgetButton(java.lang.String title,
                    WidgetAlignmentType textAlignment)
Method Detail

onDraw

public void onDraw(Renderer r)
Description copied from class: Spatial
onDraw checks the node with the camera to see if it should be culled, if not, the node's draw method is called.

Overrides:
onDraw in class Spatial
Parameters:
r - the renderer used for display.

doMouseButtonDown

public void doMouseButtonDown()
Description copied from interface: WidgetMouseHandlerInterface
doMouseButtonDown

Specified by:
doMouseButtonDown in interface WidgetMouseHandlerInterface
Overrides:
doMouseButtonDown in class WidgetAbstractContainer

doMouseButtonUp

public void doMouseButtonUp()
Description copied from interface: WidgetMouseHandlerInterface
doMouseButtonUp

Specified by:
doMouseButtonUp in interface WidgetMouseHandlerInterface
Overrides:
doMouseButtonUp in class WidgetAbstractContainer

getButtonState

public WidgetButtonStateType getButtonState()

setButtonState

public void setButtonState(WidgetButtonStateType type)

toString

public java.lang.String toString()
Description copied from class: Spatial
Returns the Spatial's name followed by the class of the spatial
Example: "MyNode (com.jme.scene.Spatial)

Overrides:
toString in class WidgetAbstractContainer