Package jmri.jmrix.can.cbus
Class CbusEventHighlighter
- java.lang.Object
-
- jmri.jmrix.can.cbus.CbusEventHighlighter
-
public class CbusEventHighlighter extends java.lang.Object
Class to implement highlighting of CBUS events.
-
-
Constructor Summary
Constructors Constructor Description CbusEventHighlighter()
Creates a new instance of CbusEventHighlighter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getColor()
Get value of Colour to highlight.int
getDir()
int
getEv()
boolean
getEvEnable()
int
getNn()
boolean
getNnEnable()
int
getType()
boolean
highlight(AbstractMessage m)
Highlight a CAN Frame, based on previous settings.void
setColor(java.awt.Color c)
Set value of Colourvoid
setDir(int n)
Set value of direction to match.void
setEv(int n)
Set an Event Number to highlight.void
setEvEnable(boolean b)
Set whether Ev (event number) will be included in highlight.void
setNn(int n)
Set a Node Number to highlight.void
setNnEnable(boolean b)
Set whether NN (Node Number) will be included in highlight.void
setType(int n)
Set value of type to match.Type is the ON, OFF, etc. value in the CBUS frame.
-
-
-
Constructor Detail
-
CbusEventHighlighter
public CbusEventHighlighter()
Creates a new instance of CbusEventHighlighter
-
-
Method Detail
-
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
- SeeCbusConstants
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(java.awt.Color c)
Set value of Colour- Parameters:
c
- Colour to use
-
getColor
public java.awt.Color getColor()
Get value of Colour to highlight.- Returns:
- Colour to use
-
-