Class CbusNodeEditNVarPane

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, TableModelListener, CanPanelInterface

See Also:
  • Constructor Details

    • CbusNodeEditNVarPane

      Create a new instance of CbusNodeEditNVarPane.
      Parameters:
      main - the NodeConfigToolPane this is a component of
  • Method Details

    • getTitle

      public String getTitle()
      Provide a recommended title for an enclosing frame.
      Overrides:
      getTitle in class JmriPanel
      Returns:
      the title; a null value will be treated as "" by the enclosing frame
    • liveUpdateOption

      protected void liveUpdateOption()
      Put the Node into Live Update Mode. For templates that support this, NV writes are performed immediately. e.g., for live update of servo position NVs. Checks if NVs are changed before entering this mode.
    • saveOption

      protected void saveOption()
      Custom Save action for getCancelSaveEditDialog. Save button ( only enabled if changed NVs ) clicked. Show dialogue to save NVs to module.
      Overrides:
      saveOption in class CbusNodeConfigTab
    • changedNode

      public void changedNode(CbusNode node)
      Set the Node and update panes Show the edit GUI if available.
      Specified by:
      changedNode in class CbusNodeConfigTab
      Parameters:
      node - the CbusNode of Interest, can be null
    • areNvsDirty

      public boolean areNvsDirty()
      Get if any NVs are dirty
      Returns:
      true if NVs have been edited, else false
    • cancelOption

      protected void cancelOption()
      Reset edited NVs to original value ( or reset edited NV values if mid-load ) Inform the provider of a the reset
      Overrides:
      cancelOption in class CbusNodeConfigTab
    • setSaveCancelButtonsActive

      public void setSaveCancelButtonsActive(boolean newstate)
      Set the Save / Reset NV button status Save button is always enabled when in live update
      Parameters:
      newstate - true if buttons should be enabled, else false
    • tableChanged

      public void tableChanged(TableModelEvent e)
      Sets save / reset buttons active / inactive depending on table status. Informs the module provider of a table change
      Specified by:
      tableChanged in interface TableModelListener
    • getVetoBeingChanged

      protected boolean getVetoBeingChanged()
      Stop the tab or Node selection switching from the Pane. Defaults to false
      Overrides:
      getVetoBeingChanged in class CbusNodeConfigTab
      Returns:
      true to veto, false to not veto
    • dispose

      public void dispose()
      Removes the NV Model listener from the Node. Also dispose of the edit gui cleanly, take node out of live update mode
      Overrides:
      dispose in class CbusNodeConfigTab