|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.base.ListModel
org.xith3d.ui.hud.listmodels.DefaultAbstractListModel
org.xith3d.ui.hud.listmodels.TextListModel
org.xith3d.ui.hud.listmodels.StateButtonListModel
public class StateButtonListModel
The TextListModel converts all items to String through String.valueOf(Object).
It also honors the font and font-color properties of the List.
A LabeledStateButton is used to render the items to the List.
| Constructor Summary | |
|---|---|
StateButtonListModel()
|
|
StateButtonListModel(java.util.List<java.lang.Object> items)
|
|
StateButtonListModel(java.util.List<java.lang.Object> items,
LabeledStateButton widget)
|
|
| Method Summary | |
|---|---|
boolean |
checkOnMouseButtonPressedImpl(int itemIndex,
float itemTop,
float itemBottom,
float mouseX,
float mouseY)
Checks, if the item should be selected after it was clicked at the specified location. |
protected void |
checkWidgetType(Widget widget)
|
protected LabeledStateButton |
createWidget()
|
protected float |
getItemHeightImpl(int itemIndex)
Gets the item's height in HUD space. |
boolean |
getItemState(int itemIndex)
Gets an item's state. |
protected float |
getMinItemWidthImpl(int itemIndex)
Gets the item's minimum width in HUD space. |
boolean |
hoverNeedsRedraw()
Checks, whether hovering the items needs the List to be redrawn. |
protected void |
prepareWidgetImpl(float listContentWidth,
Widget widget,
java.lang.Object item,
int itemIndex)
This method is called right before the Widget is used to render a specific item. |
void |
setItemState(int itemIndex,
boolean state)
Sets an item's state. |
| Methods inherited from class org.xith3d.ui.hud.listmodels.TextListModel |
|---|
applyValueToWidget, clear, getItemColor, getItemFont, getUsedWidgets, getWidgetImpl, setItemColor, setItemFont |
| Methods inherited from class org.xith3d.ui.hud.listmodels.DefaultAbstractListModel |
|---|
addItemImpl, getItemImpl, getItemsCount, getItemUserObject, removeItemImpl, setItemImpl, setItemUserObject |
| Methods inherited from class org.xith3d.ui.hud.base.ListModel |
|---|
addItem, addItem, addItems, addItems, checkOnMouseButtonPressed, getItem, getItemHeight, getList, getMinItemWidth, getSelectedIndex, getSelectedItem, getUsesFixedHeight, getWidget, isSelected, markListDirty, prepareWidget, removeItem, setItem, setSelectedIndex, setUsesFixedHeight |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StateButtonListModel(java.util.List<java.lang.Object> items,
LabeledStateButton widget)
public StateButtonListModel(java.util.List<java.lang.Object> items)
public StateButtonListModel()
| Method Detail |
|---|
public void setItemState(int itemIndex,
boolean state)
itemIndex - state - the item's state.public final boolean getItemState(int itemIndex)
itemIndex -
protected void prepareWidgetImpl(float listContentWidth,
Widget widget,
java.lang.Object item,
int itemIndex)
TextListModel
prepareWidgetImpl in class TextListModelpublic boolean hoverNeedsRedraw()
hoverNeedsRedraw in class ListModel
public boolean checkOnMouseButtonPressedImpl(int itemIndex,
float itemTop,
float itemBottom,
float mouseX,
float mouseY)
checkOnMouseButtonPressedImpl in class ListModelprotected float getItemHeightImpl(int itemIndex)
TextListModel
getItemHeightImpl in class TextListModelprotected float getMinItemWidthImpl(int itemIndex)
TextListModel
getMinItemWidthImpl in class TextListModelprotected LabeledStateButton createWidget()
createWidget in class TextListModelprotected void checkWidgetType(Widget widget)
checkWidgetType in class TextListModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||