From 2da139b2af34371c87a4471718a98addeb90a9d0 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 15 Feb 2019 07:43:15 +0000 Subject: [PATCH] JAL-3010 getColumnClass() never return null --- src/jalview/gui/FeatureSettings.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index a53d730..5f16226 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1524,13 +1524,22 @@ public class FeatureSettings extends JPanel } /** - * Answers the class of the object in column c of the first row of the table + * Answers the class of column c of the table */ @Override public Class getColumnClass(int c) { - Object v = getValueAt(0, c); - return v == null ? null : v.getClass(); + switch (c) + { + case TYPE_COLUMN: + return String.class; + case COLOUR_COLUMN: + return FeatureColour.class; + case FILTER_COLUMN: + return FeatureMatcherSet.class; + default: + return Boolean.class; + } } /** -- 1.7.10.2