Package com.simsilica.lemur
Class Selector<T>
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.simsilica.lemur.Panel
com.simsilica.lemur.Selector<T>
- All Implemented Interfaces:
HasLocalTransform,CloneableSmartAsset,Collidable,Savable,JmeCloneable,Cloneable
A GUI element that presents a value and a drop down for selecting
a different value.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode -
Field Summary
FieldsFields 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
ConstructorsModifierConstructorDescriptionSelector()protectedSelector(boolean applyStyles, VersionedList<T> model, ValueRenderer<T> valueRenderer, SelectionModel selection, ElementId elementId, String style) Selector(VersionedList<T> model) Selector(VersionedList<T> model, ElementId elementId) Selector(VersionedList<T> model, ElementId elementId, String style) Selector(VersionedList<T> model, ValueRenderer<T> renderer) Selector(VersionedList<T> model, ValueRenderer<T> renderer, ElementId elementId, String style) Selector(VersionedList<T> model, ValueRenderer<T> renderer, String style) Selector(VersionedList<T> model, String style) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAttempts to make sure that the selected item is always in range.protected intprotected Vector3fcalculatePopupLocation(Vector3f screen) protected voidcollapse()protected voidexpand()intgetModel()protected Tbooleanprotected voidvoidsetExpanded(boolean b) voidsetMaximumVisibleItems(int count) voidsetModel(VersionedList<T> model) voidsetSelectedItem(T item) voidsetSelectionModel(SelectionModel selectionModel) voidsetValueRenderer(ValueRenderer<T> valueRenderer) voidupdateLogicalState(float tpf) updateLogicalStatecalls theupdate()method for all controls attached to this Spatial.protected voidMethods 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, setSize, toStringMethods 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
-
Field Details
-
ELEMENT_ID
- See Also:
-
CONTAINER_ID
- See Also:
-
EXPANDER_ID
- See Also:
-
-
Constructor Details
-
Selector
public Selector() -
Selector
-
Selector
-
Selector
-
Selector
-
Selector
-
Selector
-
Selector
-
Selector
public Selector(VersionedList<T> model, ValueRenderer<T> renderer, ElementId elementId, String style) -
Selector
protected Selector(boolean applyStyles, VersionedList<T> model, ValueRenderer<T> valueRenderer, SelectionModel selection, ElementId elementId, String style)
-
-
Method Details
-
getModel
-
setModel
-
setSelectionModel
-
getSelectionModel
-
setValueRenderer
-
getValueRenderer
-
getListBox
-
getExpanderButton
-
getPopupContainer
-
setMaximumVisibleItems
@StyleAttribute(value="maximumVisibleItems", lookupDefault=false) public void setMaximumVisibleItems(int count) -
getMaximumVisibleItems
public int getMaximumVisibleItems() -
setSelectedItem
-
getSelectedItem
-
createSelectedItemReference
-
boundSelection
protected void boundSelection()Attempts to make sure that the selected item is always in range. -
updateSelection
protected void updateSelection() -
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:
-
setExpanded
public void setExpanded(boolean b) -
isExpanded
public boolean isExpanded() -
resetView
protected void resetView() -
getSelectedListValue
-
calculateListSize
protected int calculateListSize() -
calculatePopupLocation
-
expand
protected void expand() -
collapse
protected void collapse()
-