Class AbstractPomPanel<M extends ProgCommandAwareBeanModel>

java.lang.Object
org.bidib.wizard.mvc.pom.view.panel.AbstractPomPanel<M>
All Implemented Interfaces:
PomResultListener
Direct Known Subclasses:
AddressPanel, DirectAccessPanel, RailcomPanel, ResetDecoderPanel

public abstract class AbstractPomPanel<M extends ProgCommandAwareBeanModel> extends Object implements PomResultListener
  • Field Details

    • LOGGER

      protected final org.slf4j.Logger LOGGER
    • DEFAULT_TIMEOUT

      public static final int DEFAULT_TIMEOUT
      See Also:
    • DEFAULT_SUSI_READ_FIRST_TIMEOUT

      public static final int DEFAULT_SUSI_READ_FIRST_TIMEOUT
      See Also:
    • cvProgrammerModel

      protected final PomProgrammerModel cvProgrammerModel
    • pomResultProxyModel

      protected final PomResultProxyModel pomResultProxyModel
    • readButton

      protected final JButton readButton
    • writeButton

      protected final JButton writeButton
    • readButtonEnabled

      protected com.jgoodies.binding.value.ValueModel readButtonEnabled
    • writeButtonEnabled

      protected com.jgoodies.binding.value.ValueModel writeButtonEnabled
    • currentOperationModel

      protected com.jgoodies.binding.value.ValueModel currentOperationModel
    • currentOperationLabel

      protected JLabel currentOperationLabel
    • progOperationUnknownIcon

      protected ImageIcon progOperationUnknownIcon
    • activeTab

      protected boolean activeTab
    • currentAddressBeanModel

      protected CurrentAddressBeanModel currentAddressBeanModel
  • Constructor Details

    • AbstractPomPanel

      public AbstractPomPanel(PomProgrammerModel cvProgrammerModel, CurrentAddressBeanModel currentAddressBeanModel)
      Creates a new instance of the AbstractPomPanel.
      Parameters:
      cvProgrammerModel - the POM programmer model
      currentAddressBeanModel - the address bean model
  • Method Details

    • postConstruct

      protected void postConstruct()
      Post construct operations. This method is called after the panel is build.
    • getProgCommandAwareBeanModel

      public ProgCommandAwareBeanModel getProgCommandAwareBeanModel()
      Returns:
      the progCommandAwareBeanModel
    • setProgCommandAwareBeanModel

      public void setProgCommandAwareBeanModel(M progCommandAwareBeanModel)
      Parameters:
      progCommandAwareBeanModel - the progCommandAwareBeanModel
    • addPomRequestListener

      public void addPomRequestListener(PomRequestListener l)
    • getPomRequestListeners

      protected List<PomRequestListener> getPomRequestListeners()
    • setActive

      public void setActive(boolean active)
      Description copied from interface: PomResultListener
      Sets the listener active or inactive.
      Specified by:
      setActive in interface PomResultListener
      Parameters:
      active - the active flag
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface PomResultListener
      Returns:
      listener is active
    • createWorkerPanel

      protected abstract void createWorkerPanel(com.jgoodies.forms.builder.FormBuilder builder, int[] rowHolder, PomValidationResultModel parentValidationModel)
    • createPanel

      public JPanel createPanel(PomValidationResultModel parentValidationModel)
    • doBindButtons

      protected void doBindButtons()
    • triggerValidation

      protected abstract void triggerValidation()
    • getValidationResultModel

      protected com.jgoodies.validation.ValidationResultModel getValidationResultModel()
    • addLogText

      public void addLogText(String logLine, Object... args)
      Description copied from interface: PomResultListener
      Add a new line to the logger area.
      Specified by:
      addLogText in interface PomResultListener
      Parameters:
      logLine - the message to log. Use {} as placeholders for args.
      args - the args
    • clearLogArea

      public void clearLogArea()
    • getCurrentOperation

      protected abstract Object getCurrentOperation()
    • signalPomProgStateChanged

      public void signalPomProgStateChanged(org.bidib.jbidibc.messages.enums.PomProgState pomProgState)
      Description copied from interface: PomResultListener
      Signals that the POM prog state has changed.
      Specified by:
      signalPomProgStateChanged in interface PomResultListener
      Parameters:
      pomProgState - the new POM prog state
    • sendRequest

      protected void sendRequest(org.bidib.jbidibc.messages.PomAddressData decoderAddress, org.bidib.jbidibc.messages.enums.PomOperation operation, int cvNumber, int cvValue)
    • disableInputElements

      protected void disableInputElements()
    • enableInputElements

      protected void enableInputElements()
    • fireNextCommand

      protected void fireNextCommand()
    • startTimeoutControl

      protected void startTimeoutControl(int timeout)
    • stopTimeoutControl

      protected void stopTimeoutControl()