Package jmri.jmrit.logixng.util
Class LogixNG_SelectDouble
- java.lang.Object
-
- jmri.jmrit.logixng.util.LogixNG_SelectDouble
-
- All Implemented Interfaces:
java.beans.VetoableChangeListener
,java.util.EventListener
public class LogixNG_SelectDouble extends java.lang.Object implements java.beans.VetoableChangeListener
Select a double for LogixNG actions and expressions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogixNG_SelectDouble.DefaultFormatterParserValidator
static interface
LogixNG_SelectDouble.FormatterParserValidator
Format, parse and validate.
-
Constructor Summary
Constructors Constructor Description LogixNG_SelectDouble(AbstractBase base, int numDecimals, java.beans.PropertyChangeListener listener)
LogixNG_SelectDouble(AbstractBase base, int numDecimals, java.beans.PropertyChangeListener listener, LogixNG_SelectDouble.FormatterParserValidator formatterParserValidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(LogixNG_SelectDouble copy)
double
evaluateValue(ConditionalNG conditionalNG)
java.lang.String
formatValue(double value)
Format the valueNamedBeanAddressing
getAddressing()
java.lang.String
getDescription(java.util.Locale locale)
LogixNG_SelectDouble.FormatterParserValidator
getFormatterParserValidator()
java.lang.String
getFormula()
boolean
getListenToMemory()
java.lang.String
getLocalVariable()
NamedBeanHandle<Memory>
getMemory()
java.lang.String
getReference()
LogixNG_SelectTable
getSelectTable()
double
getValue()
boolean
isDirectAddressing()
void
registerListeners()
Register listeners if this object needs that.void
removeMemory()
void
setAddressing(NamedBeanAddressing addressing)
void
setFormula(java.lang.String formula)
void
setListenToMemory(boolean listenToMemory)
void
setLocalVariable(java.lang.String localVariable)
void
setMemory(java.lang.String memoryName)
void
setMemory(Memory memory)
void
setMemory(NamedBeanHandle<Memory> handle)
void
setReference(java.lang.String reference)
void
setValue(double value)
void
unregisterListeners()
Unregister listeners if this object needs that.void
vetoableChange(java.beans.PropertyChangeEvent evt)
-
-
-
Constructor Detail
-
LogixNG_SelectDouble
public LogixNG_SelectDouble(@Nonnull AbstractBase base, int numDecimals, @Nonnull java.beans.PropertyChangeListener listener)
-
LogixNG_SelectDouble
public LogixNG_SelectDouble(@Nonnull AbstractBase base, int numDecimals, @Nonnull java.beans.PropertyChangeListener listener, @Nonnull LogixNG_SelectDouble.FormatterParserValidator formatterParserValidator)
-
-
Method Detail
-
copy
public void copy(LogixNG_SelectDouble copy) throws ParserException
- Throws:
ParserException
-
getFormatterParserValidator
@Nonnull public LogixNG_SelectDouble.FormatterParserValidator getFormatterParserValidator()
-
setAddressing
public void setAddressing(@Nonnull NamedBeanAddressing addressing) throws ParserException
- Throws:
ParserException
-
isDirectAddressing
public boolean isDirectAddressing()
-
getAddressing
public NamedBeanAddressing getAddressing()
-
setValue
public void setValue(double value)
-
getValue
public double getValue()
-
setReference
public void setReference(@Nonnull java.lang.String reference)
-
getReference
public java.lang.String getReference()
-
setLocalVariable
public void setLocalVariable(@Nonnull java.lang.String localVariable)
-
getLocalVariable
public java.lang.String getLocalVariable()
-
setMemory
public void setMemory(@Nonnull NamedBeanHandle<Memory> handle)
-
removeMemory
public void removeMemory()
-
getMemory
public NamedBeanHandle<Memory> getMemory()
-
setListenToMemory
public void setListenToMemory(boolean listenToMemory)
-
getListenToMemory
public boolean getListenToMemory()
-
setFormula
public void setFormula(@Nonnull java.lang.String formula) throws ParserException
- Throws:
ParserException
-
getFormula
public java.lang.String getFormula()
-
getSelectTable
public LogixNG_SelectTable getSelectTable()
-
evaluateValue
public double evaluateValue(ConditionalNG conditionalNG) throws JmriException
- Throws:
JmriException
-
formatValue
public java.lang.String formatValue(double value)
Format the value- Parameters:
value
- The value- Returns:
- speed formatted as %1.3f
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
-
registerListeners
public void registerListeners()
Register listeners if this object needs that.
-
unregisterListeners
public void unregisterListeners()
Unregister listeners if this object needs that.
-
vetoableChange
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
- Specified by:
vetoableChange
in interfacejava.beans.VetoableChangeListener
- Throws:
java.beans.PropertyVetoException
-
-