Class CbusCommonSwing


  • public class CbusCommonSwing
    extends java.lang.Object
    Common CBUS swing functions.
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • WHITE_GREEN

        public static final java.awt.Color WHITE_GREEN
      • GOLD

        public static final java.awt.Color GOLD
    • 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