Class CbusNodeConfigTab

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, CanPanelInterface
Direct Known Subclasses:
CbusNodeBackupsPane, CbusNodeEditNVarPane, CbusNodeEventVarPane, CbusNodeInfoPane, CbusNodeSetupPane, CbusNodeUserCommentsPane

public abstract class CbusNodeConfigTab extends CanPanel implements PropertyChangeListener
See Also:
  • Field Details

  • Constructor Details

    • CbusNodeConfigTab

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

    • getMainPane

      Get the Main Node Manager Pane.
      Returns:
      Manager Pane
    • setNode

      public final void setNode(CbusNode node)
      Set the Node displayed in the Pane. Checks for node unchanged and disposes listeners on previous node.
      Parameters:
      node - New CbusNode to display
    • getVetoBeingChanged

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

      protected void setActiveDialog(boolean newVal)
      Set that a Dialog box is open within the Pane.
      Parameters:
      newVal - true if being displayed, else false
    • getActiveDialog

      protected boolean getActiveDialog()
      Get if a Dialog box is open within the Pane.
      Returns:
      true if displaying dialog, else false
    • getTabIndex

      protected final int getTabIndex()
      Get the Tab Index within the Main Node Manager Pane
      Returns:
      index for this pane
    • changedNode

      protected abstract void changedNode(@Nonnull CbusNode node)
      Extending classes must implement this for changed node notifications
      Parameters:
      node - The new Node
    • disposeOfNode

      Remove any update listeners for the node.
      Parameters:
      node - Node to remove listeners for
    • getNodeRow

      protected int getNodeRow()
      Get the index of the node in the main Node Table
      Returns:
      Row Number for the CbusNode nodeOfInterest
    • resetViewToVeto

      protected void resetViewToVeto()
      Reset the Main Node Manager pane to that of the vetoing Pane.
    • getCancelSaveEditDialog

      protected boolean getCancelSaveEditDialog(String adviceString)
      Get a Cancel Edit / Save Edit / Continue Edit Dialog.
      Parameters:
      adviceString - Extra text to display in box without opening / closing html tag.
      Returns:
      true to veto, else false to proceed and continue.
    • cancelOption

      protected void cancelOption()
      Custom Cancel action for getCancelSaveEditDialog.
    • saveOption

      protected void saveOption()
      Custom Save action for getCancelSaveEditDialog.
    • propertyChange

      Get updates from the CbusNode nodeOfInterest
      Specified by:
      propertyChange in interface PropertyChangeListener
    • dispose

      public void dispose()
      Overrides:
      dispose in class JmriPanel