|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.ui.TwoLineDisplayMenuController
public class TwoLineDisplayMenuController
Implements a simple menuing system contoller for a two line display such as a 16x2 LCD.
Constructor Summary | |
---|---|
TwoLineDisplayMenuController(Display display,
PushButton selectButton,
PushButton exitButton,
AnalogInput scrollInput,
Speaker speaker,
MenuItemList menuItemList)
Constructs a two line display menuing controller. |
Method Summary | |
---|---|
void |
buttonPressed()
Provides feedback to the user that a button has been pressed. |
int |
getScrollIndex(int numberOfValues)
Samples the scroll input and scales the result such that this method returns an index from the specified number of values. |
void |
printStatus(String string)
Replaces the text on the status line with the text provided. |
void |
show()
Show the top level menu. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Constructor Detail |
---|
public TwoLineDisplayMenuController(Display display, PushButton selectButton, PushButton exitButton, AnalogInput scrollInput, Speaker speaker, MenuItemList menuItemList)
display
- display to output toselectButton
- button which indicates user has made a selectionexitButton
- button which indicates user wants to go up a levelscrollInput
- input to control scrolling through choicesspeaker
- speaker to provide button press feedback to, may be nullmenuItemList
- top level menuMethod Detail |
---|
public void buttonPressed()
buttonPressed
in interface MenuController
public int getScrollIndex(int numberOfValues)
getScrollIndex
in interface MenuController
numberOfValues
- the number values to scale the scroll input into. For example,
providing the value 3 would cause this function to return 0,
1, or 2 depending on the position of the scroll input
public void printStatus(String string)
printStatus
in interface MenuController
string
- String to display on status linepublic void show()
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |