X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=2c8f47ab9993acdb07571e2ee823b938eb161256;hb=b3fb6325a8bc315c5c938faf10ffd2e73d965f16;hp=ac04a1f978a267e31c9d5bf20c7df627d46ed28b;hpb=1e591b1447109f90a7bb831b89b551243e61267c;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index ac04a1f..2c8f47a 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -20,8 +20,6 @@ */ package jalview.gui; -import java.util.Locale; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -54,6 +52,7 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -63,7 +62,6 @@ import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JCheckBoxMenuItem; import javax.swing.JInternalFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; @@ -217,6 +215,7 @@ public class FeatureSettings extends JPanel transparency.setValue(100 - transparencyAsPercent); inConstruction = incon; } + /** * Constructor * @@ -412,6 +411,7 @@ public class FeatureSettings extends JPanel { frame = new JInternalFrame(); frame.setContentPane(this); + frame.setFrameIcon(null); Rectangle bounds = af.getFeatureSettingsGeometry(); String title; if (af.getAlignPanels().size() > 1 || Desktop.getAlignmentPanels( @@ -457,8 +457,8 @@ public class FeatureSettings extends JPanel }); frame.setLayer(JLayeredPane.PALETTE_LAYER); } - inConstruction = false; - } + inConstruction = false; + } /** * Sets the state of buttons to show complement features from viewport @@ -484,16 +484,17 @@ public class FeatureSettings extends JPanel change = null; } - /** - * Constructs and shows a popup menu of possible actions on the selected row and - * feature type - * - * @param rowSelected - * @param type - * @param typeCol - * @param pt - */ - protected void showPopupMenu(final int rowSelected, final String type, final Object typeCol, final Point pt) + /** + * Constructs and shows a popup menu of possible actions on the selected row + * and feature type + * + * @param rowSelected + * @param type + * @param typeCol + * @param pt + */ + protected void showPopupMenu(final int rowSelected, final String type, + final Object typeCol, final Point pt) { JPopupMenu men = new JPopupMenu(MessageManager .formatMessage("label.settings_for_param", new String[] @@ -947,14 +948,10 @@ public class FeatureSettings extends JPanel chooser.setDialogTitle( MessageManager.getString("label.load_feature_colours")); chooser.setToolTipText(MessageManager.getString("action.load")); - chooser.setResponseHandler(0, new Runnable() - { - @Override - public void run() - { - File file = chooser.getSelectedFile(); - load(file); - } + chooser.setResponseHandler(0, () -> { + File file = chooser.getSelectedFile(); + load(file); + return null; }); chooser.showOpenDialog(this); } @@ -1201,8 +1198,8 @@ public class FeatureSettings extends JPanel } /** - * close ourselves but leave any existing UI handlers (e.g a CDS/Protein tabbed - * feature settings dialog) intact + * close ourselves but leave any existing UI handlers (e.g a CDS/Protein + * tabbed feature settings dialog) intact */ public void closeOldSettings() { @@ -1318,7 +1315,8 @@ public class FeatureSettings extends JPanel } }); - final String byScoreLabel = MessageManager.getString("label.seq_sort_by_score"); + final String byScoreLabel = MessageManager + .getString("label.seq_sort_by_score"); JButton sortByScore = new JButton(byScoreLabel); sortByScore.setFont(JvSwingUtils.getLabelFont()); sortByScore.addActionListener(new ActionListener() @@ -1332,7 +1330,8 @@ public class FeatureSettings extends JPanel } } }); - final String byDensityLabel = MessageManager.getString("label.sequence_sort_by_density"); + final String byDensityLabel = MessageManager + .getString("label.sequence_sort_by_density"); JButton sortByDens = new JButton(byDensityLabel); sortByDens.setFont(JvSwingUtils.getLabelFont()); sortByDens.addActionListener(new ActionListener() @@ -1363,7 +1362,8 @@ public class FeatureSettings extends JPanel } } }); - // Cancel for a SplitFrame should just revert changes to the currently displayed + // Cancel for a SplitFrame should just revert changes to the currently + // displayed // settings. May want to do this for either or both - so need a splitview // feature settings cancel/OK. JButton cancel = new JButton(MessageManager @@ -1453,11 +1453,12 @@ public class FeatureSettings extends JPanel MessageManager.getString("label.transparency_tip")); boolean nucleotide = af.getViewport().getAlignment().isNucleotide(); - String text = MessageManager.formatMessage("label.show_linked_features", - nucleotide - ? MessageManager.getString("label.protein") - .toLowerCase(Locale.ROOT) - : "CDS"); + String text = MessageManager + .formatMessage("label.show_linked_features", + nucleotide + ? MessageManager.getString("label.protein") + .toLowerCase(Locale.ROOT) + : "CDS"); showComplement = new JCheckBox(text); showComplement.addActionListener(new ActionListener() { @@ -1541,7 +1542,7 @@ public class FeatureSettings extends JPanel * * @param fcol * @param withHint - * if true include 'click to edit' and similar text + * if true include 'click to edit' and similar text * @return */ public static String getColorTooltip(FeatureColourI fcol,