|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.jme.widget.WidgetAbstractContainer
com.jme.widget.panel.WidgetPanel
com.jme.widget.button.WidgetImageButton
WidgetImageButton
| Field Summary | |
protected WidgetButtonStateType |
_buttonState
|
protected WidgetImage |
_image
|
protected Image |
_imageDown
|
protected Image |
_imageOver
|
protected Image |
_imageUp
|
| 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 | |
WidgetImageButton(java.awt.Image imageUp,
java.awt.Image imageDown,
java.awt.Image imageOver)
Constructor that allows the user to pass in the java.awt.Image reference that need to be used to construct this button. |
|
WidgetImageButton(Image imageUp,
Image imageDown,
Image imageOver)
Constructor that allows the user to pass in com.jme.image.Image instead of the java.awt.Image reference. |
|
WidgetImageButton(java.lang.String upStr,
java.lang.String downStr,
java.lang.String overStr)
WidgetImageButton contructor. |
|
| Method Summary | |
void |
doMouseButtonDown()
Handles the down message and changes the internal WidgeImage's underlying image to the down image. |
void |
doMouseButtonUp()
Handles when the panel recieves a button up message. |
void |
doMouseEnter()
Checks for the mouse state to be correct when the mouse is in the widget TODO: really need to figure out a better way to handle this, right now because of the overridden handleMouseMove this method get's called for every movement of the mouse. |
void |
doMouseExit()
Checks for the mouse to be correct state when mouse is NOT in widget TODO: really need to figure out a better way to handle this, right now because of the overridden handleMouseMove this method get's called for every movement of the mouse. |
Vector2f |
getPreferredSize()
Needed by the AbsoluteLayout to figure out how big to draw it. |
void |
handleMouseButtonDown()
Overridden from WidgetAbstractImpl I don't really know why it's needed, for some reason when using the one in WidgetAbstractImpl the ownership of the mouse is taken by the parent panel or frame and thus the doMouseButtonUp or Down is never called. |
void |
handleMouseMove()
Overridden from WidgetAbstractImpl I don't really know why it's needed, for some reason when using the one in WidgetAbstractImpl the ownership of the mouse is taken by the parent panel or frame and thus the doMouseEnter or Exit is never called. |
void |
init()
Sets the basic layout and creates the WidgetImage that is going to be used throughout the class |
| Methods inherited from class com.jme.widget.panel.WidgetPanel |
draw, initWidgetRenderer |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Image _imageUp
protected Image _imageDown
protected Image _imageOver
protected WidgetImage _image
protected WidgetButtonStateType _buttonState
| Constructor Detail |
public WidgetImageButton(java.lang.String upStr,
java.lang.String downStr,
java.lang.String overStr)
throws java.io.IOException
upStr - the location of the image to be used to the up button state. Based on using the getResource call of ClassLoaderdownStr - the location of the image to be used to the down button state. Based on using the getResource call of ClassLoaderoverStr - the location of the image to be used to the over button state. Based on using the getResource call of ClassLoader
java.lang.Exception - Important: this is the only constructor that throws an IOException,
this is because calling the this constructor with the ImageIO.read within it make it needed since
you can't put a try/catch block around it.
java.io.IOException
public WidgetImageButton(java.awt.Image imageUp,
java.awt.Image imageDown,
java.awt.Image imageOver)
imageUp - imageDown - imageOver -
public WidgetImageButton(Image imageUp,
Image imageDown,
Image imageOver)
imageUp - imageDown - imageOver - | Method Detail |
public void init()
public void doMouseButtonUp()
doMouseButtonUp in interface WidgetMouseHandlerInterfacedoMouseButtonUp in class WidgetAbstractContainerpublic void doMouseButtonDown()
doMouseButtonDown in interface WidgetMouseHandlerInterfacedoMouseButtonDown in class WidgetAbstractContainerpublic void doMouseEnter()
doMouseEnter in interface WidgetMouseHandlerInterfacedoMouseEnter in class WidgetAbstractContainerpublic void doMouseExit()
doMouseExit in interface WidgetMouseHandlerInterfacedoMouseExit in class WidgetAbstractContainerpublic void handleMouseButtonDown()
handleMouseButtonDown in interface WidgetMouseHandlerInterfacehandleMouseButtonDown in class WidgetAbstractContainerpublic void handleMouseMove()
handleMouseMove in interface WidgetMouseHandlerInterfacehandleMouseMove in class WidgetAbstractContainerpublic Vector2f getPreferredSize()
getPreferredSize in interface WidgetgetPreferredSize in class WidgetAbstractContainer
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||