Package jmri.jmrit.logixng.util
Class LogixNG_SelectNamedBean<E extends NamedBean>
- java.lang.Object
-
- jmri.jmrit.logixng.util.LogixNG_SelectNamedBean<E>
-
- Type Parameters:
E
- the type of the named bean
- All Implemented Interfaces:
java.beans.VetoableChangeListener
,java.util.EventListener
public class LogixNG_SelectNamedBean<E extends NamedBean> extends java.lang.Object implements java.beans.VetoableChangeListener
Select namedBean for LogixNG actions and expressions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogixNG_SelectNamedBean.Type
-
Constructor Summary
Constructors Constructor Description LogixNG_SelectNamedBean(AbstractBase base, java.lang.Class<E> clazz, Manager<E> manager, java.beans.PropertyChangeListener listener)
LogixNG_SelectNamedBean(AbstractBase base, java.lang.Class<E> clazz, Manager<E> manager, InUse inUse, java.beans.PropertyChangeListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add aPropertyChangeListener
for a specific property.void
addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Add aPropertyChangeListener
for a specific property.void
copy(LogixNG_SelectNamedBean<E> copy)
E
evaluateNamedBean(ConditionalNG conditionalNG)
NamedBeanAddressing
getAddressing()
E
getBean()
java.lang.String
getDescription(java.util.Locale locale)
java.lang.String
getFormula()
boolean
getListenToMemory()
java.lang.String
getLocalVariable()
Manager<E>
getManager()
NamedBeanHandle<Memory>
getMemory()
NamedBeanHandle<E>
getNamedBean()
E
getNamedBeanIfDirectAddressing()
boolean
getOnlyDirectAddressingAllowed()
java.lang.String
getReference()
LogixNG_SelectTable
getSelectTable()
void
getUsageDetail(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl, Base base, LogixNG_SelectNamedBean.Type type)
boolean
isDirectAddressing()
void
registerListeners()
Register listeners if this object needs that.void
removeMemory()
void
removeNamedBean()
void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified listener of the specified property from this object.void
removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Remove the specified listener of the specified property from this object.void
setAddressing(NamedBeanAddressing addressing)
void
setDelayedNamedBean(java.lang.String name)
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
setNamedBean(E namedBean)
void
setNamedBean(java.lang.String name)
void
setNamedBean(java.lang.String name, E namedBean)
void
setNamedBean(NamedBeanHandle<E> handle)
void
setOnlyDirectAddressingAllowed()
void
setReference(java.lang.String reference)
void
setup()
void
unregisterListeners()
Unregister listeners if this object needs that.void
vetoableChange(java.beans.PropertyChangeEvent evt)
-
-
-
Constructor Detail
-
LogixNG_SelectNamedBean
public LogixNG_SelectNamedBean(AbstractBase base, java.lang.Class<E> clazz, Manager<E> manager, java.beans.PropertyChangeListener listener)
-
LogixNG_SelectNamedBean
public LogixNG_SelectNamedBean(AbstractBase base, java.lang.Class<E> clazz, Manager<E> manager, InUse inUse, java.beans.PropertyChangeListener listener)
-
-
Method Detail
-
setOnlyDirectAddressingAllowed
public void setOnlyDirectAddressingAllowed()
-
getOnlyDirectAddressingAllowed
public boolean getOnlyDirectAddressingAllowed()
-
copy
public void copy(LogixNG_SelectNamedBean<E> copy) throws ParserException
- Throws:
ParserException
-
getManager
public Manager<E> getManager()
-
setAddressing
public void setAddressing(@Nonnull NamedBeanAddressing addressing) throws ParserException
- Throws:
ParserException
-
isDirectAddressing
public boolean isDirectAddressing()
-
getAddressing
public NamedBeanAddressing getAddressing()
-
setDelayedNamedBean
public void setDelayedNamedBean(@Nonnull java.lang.String name)
-
setup
public void setup()
-
setNamedBean
public void setNamedBean(@Nonnull java.lang.String name)
-
setNamedBean
public void setNamedBean(@Nonnull NamedBeanHandle<E> handle)
-
setNamedBean
public void setNamedBean(@Nonnull E namedBean)
-
setNamedBean
public void setNamedBean(@Nonnull java.lang.String name, @Nonnull E namedBean)
-
removeNamedBean
public void removeNamedBean()
-
getNamedBean
public NamedBeanHandle<E> getNamedBean()
-
getNamedBeanIfDirectAddressing
public E getNamedBeanIfDirectAddressing()
-
setReference
public void setReference(@Nonnull java.lang.String reference)
-
getReference
public java.lang.String getReference()
-
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()
-
setLocalVariable
public void setLocalVariable(@Nonnull java.lang.String localVariable)
-
getLocalVariable
public java.lang.String getLocalVariable()
-
setFormula
public void setFormula(@Nonnull java.lang.String formula) throws ParserException
- Throws:
ParserException
-
getFormula
public java.lang.String getFormula()
-
getSelectTable
public LogixNG_SelectTable getSelectTable()
-
evaluateNamedBean
public E evaluateNamedBean(ConditionalNG conditionalNG) throws JmriException
- Throws:
JmriException
-
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
-
addPropertyChangeListener
public void addPropertyChangeListener(@CheckForNull java.beans.PropertyChangeListener listener)
Add aPropertyChangeListener
for a specific property.- Parameters:
listener
- The PropertyChangeListener to be added
-
addPropertyChangeListener
public void addPropertyChangeListener(@CheckForNull java.lang.String propertyName, @CheckForNull java.beans.PropertyChangeListener listener)
Add aPropertyChangeListener
for a specific property.- Parameters:
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be added
-
removePropertyChangeListener
public void removePropertyChangeListener(@CheckForNull java.beans.PropertyChangeListener listener)
Remove the specified listener of the specified property from this object.- Parameters:
listener
- ThePropertyChangeListener
to remove.
-
removePropertyChangeListener
public void removePropertyChangeListener(@CheckForNull java.lang.String propertyName, @CheckForNull java.beans.PropertyChangeListener listener)
Remove the specified listener of the specified property from this object.- Parameters:
propertyName
- The name of the property to stop listening to.listener
- ThePropertyChangeListener
to remove.
-
getUsageDetail
public void getUsageDetail(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl, Base base, LogixNG_SelectNamedBean.Type type)
-
-