|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.LightControl
public class LightControl
Each LightControl object is linked to a specific Light, and provides one of the controls available for switching the Light ON/OFF in response to time or events occurring on the layout.
Each LightControl holds the information for one control of the parent Light.
Each Light may have as many controls as desired by the user. It is the user's responsibility to ensure that the various control mechanisms do not conflict with one another.
Available control types are those defined in the Light.java interface. Control types: SENSOR_CONTROL FAST_CLOCK_CONTROL TURNOUT_STATUS_CONTROL TIMED_ON_CONTROL TWO_SENSOR_CONTROL
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.
| Field Summary | |
|---|---|
protected Timebase |
_clock
|
protected int |
_controlSensorSense
|
protected Turnout |
_controlTurnout
|
protected NamedBeanHandle<Sensor> |
_namedControlSensor
|
protected NamedBeanHandle<Sensor> |
_namedControlSensor2
|
protected NamedBeanHandle<Sensor> |
_namedTimedControlSensor
|
protected Light |
_parentLight
|
protected ActionListener |
_timedControlListener
|
protected Timer |
_timedControlTimer
|
protected int |
_timeOff
|
protected int |
_timeOn
|
protected int |
_timeOnDuration
|
protected NamedBeanHandleManager |
nbhm
|
| Constructor Summary | |
|---|---|
LightControl()
Main constructor methods |
|
LightControl(Light l)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _controlSensorSense
protected int _timeOnDuration
protected Light _parentLight
protected NamedBeanHandle<Sensor> _namedControlSensor
protected NamedBeanHandle<Sensor> _namedControlSensor2
protected Timebase _clock
protected int _timeOn
protected int _timeOff
protected Turnout _controlTurnout
protected NamedBeanHandle<Sensor> _namedTimedControlSensor
protected Timer _timedControlTimer
protected ActionListener _timedControlListener
protected NamedBeanHandleManager nbhm
| Constructor Detail |
|---|
public LightControl()
public LightControl(Light l)
| Method Detail |
|---|
public int getControlType()
public void setControlType(int type)
public void setControlSensorName(String sensorName)
public int getControlSensorSense()
public String getControlSensorName()
public void setControlSensorSense(int sense)
public int getFastClockOnHour()
public int getFastClockOnMin()
public int getFastClockOffHour()
public int getFastClockOffMin()
public void setFastClockControlSchedule(int onHour,
int onMin,
int offHour,
int offMin)
public String getControlTurnoutName()
public void setControlTurnout(String turnoutName)
public int getControlTurnoutState()
public void setControlTurnoutState(int state)
public String getControlTimedOnSensorName()
public void setControlTimedOnSensorName(String sensorName)
public int getTimedOnDuration()
public void setTimedOnDuration(int duration)
public String getControlSensor2Name()
public void setControlSensor2Name(String sensorName)
public void setParentLight(Light l)
public void activateLightControl()
protected void twoSensorChanged(PropertyChangeEvent e)
public void deactivateLightControl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||