Package jmri.jmrit.logixng
Interface LogixNG
- All Superinterfaces:
Base,Comparable<NamedBean>,NamedBean,PropertyChangeProvider
- All Known Implementing Classes:
DefaultLogixNG
LogixNG.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowExceptionNested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsFields 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_DISCONNECTEDFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates this LogixNG.booleanaddConditionalNG(ConditionalNG conditionalNG) Add a child ConditionalNG to the parent LogixNG.voidClear the startup flag.voiddeleteConditionalNG(ConditionalNG conditionalNG) Delete a ConditionalNG from this LogixNG.voidexecute()Execute all ConditionalNGs if the LogixNG is enabled and activated.voidexecute(boolean allowRunDelayed) Execute all ConditionalNGs if the LogixNG is enabled and activated.voidexecute(boolean allowRunDelayed, boolean isStartup) Execute all ConditionalNGs if the LogixNG is enabled and activated.getConditionalNG(int order) Returns the conditionalNG that will calculate in the specified order.getConditionalNG(String systemName) Get a ConditionalNG belonging to this LogixNG.getConditionalNG_SystemName(int index) Set the system name for the conditionalNG at the specified position in this listgetConditionalNGByUserName(String userName) Get a ConditionalNG belonging to this LogixNG.Get the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.intGet number of ConditionalNGs for this LogixNG.booleanIs this item active?booleanDetermines whether this LogixNG is enabled.booleanisInline()Determines whether this LogixNG is inline or not.booleanDetermines whether this LogixNG is currently during startup.voidsetActive(boolean active) Activates/deactivates this LogixNG.voidsetConditionalNG_SystemName(int index, String systemName) Set the system name for the conditionalNG at the specified position in this listvoidsetEnabled(boolean enable) Set whenether this LogixNG is enabled or disabled.voidsetInline(boolean inline) Sets whether this LogixNG is inline or not.voidsetInlineLogixNG(InlineLogixNG inlineLogixNG) Set the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.voidswapConditionalNG(int nextInOrder, int row) Move 'row' to 'nextInOrder' and shift all between 'nextInOrder' and 'row' up one position.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, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParent, setParentForAllChildren, setup, setUserName, unregisterListeners, updateListenerRef, vetoableChangeMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
PROPERTY_INLINE
- See Also:
-
-
Method Details
-
clearStartup
void clearStartup()Clear the startup flag. -
isStartup
boolean isStartup()Determines whether this LogixNG is currently during startup.- Returns:
- true if the LogixNG is currently during startup, false otherwise
-
setInline
Sets whether this LogixNG is inline or not.- Parameters:
inline- true if the LogixNG is inline, false otherwise
-
isInline
boolean isInline()Determines whether this LogixNG is inline or not.- Returns:
- true if the LogixNG is inline, false otherwise
-
setInlineLogixNG
Set the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.- Parameters:
inlineLogixNG- the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.
-
getInlineLogixNG
Get the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.- Returns:
- the InlineLogixNG
-
setEnabled
Set whenether this LogixNG is enabled or disabled.This method must call registerListeners() / unregisterListeners() and also call execute() if enable is true.
- Parameters:
enable- true if this LogixNG should be enabled, false otherwise
-
isEnabled
boolean isEnabled()Determines whether this LogixNG is enabled. -
activate
void activate()Activates this LogixNG.This method is called by the LogixNG manager during initialization of the LogixNGs.
-
setActive
Activates/deactivates this LogixNG.This method is used by the LogixNG action EnableLogixNG to temporary activate or deactivate a LogixNG.
- Parameters:
active- true if activate, false if deactivate
-
getConditionalNG_SystemName
Set the system name for the conditionalNG at the specified position in this list- Parameters:
index- index of the element to set the system name- Returns:
- the system name
-
setConditionalNG_SystemName
Set the system name for the conditionalNG at the specified position in this list- Parameters:
index- index of the element to set the system namesystemName- the new system name
-
getNumConditionalNGs
int getNumConditionalNGs()Get number of ConditionalNGs for this LogixNG.- Returns:
- the number of conditionals
-
swapConditionalNG
Move 'row' to 'nextInOrder' and shift all between 'nextInOrder' and 'row' up one position. Requiresrow > nextInOrder.- Parameters:
nextInOrder- target order for ConditionalNG at rowrow- position of ConditionalNG to move
-
getConditionalNG
Returns the conditionalNG that will calculate in the specified order. This is also the order the ConditionalNG is listed in the Add/Edit LogixNG dialog. If 'order' is greater than the number of ConditionalNGs for this LogixNG, null is returned.- Parameters:
order- order in which the ConditionalNG calculates- Returns:
- the conditionalNG or null
-
addConditionalNG
Add a child ConditionalNG to the parent LogixNG.The first part handles adding conditionalNGs to the LogixNG list during file loading.
The second part handles normal additions using the GUI, Logix imports or tests.
- Parameters:
conditionalNG- The ConditionalNG object.- Returns:
- true if the ConditionalNG was added, false otherwise.
-
getConditionalNG
Get a ConditionalNG belonging to this LogixNG.- Parameters:
systemName- The name of the ConditionalNG object.- Returns:
- the ConditionalNG object or null if not found.
-
getConditionalNGByUserName
Get a ConditionalNG belonging to this LogixNG.- Parameters:
userName- The name of the ConditionalNG object.- Returns:
- the ConditionalNG object or null if not found.
-
deleteConditionalNG
Delete a ConditionalNG from this LogixNG.Note: Since each LogixNG must have at least one ConditionalNG, the last ConditionalNG will not be deleted.
Returns An array of names used in an error message explaining why ConditionalNG should not be deleted.
- Parameters:
conditionalNG- The ConditionalNG to delete
-
isActivated
boolean isActivated()Is this item active? This method returns true if the the LogixNG is active but not enabled, while the methodBase.isActive()only returns true if the LogixNG is both active and enabled.- Returns:
- true if active, false otherwise.
-
execute
void execute()Execute all ConditionalNGs if the LogixNG is enabled and activated. -
execute
Execute all ConditionalNGs if the LogixNG is enabled and activated.- Parameters:
allowRunDelayed- true if it's ok to run delayed, false otherwise
-
execute
Execute all ConditionalNGs if the LogixNG is enabled and activated.- Parameters:
allowRunDelayed- true if it's ok to run delayed, false otherwiseisStartup- true if startup, false otherwise
-