Package com.simsilica.lemur
Class Spinner<T>
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.simsilica.lemur.Panel
com.simsilica.lemur.Spinner<T>
- All Implemented Interfaces:
HasLocalTransform
,CloneableSmartAsset
,Collidable
,Savable
,JmeCloneable
,Cloneable
A GUI element that allows 'spinning' through a potentially
unbound sequence of values. This includes a value display
and optional editor for setting the value directly.
The "up" button will proceed to the next value in the sequence
and the "down" button will process to the previous value.
It's up to the model itself why 'previous' and 'next' mean.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
static enum
protected class
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.simsilica.lemur.Panel
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETS
Fields 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_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Spinner
(boolean applyStyles, SequenceModel<T> model, ValueRenderer<T> valueRenderer, ElementId elementId, String style) Spinner
(SequenceModel<T> model) Spinner
(SequenceModel<T> model, ValueRenderer<T> valueRenderer) Spinner
(SequenceModel<T> model, ValueRenderer<T> valueRenderer, ElementId elementId, String style) Spinner
(SequenceModel<T> model, ValueRenderer<T> valueRenderer, String style) Spinner
(SequenceModel<T> model, String style) -
Method Summary
Modifier and TypeMethodDescriptiongetModel()
getValue()
static void
initializeDefaultStyles
(Styles styles, Attributes attrs) boolean
boolean
void
void
protected void
void
setEnabled
(boolean b) void
setModel
(SequenceModel<T> model) void
void
setValueEditor
(ValueEditor<T> valueEditor) protected void
void
void
void
updateLogicalState
(float tpf) updateLogicalState
calls theupdate()
method for all controls attached to this Spatial.Methods inherited from class com.simsilica.lemur.Panel
addEffect, addMouseListener, getAlpha, getBackground, getBorder, getEffectControl, getEffects, getElementId, getInsets, getInsetsComponent, getPreferredSize, getSize, getStyle, hasEffect, initializeDefaultStyles, removeEffect, removeMouseListener, runEffect, setAlpha, setAlpha, setBackground, setBorder, setChildAlpha, setEffects, setInsets, setInsetsComponent, setPreferredSize, setSize, toString
Methods 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, write
Methods 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, 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
-
Field Details
-
ELEMENT_ID
- See Also:
-
VALUE_ID
- See Also:
-
EDITOR_ID
- See Also:
-
BUTTON_PANEL_ID
- See Also:
-
UP_ID
- See Also:
-
DOWN_ID
- See Also:
-
EFFECT_NEXT
- See Also:
-
EFFECT_PREVIOUS
- See Also:
-
EFFECT_ACTIVATE
- See Also:
-
EFFECT_DEACTIVATE
- See Also:
-
EFFECT_START_EDIT
- See Also:
-
EFFECT_STOP_EDIT
- See Also:
-
EFFECT_FOCUS
- See Also:
-
EFFECT_UNFOCUS
- See Also:
-
EFFECT_ENABLE
- See Also:
-
EFFECT_DISABLE
- See Also:
-
-
Constructor Details
-
Spinner
-
Spinner
-
Spinner
-
Spinner
-
Spinner
public Spinner(SequenceModel<T> model, ValueRenderer<T> valueRenderer, ElementId elementId, String style) -
Spinner
protected Spinner(boolean applyStyles, SequenceModel<T> model, ValueRenderer<T> valueRenderer, ElementId elementId, String style)
-
-
Method Details
-
initializeDefaultStyles
-
updateLogicalState
public void updateLogicalState(float tpf) Description copied from class:Spatial
updateLogicalState
calls theupdate()
method for all controls attached to this Spatial.- Overrides:
updateLogicalState
in classNode
- Parameters:
tpf
- Time per frame.- See Also:
-
setModel
-
getModel
-
setValueEditor
-
getValueEditor
-
setValue
-
getValue
-
nextValue
public void nextValue() -
previousValue
public void previousValue() -
setEnabled
public void setEnabled(boolean b) -
isEnabled
public boolean isEnabled() -
startEditing
public void startEditing() -
stopEditing
public void stopEditing() -
isEditing
public boolean isEditing() -
setView
-
resetValue
protected void resetValue()
-