Skip to content
Permalink
Browse files

Light Control > Light Controller

  • Loading branch information...
icklesteve committed Jun 3, 2019
1 parent ca7caba commit 7ab94e85a3741a6d65f9d1f6135a7c165dfef92d
Showing with 300 additions and 157 deletions.
  1. +4 −0 help/en/html/tools/fastclock/index.shtml
  2. +273 −136 help/en/package/jmri/jmrit/beantable/LightAddEdit.shtml
  3. BIN ...en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-Fast-Clock-Follower-310x227.png
  4. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-None-310x203.png
  5. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-Sensor-310x237.png
  6. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-Timed-On-310x232.png
  7. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-Turnout-310x237.png
  8. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Controller-Frame-Two-Sensors-310x272.png
  9. BIN help/en/package/jmri/jmrit/beantable/images/Light-Add-Frame-662x371.png
  10. BIN ...en/package/jmri/jmrit/beantable/images/Light-Controller-multiple-fast-clock-followers-662x401.png
  11. BIN help/en/package/jmri/jmrit/beantable/images/Light-Edit-Frame-662x370.png
  12. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrame.png
  13. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrameClock.png
  14. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrameNone.png
  15. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrameSensor.png
  16. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrameTimed.png
  17. BIN help/en/package/jmri/jmrit/beantable/images/LightAddFrameTurnout.png
  18. BIN help/en/package/jmri/jmrit/beantable/images/LightEditFrame.png
  19. BIN help/en/package/jmri/jmrit/beantable/images/LightFrameTwoSensor.png
  20. +13 −13 java/src/jmri/jmrit/beantable/BeanTableBundle.properties
  21. +10 −8 java/src/jmri/jmrit/beantable/LightTableAction.java
@@ -89,6 +89,10 @@
clock is running (ACTIVE) or stopped (INACTIVE). The
IMCURRENTTIME memory contains the current fast-clock time,
and can be easily accessed from Logix and scripts.</p>

<p>Lights can be an easy way to set up Fast Clock Logic, see
<a href="../../../package/jmri/jmrit/beantable/LightAddEdit.shtml#lightcontrolfastclock"
>Light Controller - Fast Clock Follower</a>.</p>

<p>Happy timekeeping!</p>
<!--#include virtual="/Footer" -->

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -62,8 +62,8 @@ TitleAddTransit = Add New Transit
TitleEditTransit = Edit Transit
TitleAddLight = Add New Light
TitleEditLight = Edit Light
TitleAddLightControl = Add New Light Control
TitleEditLightControl = Edit Light Control
TitleAddLightControl = Add New Light Controller
TitleEditLightControl = Edit Light Controller
TitleAddAudioBuffer = Add/Edit Audio Buffer
TitleAddAudioSource = Add/Edit Audio Source
TitleAddAudioListener = Add/Edit Audio Listener
@@ -141,45 +141,45 @@ AddRangeBox = Add a sequential range
LightAddRangeHint = Check to add more than one Light with sequential addresses
LightNumberToAddHint = Set the number of sequential address Lights to add (Max. 50)
LightUserNameHint = Enter User Name for new Light, e.g. 'Jones House'
LightControlType = Control Type:
LightControlType = Controller Type:
LightControlTypeHint = Select how the new Light is to be controlled
LightSensorSenseActivTip = <html>Light ON when Sensor changes to Active<br>Light OFF when Sensor changes to Inactive</html>
LightSensorSenseInactivTip = <html>Light ON when Sensor changes to Inactive<br>Light OFF when Sensor changes to Active</html>
LightConToClosedOrThrownTip = <html>Light ON when Turnout changes to {0}<br>Light OFF when Turnout changes to {1}</html>
Light2SensorSenseActivTip = <html>Light ON when either Sensor changes Active<br>Light OFF when both Sensors Inactive</html>
Light2SensorSenseInactivTip = <html>Light ON when either Sensor changes Inactive<br>Light OFF when both Sensors Active</html>
LightSensor = Control Sensor{0}
LightSensor = Controller Sensor{0}
LightSensorHint = Select the Sensor controlling this Light
LightSensorSense = Sense for ON:
LightSensorSenseHint = Select Sensor state corresponding to Light ON
LightScheduleOn = Time ON:
LightScheduleHint = Enter hours as for a 24-hour clock
LightScheduleHintMinutes = Enter the minutes
LightScheduleOff = Time OFF:
LightTurnout = Control Turnout:
LightTurnout = Controller Turnout:
LightTurnoutHint = Select the Turnout that drives the Light
LightTurnoutSense = Status for ON:
LightTurnoutSenseHint = Select Turnout state corresponding to Light ON
LightTimedSensor = Trigger Sensor:
LightTimedSensorHint = Select the Sensor triggering Timed ON
LightTimedDurationOn = Duration ON (msec):
LightTimedDurationOnHint = Enter duration of Timed ON in milliseconds
LightNoneSelected = No Automated Control Selected
LightControlBorder = Light Control
LightNoneSelected = No Automated Controller Selected
LightControlBorder = Light Controller
LightVariableBorder = Variable Intensity
LightCreateButtonHint = Click here to create a new Light
LightUpdateButtonHint = Click here to change this Light
LightCancelButtonHint = Click to leave unchanged
LightCreateControlButtonHint = Click to create a new Light Control
LightUpdateControlButtonHint = Click to change the Light Control
LightAddControlButton = Add Control
LightAddControlButtonHint = Click to add a Light Control to this Light
LightCreateControlButtonHint = Click to create a new Light Controller
LightUpdateControlButtonHint = Click to change the Light Controller
LightAddControlButton = Add Controller
LightAddControlButtonHint = Click to add a Light Controller to this Light
LightTwoSensorHint = Select the two Sensors controlling this Light

LightControlDescription = Description
LightSensorControl = By Sensor
LightSensorControlTip = Light updated when the Sensor changes to Active or Inactive
LightFastClockControl = By Fast Clock
LightFastClockControl = By Fast Clock Follower
LightFastClockControlTip = Light updated each FastClock minute
LightTurnoutStatusControl = By Turnout Status
LightTurnoutStatusControlTip = Light updated when the Turnout changes to {0} or {1}
@@ -224,7 +224,7 @@ LightWarn4 = Warning: New Light refers to address alre
LightWarn5 = Warning: Requested Light "{0}" uses same address as Turnout "{1}".\nDo you still want to add this Light?
LightWarn8 = Error: Trigger Sensor could not be provided. Light Control not created.
LightWarn9 = Warning: Intensity not set. Minimum must be lower than Maximum.
LightWarn10 = No Control Turnout selected. Turnout Control removed.
LightWarn10 = No Controller Turnout selected. Turnout Controller removed.
LightWarn11 = Error: ON and OFF times should not be the same.

ReminderInUse = It is in use by {0} other objects including.
@@ -686,21 +686,20 @@ public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
// light control table
JPanel panel3 = new JPanel();
panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
JPanel panel31 = new JPanel();
lightControlTableModel = new LightControlTableModel();
JTable lightControlTable = new JTable(lightControlTableModel);
lightControlTable.setRowSelectionAllowed(false);
lightControlTable.setPreferredScrollableViewportSize(new java.awt.Dimension(550, 100));
lightControlTable.setPreferredScrollableViewportSize(new java.awt.Dimension(600, 100));
TableColumnModel lightControlColumnModel = lightControlTable.getColumnModel();
TableColumn typeColumn = lightControlColumnModel.getColumn(LightControlTableModel.TYPE_COLUMN);
typeColumn.setResizable(true);
typeColumn.setMinWidth(110);
typeColumn.setMaxWidth(150);
typeColumn.setMinWidth(130);
typeColumn.setMaxWidth(170);
TableColumn descriptionColumn = lightControlColumnModel.getColumn(
LightControlTableModel.DESCRIPTION_COLUMN);
descriptionColumn.setResizable(true);
descriptionColumn.setMinWidth(270);
descriptionColumn.setMaxWidth(340);
descriptionColumn.setMaxWidth(380);
ButtonRenderer buttonRenderer = new ButtonRenderer();
lightControlTable.setDefaultRenderer(JButton.class, buttonRenderer);
TableCellEditor buttonEditor = new ButtonEditor(new JButton());
@@ -714,8 +713,7 @@ public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
removeColumn.setResizable(false);
removeColumn.setMinWidth(testButton.getPreferredSize().width);
JScrollPane lightControlTableScrollPane = new JScrollPane(lightControlTable);
panel31.add(lightControlTableScrollPane, BorderLayout.CENTER);
panel3.add(panel31);
panel3.add(lightControlTableScrollPane);
JPanel panel35 = new JPanel();
panel35.setLayout(new FlowLayout());
panel35.add(addControl = new JButton(Bundle.getMessage("LightAddControlButton")));
@@ -1096,8 +1094,8 @@ void createPressed(ActionEvent e) {
return; // without creating
}
// set control information if any
clearLightControlsTable(); // remove all controls from local list
setLightControlInformation(g);
clearLightControlsTable(); // remove all controls from local list
g.activateLight();
lightCreatedOrUpdated = true;

@@ -1597,6 +1595,8 @@ private void setUpControlType(int ctype) {
turnoutBox.setVisible(false);
panel34.setVisible(false);
typeBox.setSelectedIndex(ctype);
createControl.setEnabled(true);
updateControl.setEnabled(true);

if (ctype==Light.SENSOR_CONTROL) {
// set up panel for sensor control
@@ -1690,6 +1690,8 @@ private void setUpControlType(int ctype) {
f1Label.setText(Bundle.getMessage("LightNoneSelected"));
defaultControlIndex = Light.NO_CONTROL;
f2Label.setVisible(false);
createControl.setEnabled(false);
updateControl.setEnabled(false);
} else {
log.error("Unexpected control type in controlTypeChanged: {}", ctype);
}

0 comments on commit 7ab94e8

Please sign in to comment.
You can’t perform that action at this time.