Package jmri.jmrit.logixng.actions
Class AbstractDigitalAction
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.jmrit.logixng.implementation.AbstractBase
-
- jmri.jmrit.logixng.actions.AbstractDigitalAction
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,Base
,DigitalAction
,DigitalActionBean
,NamedBean
- Direct Known Subclasses:
ActionAtomicBoolean
,ActionAudio
,ActionAudioIcon
,ActionBlock
,ActionClearSlots
,ActionClock
,ActionClockRate
,ActionCreateBeansFromTable
,ActionDispatcher
,ActionEntryExit
,ActionFindTableRowOrColumn
,ActionLayoutTurnout
,ActionLight
,ActionLightIntensity
,ActionListenOnBeans
,ActionListenOnBeansLocalVariable
,ActionListenOnBeansTable
,ActionLocalVariable
,ActionMemory
,ActionOBlock
,ActionPositionable
,ActionPositionableByClass
,ActionPower
,ActionReporter
,ActionRequestUpdateAllSensors
,ActionRequestUpdateOfSensor
,ActionScript
,ActionSensor
,ActionSetReporter
,ActionShutDownTask
,ActionSignalHead
,ActionSignalMast
,ActionSound
,ActionTable
,ActionThrottle
,ActionThrottleFunction
,ActionTimer
,ActionTurnout
,ActionTurnoutLock
,ActionUpdateSlots
,ActionWarrant
,Break
,Continue
,DigitalCallModule
,DigitalFormula
,DigitalMany
,DoAnalogAction
,DoStringAction
,EnableLogix
,EnableLogixNG
,Error
,ExecuteAction
,ExecuteDelayed
,Exit
,For
,ForEach
,IfThenElse
,JsonDecode
,LogData
,Logix
,LogLocalVariables
,ProgramOnMain
,Publish
,Return
,RunOnce
,Sequence
,SetSpeedZero
,ShowDialog
,ShutdownComputer
,SimulateTurnoutFeedback
,Subscribe
,TableForEach
,Timeout
,TriggerRoute
,WebBrowser
,WebRequest
,WindowManagement
public abstract class AbstractDigitalAction extends AbstractBase implements DigitalActionBean
The base class for LogixNG Actions
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractBase
_listenersAreRegistered
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description AbstractDigitalAction(java.lang.String sys, java.lang.String user)
AbstractDigitalAction(java.lang.String sys, java.lang.String user, Category category)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBeanType()
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.java.lang.String
getNewSocketName()
java.lang.String
getNewSocketName(java.lang.String[] names)
Base
getParent()
Get the parent.protected java.lang.String
getPreferredSocketPrefix()
int
getState()
Provide generic access to internal state.void
setParent(Base parent)
Set the parent.void
setState(int s)
Provide generic access to internal state.-
Methods inherited from class jmri.jmrit.logixng.implementation.AbstractBase
assertListenersAreNotRegistered, compareSystemNameSuffix, deepCopyChildren, dispose, disposeMe, getCategory, getChild, getChildCount, getConditionalNG, getListenerRefsIncludingChildren, getLogixNG, getRoot, getUsageDetail, getUsageTree, isActive, printTree, printTree, printTree, printTreeRow, registerListeners, registerListenersForThisClass, setParentForAllChildren, unregisterListeners, unregisterListenersForThisClass
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, describeState, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.Base
addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getLongDescription, getLongDescription, getModule, getNumPropertyChangeListeners, getPropertyChangeListenersByReference, getRoot, getShortDescription, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isEnabled, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParentForAllChildren, setup, setUserName, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.jmrit.logixng.DigitalAction
execute
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
AbstractDigitalAction
public AbstractDigitalAction(java.lang.String sys, java.lang.String user) throws NamedBean.BadUserNameException, NamedBean.BadSystemNameException
-
AbstractDigitalAction
public AbstractDigitalAction(java.lang.String sys, java.lang.String user, Category category) throws NamedBean.BadUserNameException, NamedBean.BadSystemNameException
-
-
Method Detail
-
getParent
public Base getParent()
Get the parent.The following rules apply
- LogixNGs has no parent. The method throws an UnsupportedOperationException if called.
- Expressions and actions has the male socket that they are connected to as their parent.
- Male sockets has the female socket that they are connected to as their parent.
- The parent of a female sockets is the LogixNG, expression or action that has this female socket.
- The parent of a male sockets is the same parent as the expression or action that it contains.
-
setParent
public void setParent(Base parent)
Set the parent.The following rules apply
- ExecutionGroups has no parent. The method throws an UnsupportedOperationException if called.
- LogixNGs has the execution group as its parent.
- Expressions and actions has the male socket that they are connected to as their parent.
- Male sockets has the female socket that they are connected to as their parent.
- The parent of a female sockets is the LogixNG, expression or action that has this female socket.
- The parent of a male sockets is the same parent as the expression or action that it contains.
-
getPreferredSocketPrefix
protected java.lang.String getPreferredSocketPrefix()
-
getNewSocketName
public java.lang.String getNewSocketName()
-
getNewSocketName
public java.lang.String getNewSocketName(java.lang.String[] names)
-
getBeanType
public java.lang.String getBeanType()
Description copied from interface:NamedBean
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Specified by:
getBeanType
in interfaceNamedBean
- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
setState
public void setState(int s) throws JmriException
Description copied from interface:NamedBean
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.
- Specified by:
setState
in interfaceNamedBean
- Parameters:
s
- the state- Throws:
JmriException
- general error when setting the state fails
-
-