Class CmdStaFlags

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class CmdStaFlags extends JPanel
Class to display CBUS command station flag settings
See Also:
  • Field Details

  • Constructor Details

    • CmdStaFlags

      public CmdStaFlags(int index, int nv, String title, String[] flagStrings, String[] flagTtStrings, UpdateNV update)
      Parameters:
      index - of the flags, not the NV array index which may be offset
      nv - index of the associated NV
      title - of the flags object
      flagStrings - array of strings to name each flag bit
      flagTtStrings - array of tooltip strings for each flag bit
      update - the callback function to update the table data model
  • Method Details

    • getContents

      public JPanel getContents()
      Get the panel to display the flags
      Returns:
      JPanel displaying the flags
    • flagActionListener

      protected void flagActionListener()
      Call the callback to update from flags state.
    • setFlags

      public void setFlags(int value)
      Update the flags settings
      Parameters:
      value - settings
    • getFlags

      public int getFlags()
      Get the flags settings
      Returns:
      flags as an int
    • getNv

      public int getNv()
      Get the NV index associated with this object
      Returns:
      the NV index
    • setButtons

      protected void setButtons()
      Set the buttons to the state of the flags