Package uk.ac.starlink.topcat
Class ColumnCellRenderer
java.lang.Object
uk.ac.starlink.topcat.ColumnCellRenderer
- All Implemented Interfaces:
ListCellRenderer<TableColumn>
List cell renderer which will render StarTableColumn objects sensibly.
- Since:
- 20 Feb 2004
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default renderer.ColumnCellRenderer
(JComboBox<TableColumn> comboBox) Sets up a ColumnCellRenderer for a given combo box. -
Method Summary
Modifier and TypeMethodDescriptiongetListCellRendererComponent
(JList<? extends TableColumn> list, TableColumn col, int index, boolean isSelected, boolean hasFocus) void
setNullRepresentation
(Object nullRep) Sets the representation for the null item.
-
Constructor Details
-
ColumnCellRenderer
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 Details
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList<? extends TableColumn> list, TableColumn col, int index, boolean isSelected, boolean hasFocus) - Specified by:
getListCellRendererComponent
in interfaceListCellRenderer<TableColumn>
-
setNullRepresentation
Sets the representation for the null item.- Parameters:
nullRep
- null representation object to appear in combo box
-