Class CbusEventHighlighter

java.lang.Object
jmri.jmrix.can.cbus.CbusEventHighlighter

public class CbusEventHighlighter
extends Object
Class to implement highlighting of CBUS events.
  • Constructor Details

  • Method Details

    • highlight

      public boolean highlight​(AbstractMessage m)
      Highlight a CAN Frame, based on previous settings.
      Parameters:
      m - CanMessage or CanReply to highlight.
      Returns:
      true if event matches
    • setNnEnable

      public void setNnEnable​(boolean b)
      Set whether NN (Node Number) will be included in highlight.
      Parameters:
      b - True to highlight a Node Number
    • getNnEnable

      public boolean getNnEnable()
    • setEvEnable

      public void setEvEnable​(boolean b)
      Set whether Ev (event number) will be included in highlight.
      Parameters:
      b - True to highlight an Event Number
    • getEvEnable

      public boolean getEvEnable()
    • setNn

      public void setNn​(int n)
      Set a Node Number to highlight.
      Parameters:
      n - Node Number
    • getNn

      public int getNn()
    • setEv

      public void setEv​(int n)
      Set an Event Number to highlight.
      Parameters:
      n - Event Number
    • getEv

      public int getEv()
    • setType

      public void setType​(int n)
      Set value of type to match.Type is the ON, OFF, etc. value in the CBUS frame. CbusConstants.EVENT_EITHER matches either ON or OFF.
      Parameters:
      n - See CbusConstants for values
    • getType

      public int getType()
    • setDir

      public void setDir​(int n)
      Set value of direction to match.
      Parameters:
      n - EVENT_DIR_UNSET EVENT_DIR_IN, EVENT_DIR_OUT, EVENT_EITHER_DIR EVENT_DIR_EITHER
    • getDir

      public int getDir()
    • setColor

      public void setColor​(Color c)
      Set value of Colour
      Parameters:
      c - Colour to use
    • getColor

      public Color getColor()
      Get value of Colour to highlight.
      Returns:
      Colour to use