jmri.implementation
Class JmriSimplePropertyListener

java.lang.Object
  extended by jmri.implementation.JmriSimplePropertyListener
All Implemented Interfaces:
PropertyChangeListener, EventListener
Direct Known Subclasses:
JmriClockPropertyListener, JmriMemoryPropertyListener, JmriMultiStatePropertyListener, JmriTwoStatePropertyListener

public class JmriSimplePropertyListener
extends Object
implements PropertyChangeListener

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
Author:
Pete Cressman Copyright (C) 2009

Method Summary
 void addConditional(Conditional client)
           
 void calculateClient(int idx, PropertyChangeEvent evt)
           
 String getDevName()
           
 String getPropertyName()
           
 int getType()
           
 int getVarType()
           
 void propertyChange(PropertyChangeEvent evt)
          When _enabled is false, Conditional.calculate will compute the state of the conditional, but will not trigger its actions.
 void setEnabled(boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public int getType()

getPropertyName

public String getPropertyName()

getVarType

public int getVarType()

getDevName

public String getDevName()

addConditional

public void addConditional(Conditional client)

setEnabled

public void setEnabled(boolean state)

calculateClient

public void calculateClient(int idx,
                            PropertyChangeEvent evt)

propertyChange

public void propertyChange(PropertyChangeEvent evt)
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:
propertyChange in interface PropertyChangeListener


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads