Package jmri.implementation
Class JmriSimplePropertyListener
java.lang.Object
jmri.implementation.JmriSimplePropertyListener
- All Implemented Interfaces:
PropertyChangeListener,EventListener
- Direct Known Subclasses:
JmriClockPropertyListener,JmriMemoryPropertyListener,JmriMultiStatePropertyListener,JmriTwoStatePropertyListener
A service base class for monitoring a bound property in one of the JMRI Named
beans (Turnout, Sensor, etc).
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- Since:
- 2.5.1
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ArrayList<Conditional>(package private) boolean(package private) NamedBeanHandle<?>(package private) String(package private) int(package private) String(package private) Conditional.Type -
Constructor Summary
ConstructorsConstructorDescriptionJmriSimplePropertyListener(String propName, int type, String varName, Conditional.Type varType, Conditional client) JmriSimplePropertyListener(String propName, int type, NamedBeanHandle<?> namedBean, Conditional.Type varType, Conditional client) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConditional(Conditional client) voidcalculateClient(int idx, PropertyChangeEvent evt) getBean()(package private) NamedBeanHandle<?>intgetType()voidWhen _enabled is false, Conditional.calculate will compute the state of the conditional, but will not trigger its actions.voidsetEnabled(boolean state)
-
Field Details
-
Constructor Details
-
JmriSimplePropertyListener
JmriSimplePropertyListener(String propName, int type, String varName, Conditional.Type varType, Conditional client) -
JmriSimplePropertyListener
JmriSimplePropertyListener(String propName, int type, NamedBeanHandle<?> namedBean, Conditional.Type varType, Conditional client)
-
-
Method Details
-
getNamedBean
-
getBean
-
getType
-
getPropertyName
-
getVarType
-
getDevName
-
addConditional
-
setEnabled
-
calculateClient
-
propertyChange
When _enabled is false, Conditional.calculate will compute the state of the conditional, but will not trigger its actions. When _enabled is true, Conditional.calculates its state and trigger its actions if its state has changed.- Specified by:
propertyChangein interfacePropertyChangeListener
-