Class NodeConfigToolPane

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

public class NodeConfigToolPane extends CanPanel implements PropertyChangeListener
Master Pane for CBUS node configuration incl. CBUS node table
Since:
2.99.2
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • initComponents

      2nd stage of initialization, invoked after the Constructor is complete.

      This needs to be connected to the initContext() method in implementing classes.

      Specified by:
      initComponents in interface CanPanelInterface
      Overrides:
      initComponents in class CanPanel
      Parameters:
      memo - system connection.
    • getTabs

      protected final ArrayList<CbusNodeConfigTab> getTabs()
    • init

      public void init()
      Initialise the NodeConfigToolPane
    • notifyNodeSearchComplete

      public void notifyNodeSearchComplete(int csfound, int ndfound)
      Create a document-modal Dialog with node search results.
      Parameters:
      csfound - number of Command Stations
      ndfound - number of nodes
    • userViewChanged

      protected void userViewChanged()
      Notify this pane that the selected node or viewed tab has changed
    • getMenus

      public List<JMenu> getMenus()
      Creates a Menu List. Provide menu items to add to a menu bar.
      Overrides:
      getMenus in class JmriPanel
      Returns:
      a list of menu items to add or an empty list
    • setRestoreFcuActive

      protected void setRestoreFcuActive(boolean isActive)
      Set Restore from FCU Menu Item active as only 1 instance per NodeConfigToolPane allowed
      Parameters:
      isActive - set true if Frame opened, else false to notify closed
    • 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
    • getHelpTarget

      Provide a help target string which an enclosing frame can provide as a help reference.

      This automatically provides a reference to the usual place for JMRI window-specific help pages that are named for the implementing class, but note this is a Pane class, not a Frame class.

      Overrides:
      getHelpTarget in class JmriPanel
      Returns:
      the target String
    • dispose

      public void dispose()
      Overrides:
      dispose in class JmriPanel
    • getEditEvFrame

      Get the edit event frame this could be requested from CbusNodeEventDataModel button click to edit event, this class when it receives an event via drag n drop, creating new event from CbusNodeEventVarPane
      Returns:
      the Frame
    • clearEditEventFrame

      protected void clearEditEventFrame()
      Receive notification from the frame that it has disposed
    • showConfirmThenSave

      protected void showConfirmThenSave(@Nonnull CbusNode fromNode, @Nonnull CbusNode toNode, boolean teachNVs, boolean clearEvents, boolean teachEvents, @CheckForNull JFrame frame)
      Show a Confirm before Save Dialogue Box then start teach process for Node

      Used in Node Backup restore, Restore from FCU, edit NV's Edit Event variables currently use a custom dialogue, not this

      Parameters:
      fromNode - Node to get data from
      toNode - Node to send changes to
      teachNVs - true to Teach NV's
      clearEvents - true to clear events before teaching new ones
      teachEvents - true to teach events
      frame - the frame to which dialogue boxes can be attached to
    • propertyChange

      Specified by:
      propertyChange in interface PropertyChangeListener
    • getNodeModel

      Get the System Connection Node Model
      Returns:
      System Connection Node Model