public class AnalogMenuItem extends MenuItem<Integer>
eepromAddress, functionName, id, name| Constructor | Description |
|---|---|
AnalogMenuItem() |
|
AnalogMenuItem(String name,
int id,
int eepromAddress,
String functionName,
int maxValue,
int offset,
int divisor,
String unitName) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
accept(MenuItemVisitor visitor) |
See the MenuItemVistor for more info.
|
boolean |
equals(Object o) |
|
int |
getDivisor() |
The divisor used when displaying the item, for example value 50 with a divisor of 10 is 5.0
|
int |
getMaxValue() |
The maximum value (0 based integer) that this item can represent
|
int |
getOffset() |
The offset from 0 that is used when displaying the item, can be negative
|
String |
getUnitName() |
The unit name to appear directly after the value, for example a temprature item may be "oC"
where as a volume control could be "dB"
|
int |
hashCode() |
|
MenuState<Integer> |
newMenuState(Integer value,
boolean changed,
boolean active) |
returns a new state object that represents the current value for the menu.
|
getEepromAddress, getFunctionName, getId, getName, hasChildren, toStringpublic int getMaxValue()
public int getOffset()
public int getDivisor()
public String getUnitName()
public MenuState<Integer> newMenuState(Integer value, boolean changed, boolean active)
newMenuState in class MenuItem<Integer>value - the new valuechanged - if the value has changedactive - if the menu item is active, can be used for your own purposes.public void accept(MenuItemVisitor visitor)
Copyright © 2018. All rights reserved.