Class CbusPreferences

All Implemented Interfaces:
BeanInterface, PropertyChangeFirer, PropertyChangeProvider

public class CbusPreferences extends PreferencesBean
Preferences for the MERG CBUS connections.
  • Constructor Details

  • Method Details

    • savePreferences

      public void savePreferences()
    • isPreferencesValid

    • getAddCommandStations

      public boolean getAddCommandStations()
      Get if should add new command stations heard on network to CBUS Node Manager table
      Returns:
      true if adding command stations, else false
    • setAddCommandStations

      public void setAddCommandStations(boolean newVal)
      Set if should add new command stations heard on network to CBUS Node Manager table
      Parameters:
      newVal - true if adding command stations, else false
    • getAddNodes

      public boolean getAddNodes()
      Get if should add new nodes heard on network to CBUS Node Manager table
      Returns:
      true if adding nodes, else false
    • setAddNodes

      public void setAddNodes(boolean newVal)
      Set if should add new nodes heard on network to CBUS Node Manager table
      Parameters:
      newVal - true if adding nodes, else false
    • getAllocateNNListener

      public boolean getAllocateNNListener()
      Get if should listen on network for new node number requests
      Returns:
      true if should listen, else false
    • setAllocateNNListener

      public void setAllocateNNListener(boolean newVal)
      Set if should listen on network for new node number requests
      Parameters:
      newVal - true if should listen, else false
    • getNodeBackgroundFetchDelay

      Get Background delay between CBUS Node Manager data fetch from nodes
      Returns:
      the delay
    • setNodeBackgroundFetchDelay

      public void setNodeBackgroundFetchDelay(long newVal)
      Set Background delay between CBUS Node Manager data fetch from nodes
      Parameters:
      newVal - in ms can be 0 but defaults to 100ms
    • getStartupSearchForCs

      public boolean getStartupSearchForCs()
      Get Search for Command stations on CBUS Node Table Startup
      Returns:
      true to send CBUS search for CS, else false
    • setStartupSearchForCs

      public void setStartupSearchForCs(boolean newVal)
      Set Search for Command stations on CBUS Node Table Startup
      Parameters:
      newVal - true to send CBUS search for CS, else false
    • getStartupSearchForNodes

      public boolean getStartupSearchForNodes()
      Get Search for Nodes on CBUS Node Table Startup
      Returns:
      true to send CBUS search for nodes, else false
    • setStartupSearchForNodes

      public void setStartupSearchForNodes(boolean newVal)
      Set Search for Nodes on CBUS Node Table Startup
      Parameters:
      newVal - true to send CBUS search for nodes, else false
    • getSaveRestoreEventTable

      public boolean getSaveRestoreEventTable()
      Get Save Restore CBUS Event Table

      If enabled loads CBUS event table data from xml on table startup, and saves data to xml on shutdown.

      Returns:
      true to save and restore, else false
    • setSaveRestoreEventTable

      public void setSaveRestoreEventTable(boolean newVal)
      Set Save Restore CBUS Event Table
      Parameters:
      newVal - true to save and restore, else false
    • getSearchForNodesBackupXmlOnStartup

      Get search CBUS node backup directory on startup for node xml files
      Returns:
      true to search, else false
    • setSearchForNodesBackupXmlOnStartup

      public void setSearchForNodesBackupXmlOnStartup(boolean newVal)
      Set search CBUS node backup directory on startup for node xml files
      Parameters:
      newVal - true to lookup node xml files, else false
    • getMinimumNumBackupsToKeep

      Get minimum number of CbusNode XML backups to retain
      Returns:
      number of backups, defaults to 10
    • setMinimumNumBackupsToKeep

      public void setMinimumNumBackupsToKeep(int newVal)
      Set minimum number of CbusNode XML backups to retain
      Parameters:
      newVal - the new number of backups
    • getBootWriteDelay

      public int getBootWriteDelay()
      Get delay between bootloader data writes
      Returns:
      delay, in ms, defaults to CbusNode.BOOT_PROG_TIMEOUT_FAST
    • setBootWriteDelay

      public void setBootWriteDelay(int newVal)
      Set delay between bootloader data writes
      Parameters:
      newVal - the delay in ms
    • isGlobalProgrammerAvailable

      public boolean isGlobalProgrammerAvailable()
      Get the global programmer state
      Returns:
      global programmer state
    • isAddressedModePossible

      public boolean isAddressedModePossible()
      Get the addressed programmer state
      Returns:
      addressed programmer state
    • setGlobalProgrammerAvailable

      public void setGlobalProgrammerAvailable(boolean state)
      Set global (service mode) programmer availability
      Parameters:
      state - true if available
    • setAddressedModePossible

      public void setAddressedModePossible(boolean state)
      Set global (service mode) programmer availability
      Parameters:
      state - true if available
    • setProgrammersAvailable

      public void setProgrammersAvailable(boolean global, boolean addressed)
      Set the programmer type
      Parameters:
      global - true if global (service mode) programmer is available
      addressed - thru if addressed (ops mode) programmer is available
    • getProgTrackMode

      public int getProgTrackMode()
      Get the programming track mode
      Returns:
      the mode
    • setProgTrackMode

      public void setProgTrackMode(int mode)
      Set programming track mode
      Parameters:
      mode - to be set
    • getNodeTableSplit

      public int getNodeTableSplit()
      Get the position of the node table split
      Returns:
      position in pixels
    • setNodeTableSplit

      public void setNodeTableSplit(int pixels)
      Set the position of the node table split from the top of thw window
      Parameters:
      pixels - new position