Interface Base
-
- All Superinterfaces:
PropertyChangeProvider
- All Known Subinterfaces:
AnalogAction,AnalogActionBean,AnalogExpression,AnalogExpressionBean,ConditionalNG,Debugable,DigitalAction,DigitalActionBean,DigitalBooleanAction,DigitalBooleanActionBean,DigitalExpression,DigitalExpressionBean,FemaleAnalogActionSocket,FemaleAnalogExpressionSocket,FemaleAnySocket,FemaleDigitalActionSocket,FemaleDigitalBooleanActionSocket,FemaleDigitalExpressionSocket,FemaleGenericExpressionSocket,FemaleSocket,FemaleStringActionSocket,FemaleStringExpressionSocket,GlobalVariable,LogixNG,MaleAnalogActionSocket,MaleAnalogExpressionSocket,MaleDigitalActionSocket,MaleDigitalBooleanActionSocket,MaleDigitalExpressionSocket,MaleSocket,MaleStringActionSocket,MaleStringExpressionSocket,Module,StringAction,StringActionBean,StringExpression,StringExpressionBean
- All Known Implementing Classes:
AbstractAnalogAction,AbstractAnalogExpression,AbstractBase,AbstractDebuggerMaleSocket,AbstractDigitalAction,AbstractDigitalBooleanAction,AbstractDigitalExpression,AbstractFemaleSocket,AbstractMaleSocket,AbstractStringAction,AbstractStringExpression,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,AnalogActionLightIntensity,AnalogActionMemory,AnalogExpressionAnalogIO,AnalogExpressionConstant,AnalogExpressionLocalVariable,AnalogExpressionMemory,AnalogFormula,AnalogMany,And,Antecedent,Break,ClipboardMany,ConnectionName,Continue,DebuggerMaleAnalogActionSocket,DebuggerMaleAnalogExpressionSocket,DebuggerMaleDigitalActionSocket,DebuggerMaleDigitalBooleanActionSocket,DebuggerMaleDigitalExpressionSocket,DebuggerMaleStringActionSocket,DebuggerMaleStringExpressionSocket,DefaultClipboard,DefaultConditionalNG,DefaultFemaleAnalogActionSocket,DefaultFemaleAnalogExpressionSocket,DefaultFemaleAnySocket,DefaultFemaleDigitalActionSocket,DefaultFemaleDigitalBooleanActionSocket,DefaultFemaleDigitalExpressionSocket,DefaultFemaleGenericExpressionSocket,DefaultFemaleStringActionSocket,DefaultFemaleStringExpressionSocket,DefaultGlobalVariable,DefaultLogixNG,DefaultMaleAnalogActionSocket,DefaultMaleAnalogExpressionSocket,DefaultMaleDigitalActionSocket,DefaultMaleDigitalBooleanActionSocket,DefaultMaleDigitalExpressionSocket,DefaultMaleStringActionSocket,DefaultMaleStringExpressionSocket,DefaultModule,DigitalBooleanLogixAction,DigitalBooleanMany,DigitalCallModule,DigitalCallModule,DigitalFormula,DigitalFormula,DigitalMany,DoAnalogAction,DoStringAction,EnableLogix,EnableLogixNG,Error,ExecuteAction,ExecuteDelayed,ExecuteProgram,Exit,ExpressionAudio,ExpressionBlock,ExpressionClock,ExpressionConditional,ExpressionDispatcher,ExpressionEntryExit,ExpressionLight,ExpressionLinuxLinePower,ExpressionLocalVariable,ExpressionMemory,ExpressionOBlock,ExpressionPower,ExpressionReference,ExpressionReporter,ExpressionScript,ExpressionSection,ExpressionSensor,ExpressionSensorEdge,ExpressionSignalHead,ExpressionSignalMast,ExpressionSlotUsage,ExpressionTransit,ExpressionTurnout,ExpressionWarrant,False,FileAsFlag,For,ForEach,Hold,IfThenElse,JsonDecode,LastResultOfDigitalExpression,LogData,LogData,Logix,LogLocalVariables,ModuleEditorMaleSocket,Not,NullBase,OperationsProStartAutomation,Or,ProgramOnMain,Publish,Return,RunOnce,SendMergCbusEvent,Sequence,SetLocalVariables,SetSpeedZero,ShowDialog,ShutdownComputer,SimulateTurnoutFeedback,StringActionMemory,StringActionStringIO,StringExpressionConstant,StringExpressionMemory,StringExpressionStringIO,StringFormula,StringMany,Subscribe,TableForEach,Timeout,Timer,TimeSinceMidnight,TriggerOnce,TriggerRoute,True,WebBrowser,WebRequest,WindowManagement
public interface Base extends PropertyChangeProvider
The base interface for LogixNG expressions and actions. Used to simplify the user interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBase.PrintTreeSettingsstatic interfaceBase.RunnableWithBasestatic interfaceBase.RunnableWithBaseThrowException
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPRINT_LINE_NUMBERS_FORMATstatic java.lang.StringPROPERTY_CHILD_COUNTThe name of the property child count.static java.lang.StringPROPERTY_CHILD_REORDERThe name of the property child reorder.static java.lang.StringPROPERTY_LAST_RESULT_CHANGEDThe last result of the expression has changed.static java.lang.StringPROPERTY_SOCKET_CONNECTEDThe socket has been connected.static java.lang.StringPROPERTY_SOCKET_DISCONNECTEDThe socket has been disconnected.static java.lang.StringSEPARATORSeparator returned by enums toString() methods to get a separator in JComboBoxes.static intSOCKET_CONNECTEDConstant representing an "connected" state of the socketstatic intSOCKET_DISCONNECTEDConstant representing an "disconnected" state of the socket
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener, java.lang.String name, java.lang.String listenerRef)Request a call-back when a bound property changes.voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener, java.lang.String name, java.lang.String listenerRef)Request a call-back when a bound property changes.BasedeepCopyChildren(Base original, java.util.Map<java.lang.String,java.lang.String> systemNames, java.util.Map<java.lang.String,java.lang.String> userNames)Do a deep copy of children from the original to me.voiddispose()Deactivate this object, so that it releases as many resources as possible and no longer effects others.default voiddoSocketOperation(int index, FemaleSocketOperation oper)Do an operation on a childdefault booleanexistsInTree()Does this item exists in the tree?default voidforEntireTree(Base.RunnableWithBase r)Do something on every item in the sub tree of this item.default voidforEntireTreeWithException(Base.RunnableWithBaseThrowException r)Do something on every item in the sub tree of this item.CategorygetCategory()Get the category.FemaleSocketgetChild(int index)Get a child of this itemintgetChildCount()Get the number of children.java.lang.StringgetComment()Get associated comment text.ConditionalNGgetConditionalNG()Get the ConditionalNG of this item.BasegetDeepCopy(java.util.Map<java.lang.String,java.lang.String> systemNames, java.util.Map<java.lang.String,java.lang.String> userNames)Create a deep copy of myself and my children The item needs to try to lookup itself in both systemNames and userNames to see if the user has given a new system name and/or a new user name.If no new system name is given, an auto system name is used.java.lang.StringgetListenerRef(java.beans.PropertyChangeListener l)Get the textual reference for the specific listenerjava.util.ArrayList<java.lang.String>getListenerRefs()Returns a list of all the listeners referencesvoidgetListenerRefsIncludingChildren(java.util.List<java.lang.String> list)Returns a list of all the listeners references for this object and all its children.static java.lang.StringgetListenString(boolean listen)LogixNGgetLogixNG()Get the LogixNG of this item.default java.lang.StringgetLongDescription()Get a long description of this item.java.lang.StringgetLongDescription(java.util.Locale locale)Get a long description of this item.default ModulegetModule()Get the Module of this item, if it's part of a module.static java.lang.StringgetNoListenString()intgetNumPropertyChangeListeners()Number of current listeners.BasegetParent()Get the parent.java.beans.PropertyChangeListener[]getPropertyChangeListenersByReference(java.lang.String name)Get a list of all the property change listeners that are registered using a specific nameBasegetRoot()Get the root of the tree that this item belongs to.default java.lang.StringgetShortDescription()Get a short description of this item.java.lang.StringgetShortDescription(java.util.Locale locale)Get a short description of this item.java.lang.StringgetSystemName()Get the system name.voidgetUsageDetail(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl)Add a new NamedBeanUsageReport to the report list if there are any matches in this action or expresssion.voidgetUsageTree(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl)Navigate the LogixNG tree.java.lang.StringgetUserName()Get the user name.default booleanhasChild(Base b)Does this item has the child b?booleanisActive()Is this item active?default booleanisEnabled()Determines whether this object is enabled.default booleanisSocketOperationAllowed(int index, FemaleSocketOperation oper)Is the operation allowed on this child?default voidprintTree(java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)Print the tree to a stream.default voidprintTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)Print the tree to a stream.voidprintTree(Base.PrintTreeSettings settings, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)Print the tree to a stream.voidprintTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, java.lang.String currentIndent, MutableInt lineNumber)Print the tree to a stream.voidprintTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)Print the tree to a stream.voidregisterListeners()Register listeners if this object needs that.voidsetComment(java.lang.String comment)Set associated comment text.voidsetParent(Base parent)Set the parent.booleansetParentForAllChildren(java.util.List<java.lang.String> errors)Set the parent for all the children.voidsetup()Setup this object and its children.voidsetUserName(java.lang.String s)Get the user name.voidunregisterListeners()Unregister listeners if this object needs that.voidupdateListenerRef(java.beans.PropertyChangeListener l, java.lang.String newName)voidvetoableChange(java.beans.PropertyChangeEvent evt)-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
SEPARATOR
static final java.lang.String SEPARATOR
Separator returned by enums toString() methods to get a separator in JComboBoxes. SeeExpressionEntryExit.EntryExitStatefor an example.- See Also:
- Constant Field Values
-
PROPERTY_CHILD_COUNT
static final java.lang.String PROPERTY_CHILD_COUNT
The name of the property child count. To get the number of children, use the method getChildCount(). This constant is used in calls to firePropertyChange(). The class fires a property change then a child is added or removed.If children are removed, the field oldValue of the PropertyChange event must be a List<FemaleSocket> with the FemaleSockets that are removed from the list so that the listener can unregister itself as a listener of this female socket.
If children are added, the field newValue of the PropertyChange event must be a List<FemaleSocket> with the FemaleSockets that are added to the list so that the listener can register itself as a listener of this female socket.
- See Also:
- Constant Field Values
-
PROPERTY_CHILD_REORDER
static final java.lang.String PROPERTY_CHILD_REORDER
The name of the property child reorder. The number of children has remained the same, but the order of children has changed.The field newValue of the PropertyChange event must be a List<FemaleSocket> with the FemaleSockets that are reordered so that the listener can update the tree.
- See Also:
- Constant Field Values
-
PROPERTY_SOCKET_CONNECTED
static final java.lang.String PROPERTY_SOCKET_CONNECTED
The socket has been connected. This constant is used in calls to firePropertyChange(). The socket fires a property change when it is connected or disconnected.- See Also:
- Constant Field Values
-
PROPERTY_SOCKET_DISCONNECTED
static final java.lang.String PROPERTY_SOCKET_DISCONNECTED
The socket has been disconnected. This constant is used in calls to firePropertyChange(). The socket fires a property change when it is connected or disconnected.- See Also:
- Constant Field Values
-
PROPERTY_LAST_RESULT_CHANGED
static final java.lang.String PROPERTY_LAST_RESULT_CHANGED
The last result of the expression has changed. This constant is used in calls to firePropertyChange().- See Also:
- Constant Field Values
-
SOCKET_CONNECTED
static final int SOCKET_CONNECTED
Constant representing an "connected" state of the socket- See Also:
- Constant Field Values
-
SOCKET_DISCONNECTED
static final int SOCKET_DISCONNECTED
Constant representing an "disconnected" state of the socket- See Also:
- Constant Field Values
-
PRINT_LINE_NUMBERS_FORMAT
static final java.lang.String PRINT_LINE_NUMBERS_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSystemName
java.lang.String getSystemName()
Get the system name.- Returns:
- the system name
-
getUserName
@CheckReturnValue @CheckForNull java.lang.String getUserName()
Get the user name.- Returns:
- the user name
-
getComment
@CheckReturnValue @CheckForNull java.lang.String getComment()
Get associated comment text. A LogixNG comment can have multiple lines, separated with \n.- Returns:
- the comment or null
-
setUserName
void setUserName(@CheckForNull java.lang.String s) throws NamedBean.BadUserNameException
Get the user name.- Parameters:
s- the new user name- Throws:
NamedBean.BadUserNameException- when needed
-
getDeepCopy
Base getDeepCopy(java.util.Map<java.lang.String,java.lang.String> systemNames, java.util.Map<java.lang.String,java.lang.String> userNames) throws JmriException
Create a deep copy of myself and my children The item needs to try to lookup itself in both systemNames and userNames to see if the user has given a new system name and/or a new user name.If no new system name is given, an auto system name is used. If no user name is given, a null user name is used.- Parameters:
systemNames- a map of old and new system nameuserNames- a map of old system name and new user name- Returns:
- a deep copy
- Throws:
JmriException- in case of an error
-
deepCopyChildren
Base deepCopyChildren(Base original, java.util.Map<java.lang.String,java.lang.String> systemNames, java.util.Map<java.lang.String,java.lang.String> userNames) throws JmriException
Do a deep copy of children from the original to me.- Parameters:
original- the item to copy fromsystemNames- a map of old and new system nameuserNames- a map of old system name and new user name- Returns:
- myself
- Throws:
JmriException- in case of an error
-
setComment
void setComment(@CheckForNull java.lang.String comment)
Set associated comment text.Comments can be any valid text.
- Parameters:
comment- the comment or null to remove an existing comment
-
getShortDescription
default java.lang.String getShortDescription()
Get a short description of this item.- Returns:
- a short description
-
getLongDescription
default java.lang.String getLongDescription()
Get a long description of this item.- Returns:
- a long description
-
getShortDescription
java.lang.String getShortDescription(java.util.Locale locale)
Get a short description of this item.- Parameters:
locale- The locale to be used- Returns:
- a short description
-
getLongDescription
java.lang.String getLongDescription(java.util.Locale locale)
Get a long description of this item.- Parameters:
locale- The locale to be used- Returns:
- a long description
-
getModule
default Module getModule()
Get the Module of this item, if it's part of a module.- Returns:
- the Module that owns this item or null if it's owned by a ConditonalNG.
-
getConditionalNG
ConditionalNG getConditionalNG()
Get the ConditionalNG of this item.- Returns:
- the ConditionalNG that owns this item
-
getLogixNG
LogixNG getLogixNG()
Get the LogixNG of this item.- Returns:
- the LogixNG that owns this item
-
getRoot
Base getRoot()
Get the root of the tree that this item belongs to.- Returns:
- the top most item in the tree
-
getParent
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.
- Returns:
- the parent of this object
-
setParent
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.
- Parameters:
parent- the new parent of this object
-
setParentForAllChildren
boolean setParentForAllChildren(java.util.List<java.lang.String> errors)
Set the parent for all the children.- Parameters:
errors- a list of potential errors- Returns:
- true if success, false otherwise
-
getChild
FemaleSocket getChild(int index) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Get a child of this item- Parameters:
index- the index of the child to get- Returns:
- the child
- Throws:
java.lang.IllegalArgumentException- if the index is less than 0 or greater or equal with the value returned by getChildCount()java.lang.UnsupportedOperationException- when needed
-
getChildCount
int getChildCount()
Get the number of children.- Returns:
- the number of children
-
isSocketOperationAllowed
default boolean isSocketOperationAllowed(int index, FemaleSocketOperation oper)
Is the operation allowed on this child?- Parameters:
index- the index of the child to do the operation onoper- the operation to do- Returns:
- true if operation is allowed, false otherwise
-
doSocketOperation
default void doSocketOperation(int index, FemaleSocketOperation oper)
Do an operation on a child- Parameters:
index- the index of the child to do the operation onoper- the operation to do
-
getCategory
Category getCategory()
Get the category.- Returns:
- the category
-
isActive
boolean isActive()
Is this item active? If this item is enabled and all the parents are enabled, this item is active.- Returns:
- true if active, false otherwise.
-
setup
void setup()
Setup this object and its children. This method is used to lookup system names for child sockets, turnouts, sensors, and so on.
-
dispose
void dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others.For example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this object contained.
-
isEnabled
default boolean isEnabled()
Determines whether this object is enabled.- Returns:
- true if the object is enabled, false otherwise
-
registerListeners
void registerListeners()
Register listeners if this object needs that.Important: This method may be called more than once. Methods overriding this method must ensure that listeners are not registered more than once.
-
unregisterListeners
void unregisterListeners()
Unregister listeners if this object needs that.Important: This method may be called more than once. Methods overriding this method must ensure that listeners are not unregistered more than once.
-
printTree
default void printTree(java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
writer- the stream to print the tree toindent- the indentation of each levellineNumber- the line number
-
printTree
void printTree(Base.PrintTreeSettings settings, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
settings- settings for what to printwriter- the stream to print the tree toindent- the indentation of each levellineNumber- the line number
-
printTree
default void printTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
locale- The locale to be usedwriter- the stream to print the tree toindent- the indentation of each levellineNumber- the line number
-
printTree
void printTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
settings- settings for what to printlocale- The locale to be usedwriter- the stream to print the tree toindent- the indentation of each levellineNumber- the line number
-
printTree
void printTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, java.lang.String currentIndent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
settings- settings for what to printlocale- The locale to be usedwriter- the stream to print the tree toindent- the indentation of each levelcurrentIndent- the current indentationlineNumber- the line number
-
getListenString
static java.lang.String getListenString(boolean listen)
-
getNoListenString
static java.lang.String getNoListenString()
-
getUsageTree
void getUsageTree(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl)
Navigate the LogixNG tree.- Parameters:
level- The current recursion level for debugging.bean- The named bean that is the object of the search.report- A list of NamedBeanUsageReport usage reports.cdl- The current ConditionalNG bean. Null for Module searches since there is no conditional
-
getUsageDetail
void getUsageDetail(int level, NamedBean bean, java.util.List<NamedBeanUsageReport> report, NamedBean cdl)
Add a new NamedBeanUsageReport to the report list if there are any matches in this action or expresssion.NamedBeanUsageReport Usage keys:
- LogixNGAction
- LogixNGExpression
- Parameters:
level- The current recursion level for debugging.bean- The named bean that is the object of the search.report- A list of NamedBeanUsageReport usage reports.cdl- The current ConditionalNG bean. Null for Module searches since there is no conditional
-
addPropertyChangeListener
void addPropertyChangeListener(@Nonnull java.beans.PropertyChangeListener listener, java.lang.String name, java.lang.String listenerRef)
Request a call-back when a bound property changes. Bound properties are the known state, commanded state, user and system names.- Parameters:
listener- The listener. This may change in the future to be a subclass of NamedProprtyChangeListener that carries the name and listenerRef values internallyname- The name (either system or user) that the listener uses for this namedBean, this parameter is used to help determine when which listeners should be moved when the username is moved from one bean to anotherlistenerRef- A textual reference for the listener, that can be presented to the user when a delete is called
-
addPropertyChangeListener
void addPropertyChangeListener(@Nonnull java.lang.String propertyName, @Nonnull java.beans.PropertyChangeListener listener, java.lang.String name, java.lang.String listenerRef)
Request a call-back when a bound property changes. Bound properties are the known state, commanded state, user and system names.- Parameters:
propertyName- The name of the property to listen tolistener- The listener. This may change in the future to be a subclass of NamedProprtyChangeListener that carries the name and listenerRef values internallyname- The name (either system or user) that the listener uses for this namedBean, this parameter is used to help determine when which listeners should be moved when the username is moved from one bean to anotherlistenerRef- A textual reference for the listener, that can be presented to the user when a delete is called
-
updateListenerRef
void updateListenerRef(@Nonnull java.beans.PropertyChangeListener l, java.lang.String newName)
-
vetoableChange
void vetoableChange(@Nonnull java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
- Throws:
java.beans.PropertyVetoException
-
getListenerRef
@CheckReturnValue java.lang.String getListenerRef(@Nonnull java.beans.PropertyChangeListener l)
Get the textual reference for the specific listener- Parameters:
l- the listener of interest- Returns:
- the textual reference
-
getListenerRefs
@CheckReturnValue java.util.ArrayList<java.lang.String> getListenerRefs()
Returns a list of all the listeners references- Returns:
- a list of textual references
-
getListenerRefsIncludingChildren
@CheckReturnValue void getListenerRefsIncludingChildren(java.util.List<java.lang.String> list)
Returns a list of all the listeners references for this object and all its children.- Parameters:
list- a list of textual references
-
getNumPropertyChangeListeners
@CheckReturnValue int getNumPropertyChangeListeners()
Number of current listeners. May return -1 if the information is not available for some reason.- Returns:
- the number of listeners.
-
getPropertyChangeListenersByReference
@CheckReturnValue @Nonnull java.beans.PropertyChangeListener[] getPropertyChangeListenersByReference(@Nonnull java.lang.String name)
Get a list of all the property change listeners that are registered using a specific name- Parameters:
name- The name (either system or user) that the listener has registered as referencing this namedBean- Returns:
- empty list if none
-
forEntireTree
default void forEntireTree(Base.RunnableWithBase r)
Do something on every item in the sub tree of this item.- Parameters:
r- the action to do on all items.
-
forEntireTreeWithException
default void forEntireTreeWithException(Base.RunnableWithBaseThrowException r) throws java.lang.Exception
Do something on every item in the sub tree of this item.- Parameters:
r- the action to do on all items.- Throws:
java.lang.Exception- if an exception occurs
-
hasChild
default boolean hasChild(@Nonnull Base b)
Does this item has the child b?- Parameters:
b- the child- Returns:
- true if this item has the child b, false otherwise
-
existsInTree
default boolean existsInTree()
Does this item exists in the tree?- Returns:
- true if the item exists in the tree, false otherwise
-
-