Package jmri.implementation
Class JmriClockPropertyListener
- java.lang.Object
-
- jmri.implementation.JmriSimplePropertyListener
-
- jmri.implementation.JmriClockPropertyListener
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
public class JmriClockPropertyListener extends JmriSimplePropertyListener
A service class for monitoring a bound property in one of the JMRI Named beans For use with properties having two states which are determined by containment in an interval (e.g. Fast Clock ranges).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
Fields Modifier and Type Field Description (package private) int[]
_beginTimes
(package private) int
_currentMinutes
(package private) int[]
_endTimes
(package private) Timebase
_fastClock
(package private) boolean[]
_rangeList
(package private) int
numRanges
(package private) static int
SIZE
-
Fields inherited from class jmri.implementation.JmriSimplePropertyListener
_clients, _enabled, _namedBean, _propertyName, _type, _varName, _varType
-
-
Constructor Summary
Constructors Constructor Description JmriClockPropertyListener(java.lang.String propName, int type, java.lang.String name, Conditional.Type varType, Conditional client, int beginTime, int endTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
propertyChange(java.beans.PropertyChangeEvent evt)
Check if have entered/exited one of the Fast Clock Rangesvoid
setRange(int beginTime, int endTime)
-
Methods inherited from class jmri.implementation.JmriSimplePropertyListener
addConditional, calculateClient, getBean, getDevName, getNamedBean, getPropertyName, getType, getVarType, setEnabled
-
-
-
-
Field Detail
-
SIZE
static int SIZE
-
numRanges
int numRanges
-
_beginTimes
int[] _beginTimes
-
_endTimes
int[] _endTimes
-
_rangeList
boolean[] _rangeList
-
_fastClock
Timebase _fastClock
-
_currentMinutes
int _currentMinutes
-
-
Constructor Detail
-
JmriClockPropertyListener
JmriClockPropertyListener(java.lang.String propName, int type, java.lang.String name, Conditional.Type varType, Conditional client, int beginTime, int endTime)
-
-
Method Detail
-
setRange
public void setRange(int beginTime, int endTime)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
Check if have entered/exited one of the Fast Clock RangesThis method is invoked when the minute listener fires.
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
- Overrides:
propertyChange
in classJmriSimplePropertyListener
-
-