public class ListBox<T>
extends com.simsilica.lemur.Panel
Modifier and Type | Class and Description |
---|---|
protected class |
ListBox.GridModelDelegate |
static class |
ListBox.ListAction |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTAINER_ID |
static java.lang.String |
EFFECT_ACTIVATE |
static java.lang.String |
EFFECT_CLICK |
static java.lang.String |
EFFECT_DEACTIVATE |
static java.lang.String |
EFFECT_PRESS |
static java.lang.String |
EFFECT_RELEASE |
static java.lang.String |
ELEMENT_ID |
static java.lang.String |
ITEMS_ID |
static java.lang.String |
SELECTOR_ID |
static java.lang.String |
SLIDER_ID |
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETS
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
Modifier | Constructor and Description |
---|---|
|
ListBox() |
protected |
ListBox(boolean applyStyles,
VersionedList<T> model,
ValueRenderer<T> cellRenderer,
SelectionModel selection,
com.simsilica.lemur.style.ElementId elementId,
java.lang.String style) |
|
ListBox(VersionedList<T> model) |
|
ListBox(VersionedList<T> model,
com.simsilica.lemur.style.ElementId elementId,
java.lang.String style) |
|
ListBox(VersionedList<T> model,
java.lang.String style) |
|
ListBox(VersionedList<T> model,
ValueRenderer<T> renderer,
com.simsilica.lemur.style.ElementId elementId,
java.lang.String style) |
|
ListBox(VersionedList<T> model,
ValueRenderer<T> renderer,
java.lang.String style) |
Modifier and Type | Method and Description |
---|---|
protected void |
activate() |
void |
addClickCommands(com.simsilica.lemur.Command<? super ListBox>... commands) |
void |
addCommands(ListBox.ListAction a,
com.simsilica.lemur.Command<? super ListBox>... commands) |
protected void |
deactivate() |
protected void |
detachItemListeners()
Used when the list model is swapped out.
|
ValueRenderer<T> |
getCellRenderer() |
java.util.List<com.simsilica.lemur.Command<? super ListBox>> |
getClickCommands() |
java.util.List<com.simsilica.lemur.Command<? super ListBox>> |
getCommands(ListBox.ListAction a) |
GridPanel |
getGridPanel() |
protected com.simsilica.lemur.Panel |
getListCell(int row,
int col,
com.simsilica.lemur.Panel existing) |
VersionedList<T> |
getModel() |
boolean |
getScrollOnHover() |
T |
getSelectedItem()
Returns the currently selected list item if there is one and only
one item selected.
|
SelectionModel |
getSelectionModel() |
com.simsilica.lemur.Slider |
getSlider() |
int |
getVisibleItems() |
protected void |
gridResized(com.jme3.math.Vector3f pos,
com.jme3.math.Vector3f size) |
static void |
initializeDefaultStyles(com.simsilica.lemur.style.Styles styles,
com.simsilica.lemur.style.Attributes attrs) |
protected void |
refreshActivation() |
protected void |
refreshSelector() |
void |
removeClickCommands(com.simsilica.lemur.Command<? super ListBox>... commands) |
protected void |
resetModelRange() |
protected void |
scroll(int amount) |
void |
setAlpha(float alpha,
boolean recursive) |
void |
setCellRenderer(ValueRenderer<T> renderer) |
void |
setListCommands(java.util.Map<ListBox.ListAction,java.util.List<com.simsilica.lemur.Command<? super ListBox>>> map) |
void |
setModel(VersionedList<T> model) |
void |
setScrollOnHover(boolean f)
Set to true to enable mouse-wheel style scrolling when the
mouse is hovering over the ListBox.
|
void |
setSelectionModel(SelectionModel selection) |
void |
setVisibleItems(int count) |
java.lang.String |
toString() |
void |
updateLogicalState(float tpf) |
addEffect, addMouseListener, getAlpha, getBackground, getBorder, getEffectControl, getEffects, getElementId, getInsets, getInsetsComponent, getPreferredSize, getSize, getStyle, hasEffect, initializeDefaultStyles, removeEffect, removeMouseListener, runEffect, setAlpha, setBackground, setBorder, setChildAlpha, setEffects, setInsets, setInsetsComponent, setPreferredSize, setSize
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
addControl, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, 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
public static final java.lang.String ELEMENT_ID
public static final java.lang.String CONTAINER_ID
public static final java.lang.String ITEMS_ID
public static final java.lang.String SLIDER_ID
public static final java.lang.String SELECTOR_ID
public static final java.lang.String EFFECT_PRESS
public static final java.lang.String EFFECT_RELEASE
public static final java.lang.String EFFECT_CLICK
public static final java.lang.String EFFECT_ACTIVATE
public static final java.lang.String EFFECT_DEACTIVATE
public ListBox()
public ListBox(VersionedList<T> model)
public ListBox(VersionedList<T> model, ValueRenderer<T> renderer, java.lang.String style)
public ListBox(VersionedList<T> model, java.lang.String style)
public ListBox(VersionedList<T> model, com.simsilica.lemur.style.ElementId elementId, java.lang.String style)
public ListBox(VersionedList<T> model, ValueRenderer<T> renderer, com.simsilica.lemur.style.ElementId elementId, java.lang.String style)
protected ListBox(boolean applyStyles, VersionedList<T> model, ValueRenderer<T> cellRenderer, SelectionModel selection, com.simsilica.lemur.style.ElementId elementId, java.lang.String style)
public static void initializeDefaultStyles(com.simsilica.lemur.style.Styles styles, com.simsilica.lemur.style.Attributes attrs)
public void updateLogicalState(float tpf)
updateLogicalState
in class com.jme3.scene.Node
protected void gridResized(com.jme3.math.Vector3f pos, com.jme3.math.Vector3f size)
public void setModel(VersionedList<T> model)
public VersionedList<T> getModel()
public com.simsilica.lemur.Slider getSlider()
public GridPanel getGridPanel()
public void setSelectionModel(SelectionModel selection)
public SelectionModel getSelectionModel()
public T getSelectedItem()
public void addCommands(ListBox.ListAction a, com.simsilica.lemur.Command<? super ListBox>... commands)
public java.util.List<com.simsilica.lemur.Command<? super ListBox>> getCommands(ListBox.ListAction a)
public void addClickCommands(com.simsilica.lemur.Command<? super ListBox>... commands)
public void removeClickCommands(com.simsilica.lemur.Command<? super ListBox>... commands)
public java.util.List<com.simsilica.lemur.Command<? super ListBox>> getClickCommands()
@StyleAttribute(value="listCommands") public void setListCommands(java.util.Map<ListBox.ListAction,java.util.List<com.simsilica.lemur.Command<? super ListBox>>> map)
@StyleAttribute(value="visibleItems", lookupDefault=false) public void setVisibleItems(int count)
public int getVisibleItems()
@StyleAttribute(value="cellRenderer", lookupDefault=false) public void setCellRenderer(ValueRenderer<T> renderer)
public ValueRenderer<T> getCellRenderer()
public void setAlpha(float alpha, boolean recursive)
setAlpha
in class com.simsilica.lemur.Panel
@StyleAttribute(value="scrollOnHover", lookupDefault=false) public void setScrollOnHover(boolean f)
public boolean getScrollOnHover()
protected void refreshSelector()
protected void resetModelRange()
protected void refreshActivation()
protected com.simsilica.lemur.Panel getListCell(int row, int col, com.simsilica.lemur.Panel existing)
protected void detachItemListeners()
protected void scroll(int amount)
protected void activate()
protected void deactivate()
public java.lang.String toString()
toString
in class com.simsilica.lemur.Panel