Package jmri.jmrix.can.cbus.swing
Class CbusCommonSwing
- java.lang.Object
-
- jmri.jmrix.can.cbus.swing.CbusCommonSwing
-
public class CbusCommonSwing extends java.lang.Object
Common CBUS swing functions.
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.Color
GOLD
static java.awt.Color
VERY_LIGHT_GREEN
static java.awt.Color
VERY_LIGHT_RED
static java.awt.Color
WHITE_GREEN
-
Constructor Summary
Constructors Constructor Description CbusCommonSwing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
configureTable(javax.swing.JTable table)
Configure a table to have our standard rows and columns.static void
hideNumbersLessThan(int min, java.lang.String string, javax.swing.JTextField f)
static void
setCellBackground(boolean isSelected, javax.swing.JComponent f, javax.swing.JTable table, int row)
Set cell background with alternating rows.static void
setCellFocus(boolean hasFocus, javax.swing.JComponent f, javax.swing.JTable table)
static void
setCellFromBackupEnum(java.lang.Object object, javax.swing.JTextField f)
static void
setCellFromCbusEventEnum(java.lang.Object object, javax.swing.JTextField f)
static void
setCellFromDate(java.lang.Object object, javax.swing.JTextField f, java.text.DateFormat dformat)
static void
setCellTextHighlighter(java.lang.String textForSearch, java.lang.String string, javax.swing.JTextField f)
-
-
-
Field Detail
-
VERY_LIGHT_RED
public static final java.awt.Color VERY_LIGHT_RED
-
VERY_LIGHT_GREEN
public static final java.awt.Color VERY_LIGHT_GREEN
-
WHITE_GREEN
public static final java.awt.Color WHITE_GREEN
-
GOLD
public static final java.awt.Color GOLD
-
-
Constructor Detail
-
CbusCommonSwing
public CbusCommonSwing()
-
-
Method Detail
-
setCellBackground
public static void setCellBackground(boolean isSelected, javax.swing.JComponent f, javax.swing.JTable table, int row)
Set cell background with alternating rows.- Parameters:
isSelected
- true if selected.f
- cell component.table
- cell table.row
- cell row.
-
setCellFocus
public static void setCellFocus(boolean hasFocus, javax.swing.JComponent f, javax.swing.JTable table)
-
hideNumbersLessThan
public static void hideNumbersLessThan(int min, java.lang.String string, javax.swing.JTextField f)
-
setCellFromCbusEventEnum
public static void setCellFromCbusEventEnum(java.lang.Object object, javax.swing.JTextField f)
-
setCellFromBackupEnum
public static void setCellFromBackupEnum(java.lang.Object object, javax.swing.JTextField f)
-
setCellFromDate
public static void setCellFromDate(java.lang.Object object, javax.swing.JTextField f, java.text.DateFormat dformat)
-
setCellTextHighlighter
public static void setCellTextHighlighter(java.lang.String textForSearch, java.lang.String string, javax.swing.JTextField f)
-
configureTable
public static void configureTable(javax.swing.JTable table)
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
-
-