Class ColumnCellRenderer

  • All Implemented Interfaces:
    javax.swing.ListCellRenderer<javax.swing.table.TableColumn>

    public class ColumnCellRenderer
    extends java.lang.Object
    implements javax.swing.ListCellRenderer<javax.swing.table.TableColumn>
    List cell renderer which will render StarTableColumn objects sensibly.
    Since:
    20 Feb 2004
    Author:
    Mark Taylor (Starlink)
    • Constructor Summary

      Constructors 
      Constructor Description
      ColumnCellRenderer()
      Constructs a default renderer.
      ColumnCellRenderer​(javax.swing.JComboBox<javax.swing.table.TableColumn> comboBox)
      Sets up a ColumnCellRenderer for a given combo box.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Component getListCellRendererComponent​(javax.swing.JList<? extends javax.swing.table.TableColumn> list, javax.swing.table.TableColumn col, int index, boolean isSelected, boolean hasFocus)  
      void setNullRepresentation​(java.lang.Object nullRep)
      Sets the representation for the null item.
      • Methods inherited from class java.lang.Object

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

      • ColumnCellRenderer

        public ColumnCellRenderer​(javax.swing.JComboBox<javax.swing.table.TableColumn> comboBox)
        Sets up a ColumnCellRenderer for a given combo box. The only use of the combo box is that its tooltip text will be set to that of the description of the selected column (if there is one).
        Parameters:
        comboBox - box to watch
      • ColumnCellRenderer

        public ColumnCellRenderer()
        Constructs a default renderer.
    • Method Detail

      • getListCellRendererComponent

        public java.awt.Component getListCellRendererComponent​(javax.swing.JList<? extends javax.swing.table.TableColumn> list,
                                                               javax.swing.table.TableColumn col,
                                                               int index,
                                                               boolean isSelected,
                                                               boolean hasFocus)
        Specified by:
        getListCellRendererComponent in interface javax.swing.ListCellRenderer<javax.swing.table.TableColumn>
      • setNullRepresentation

        public void setNullRepresentation​(java.lang.Object nullRep)
        Sets the representation for the null item.
        Parameters:
        nullRep - null representation object to appear in combo box