Package com.simsilica.lemur
Class ActionButton
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.simsilica.lemur.Panel
com.simsilica.lemur.Label
com.simsilica.lemur.Button
com.simsilica.lemur.ActionButton
- All Implemented Interfaces:
HasLocalTransform,CloneableSmartAsset,Collidable,Savable,JmeCloneable,Cloneable
A Button specialization that wraps an Action and
reflects changes to the Action's properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.simsilica.lemur.Button
Button.ButtonAction, Button.ButtonMouseHandler, Button.FocusObserverNested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode -
Field Summary
Fields inherited from class com.simsilica.lemur.Button
EFFECT_ACTIVATE, EFFECT_CLICK, EFFECT_DEACTIVATE, EFFECT_DISABLE, EFFECT_ENABLE, EFFECT_FOCUS, EFFECT_PRESS, EFFECT_RELEASE, EFFECT_UNFOCUS, ELEMENT_IDFields inherited from class com.simsilica.lemur.Label
LAYER_ICON, LAYER_SHADOW_TEXT, LAYER_TEXTFields inherited from class com.simsilica.lemur.Panel
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETSFields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_GLOBAL_LIGHTS, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform -
Constructor Summary
ConstructorsConstructorDescriptionActionButton(Action action) ActionButton(Action action, ElementId elementId) ActionButton(Action action, ElementId elementId, String style) ActionButton(Action action, String style) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidSets a new Action to this button and clears any previously set action.protected final voidprotected voidprotected voidprotected voidvoidupdateLogicalState(float tpf) updateLogicalStatecalls theupdate()method for all controls attached to this Spatial.protected voidMethods inherited from class com.simsilica.lemur.Button
addClickCommands, addClickCommands, addCommands, click, getClickCommands, getColor, getCommands, getFocusColor, getFocusShadowColor, getHighlightColor, getHighlightShadowColor, getShadowColor, isEnabled, isFocused, isFocusHighlightOn, isHighlightOn, isPressed, removeClickCommands, resetColors, runClick, setButtonCommands, setColor, setEnabled, setFocusColor, setFocusShadowColor, setHighlightColor, setHighlightShadowColor, setPressed, setShadowColor, showFocus, showHighlight, toStringMethods inherited from class com.simsilica.lemur.Label
createText2d, getFont, getFontName, getFontSize, getIcon, getMaxWidth, getShadowOffset, getText, getTextHAlignment, getTextVAlignment, setFont, setFontName, setFontSize, setIcon, setMaxWidth, setShadowOffset, setText, setTextHAlignment, setTextVAlignmentMethods inherited from class com.simsilica.lemur.Panel
addEffect, addMouseListener, getAlpha, getBackground, getBorder, getEffectControl, getEffects, getElementId, getInsets, getInsetsComponent, getPreferredSize, getSize, getStyle, hasEffect, removeEffect, removeMouseListener, runEffect, setAlpha, setAlpha, setBackground, setBorder, setChildAlpha, setEffects, setInsets, setInsetsComponent, setPreferredSize, setSizeMethods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, cloneFields, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, setLightListRefresh, setLodLevel, setMaterial, setMatParamOverrideRefresh, setModelBound, setParent, setTransformRefresh, swapChildren, updateGeometricState, updateModelBound, updateWorldBound, writeMethods inherited from class com.jme3.scene.Spatial
addControl, addControlAt, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, depthFirstTraversal, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, hasGlobalLights, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocal
-
Constructor Details
-
ActionButton
-
ActionButton
-
ActionButton
-
ActionButton
-
-
Method Details
-
setupCommands
protected final void setupCommands() -
setAction
Sets a new Action to this button and clears any previously set action. The button's text, icon, etc. will be changed to the Action's properties and will be kept in sync as the action changes. Click events will be passed through to the action. -
getAction
-
updateLogicalState
public void updateLogicalState(float tpf) Description copied from class:SpatialupdateLogicalStatecalls theupdate()method for all controls attached to this Spatial.- Overrides:
updateLogicalStatein classNode- Parameters:
tpf- Time per frame.- See Also:
-
updateButton
protected void updateButton() -
updateText
protected void updateText() -
updateEnabled
protected void updateEnabled() -
updateIcon
protected void updateIcon()
-