X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FFeatureSettings.java;h=2c454a40105db7b5808c2e5dcd2f95c854157ecb;hb=37de9310bec3501cbc6381e0c3dcb282fcaad812;hp=bfac241814915028e6959f8c386ba453a2ea975f;hpb=bf0d052fef43e9809b7170dbfd372b3ea116391b;p=jalview.git diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index bfac241..2c454a4 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -185,8 +185,7 @@ public class FeatureSettings extends Panel implements ItemListener, } protected void popupSort(final MyCheckbox check, - final Map minmax, - int x, int y) + final Map minmax, int x, int y) { final String type = check.type; final FeatureColourI typeCol = fr.getFeatureStyle(type); @@ -763,28 +762,31 @@ public class FeatureSettings extends Panel implements ItemListener, public void paint(Graphics g) { Dimension d = getSize(); - if (col.isColourByLabel()) + if (col != null) { - g.setColor(Color.white); - g.fillRect(d.width / 2, 0, d.width / 2, d.height); - /* - * g.setColor(Color.black); Font f=g.getFont().deriveFont(9); - * g.setFont(f); - * - * // g.setFont(g.getFont().deriveFont( // - * AffineTransform.getScaleInstance( // - * width/g.getFontMetrics().stringWidth("Label"), // - * height/g.getFontMetrics().getHeight()))); g.drawString("Label", - * width/2, 0); - */ + if (col.isColourByLabel()) + { + g.setColor(Color.white); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); + /* + * g.setColor(Color.black); Font f=g.getFont().deriveFont(9); + * g.setFont(f); + * + * // g.setFont(g.getFont().deriveFont( // + * AffineTransform.getScaleInstance( // + * width/g.getFontMetrics().stringWidth("Label"), // + * height/g.getFontMetrics().getHeight()))); g.drawString("Label", + * width/2, 0); + */ - } - else if (col.isGraduatedColour()) - { - Color maxCol = col.getMaxColour(); - g.setColor(maxCol); - g.fillRect(d.width / 2, 0, d.width / 2, d.height); + } + else if (col.isGraduatedColour()) + { + Color maxCol = col.getMaxColour(); + g.setColor(maxCol); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); + } } if (hasLink) @@ -801,11 +803,10 @@ public class FeatureSettings extends Panel implements ItemListener, * @param type * @param columnsContaining */ - void hideFeatureColumns(final String type, - boolean columnsContaining) + void hideFeatureColumns(final String type, boolean columnsContaining) { - if (ap.alignFrame.avc.markColumnsContainingFeatures( - columnsContaining, false, false, type)) + if (ap.alignFrame.avc.markColumnsContainingFeatures(columnsContaining, + false, false, type)) { if (ap.alignFrame.avc.markColumnsContainingFeatures( !columnsContaining, false, false, type))