Package jmri.jmrix.can.cbus.swing
Class CbusCommonSwing
java.lang.Object
jmri.jmrix.can.cbus.swing.CbusCommonSwing
public class CbusCommonSwing extends Object
Common CBUS swing functions.
-
Field Summary
Fields Modifier and Type Field Description static Color
GOLD
static Color
VERY_LIGHT_GREEN
static Color
VERY_LIGHT_RED
static Color
WHITE_GREEN
-
Constructor Summary
Constructors Constructor Description CbusCommonSwing()
-
Method Summary
Modifier and Type Method Description static void
configureTable(JTable table)
Configure a table to have our standard rows and columns.static void
hideNumbersLessThan(int min, String string, JTextField f)
static void
setCellBackground(boolean isSelected, JComponent f, JTable table, int row)
Set cell background with alternating rows.static void
setCellFocus(boolean hasFocus, JComponent f, JTable table)
static void
setCellFromBackupEnum(Object object, JTextField f)
static void
setCellFromCbusEventEnum(Object object, JTextField f)
static void
setCellFromDate(Object object, JTextField f, DateFormat dformat)
static void
setCellTextHighlighter(String textForSearch, String string, JTextField f)
-
Field Details
-
Constructor Details
-
CbusCommonSwing
public CbusCommonSwing()
-
-
Method Details
-
setCellBackground
Set cell background with alternating rows.- Parameters:
isSelected
- true if selected.f
- cell component.table
- cell table.row
- cell row.
-
setCellFocus
-
hideNumbersLessThan
-
setCellFromCbusEventEnum
-
setCellFromBackupEnum
-
setCellFromDate
-
setCellTextHighlighter
-
configureTable
Configure a table to have our standard rows and columns.This is optional, in that other table formats can use this table model. But we put it here to help keep it consistent.
- Parameters:
table
- table to configure
-