From: Bob J. <jac...@us...> - 2007-05-29 06:44:07
|
Update of /cvsroot/jmri/jmri/jmrit/simpleturnoutctrl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30572 Modified Files: SimpleTurnoutCtrlFrame.java Log Message: D Bourdreau - indicate change in progress Index: SimpleTurnoutCtrlFrame.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/simpleturnoutctrl/SimpleTurnoutCtrlFrame.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SimpleTurnoutCtrlFrame.java 27 May 2007 16:30:00 -0000 1.13 --- SimpleTurnoutCtrlFrame.java 29 May 2007 06:43:54 -0000 1.14 *************** *** 103,111 **** log.error("Turnout "+adrTextField.getText()+" is not available"); } else { - // Update feedback mode & turnout state - nowFeedbackLabel.setText (turnout.getFeedbackModeName()); - if (turnout.getCommandedState() != Turnout.CLOSED) - nowStateLabel.setText("Waiting"); - turnout.addPropertyChangeListener(this); if (log.isDebugEnabled()) log.debug("about to command CLOSED"); --- 103,106 ---- *************** *** 133,140 **** log.error("Turnout "+adrTextField.getText()+" is not available"); } else { - // Update feedback mode & turnout state - nowFeedbackLabel.setText (turnout.getFeedbackModeName()); - if (turnout.getCommandedState() != Turnout.THROWN) - nowStateLabel.setText("Waiting"); turnout.addPropertyChangeListener(this); if (log.isDebugEnabled()) log.debug("about to command THROWN"); --- 128,131 ---- *************** *** 154,160 **** // update state field in GUI as state of turnout changes public void propertyChange(java.beans.PropertyChangeEvent e) { if (e.getPropertyName().equals("KnownState")) { - // Update feedback mode in case changed by turnout table - nowFeedbackLabel.setText (turnout.getFeedbackModeName()); int now = ((Integer) e.getNewValue()).intValue(); switch (now) { --- 145,155 ---- // update state field in GUI as state of turnout changes public void propertyChange(java.beans.PropertyChangeEvent e) { + // If the Commanded State changes, show transition state as "waiting" + // also update feedback mode displayed + if (e.getPropertyName().equals("CommandedState")){ + nowStateLabel.setText("Waiting"); + nowFeedbackLabel.setText (turnout.getFeedbackModeName()); + } if (e.getPropertyName().equals("KnownState")) { int now = ((Integer) e.getNewValue()).intValue(); switch (now) { *************** *** 183,184 **** --- 178,180 ---- + |