X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=fae5259979930e8f252c4c57827bea480f9ebaf9;hb=863467bf6c59c0bc5368c8f3a03d9d5a4f10700d;hp=8c156624c3094166f1210b1b2b3f541e4ed3fcc7;hpb=c1d578127a42ebd8535c3135241e9b0da789d584;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 8c15662..fae5259 100755 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * * This file is part of Jalview. * @@ -163,17 +163,24 @@ public class FeatureSettings extends JPanel frame = new JInternalFrame(); frame.setContentPane(this); - Desktop.addInternalFrame(frame, "Sequence Feature Settings", 400, 450); - frame - .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() - { - public void internalFrameClosed( - javax.swing.event.InternalFrameEvent evt) - { - fr.removePropertyChangeListener(change); - dassourceBrowser.fs = null; - }; - }); + if (new jalview.util.Platform().isAMac()) + { + Desktop.addInternalFrame(frame, "Sequence Feature Settings", 475, 480); + } + else + { + Desktop.addInternalFrame(frame, "Sequence Feature Settings", 400, 450); + } + + frame.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() + { + public void internalFrameClosed( + javax.swing.event.InternalFrameEvent evt) + { + fr.removePropertyChangeListener(change); + dassourceBrowser.fs = null; + }; + }); frame.setLayer(JLayeredPane.PALETTE_LAYER); } @@ -273,8 +280,9 @@ public class FeatureSettings extends JPanel // probably the color chooser! table.setValueAt(colorChooser.getColor(), selectedRow, 1); table.validate(); - me.updateFeatureRenderer(((FeatureTableModel) table - .getModel()).getData(), false); + me.updateFeatureRenderer( + ((FeatureTableModel) table.getModel()).getData(), + false); } } } @@ -398,8 +406,8 @@ public class FeatureSettings extends JPanel { public void itemStateChanged(ItemEvent evt) { - fr.featureGroups.put(check.getText(), new Boolean(check - .isSelected())); + fr.featureGroups.put(check.getText(), + new Boolean(check.isSelected())); af.alignPanel.seqPanel.seqCanvas.repaint(); if (af.alignPanel.overviewPanel != null) { @@ -513,8 +521,8 @@ public class FeatureSettings extends JPanel data[dataIndex][0] = type; data[dataIndex][1] = fr.getFeatureStyle(type); - data[dataIndex][2] = new Boolean(af.getViewport().featuresDisplayed - .containsKey(type)); + data[dataIndex][2] = new Boolean( + af.getViewport().featuresDisplayed.containsKey(type)); dataIndex++; visibleChecks.removeElement(type); } @@ -588,10 +596,10 @@ public class FeatureSettings extends JPanel void load() { - JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache - .getProperty("LAST_DIRECTORY"), new String[] - { "fc" }, new String[] - { "Sequence Feature Colours" }, "Sequence Feature Colours"); + JalviewFileChooser chooser = new JalviewFileChooser( + jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[] + { "fc" }, new String[] + { "Sequence Feature Colours" }, "Sequence Feature Colours"); chooser.setFileView(new jalview.io.JalviewFileView()); chooser.setDialogTitle("Load Feature Colours"); chooser.setToolTipText("Load"); @@ -628,8 +636,8 @@ public class FeatureSettings extends JPanel Cache.log.warn("Couldn't parse out graduated feature color.", e); } - GraduatedColor gcol = new GraduatedColor(mincol, maxcol, newcol - .getMin(), newcol.getMax()); + GraduatedColor gcol = new GraduatedColor(mincol, maxcol, + newcol.getMin(), newcol.getMax()); if (newcol.hasAutoScale()) { gcol.setAutoScaled(newcol.getAutoScale()); @@ -652,13 +660,11 @@ public class FeatureSettings extends JPanel } if (ttyp.equalsIgnoreCase("ABOVE")) { - gcol - .setThreshType(AnnotationColourGradient.ABOVE_THRESHOLD); + gcol.setThreshType(AnnotationColourGradient.ABOVE_THRESHOLD); } if (ttyp.equalsIgnoreCase("BELOW")) { - gcol - .setThreshType(AnnotationColourGradient.BELOW_THRESHOLD); + gcol.setThreshType(AnnotationColourGradient.BELOW_THRESHOLD); } } fr.setColour(name = newcol.getName(), gcol); @@ -688,10 +694,10 @@ public class FeatureSettings extends JPanel void save() { - JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache - .getProperty("LAST_DIRECTORY"), new String[] - { "fc" }, new String[] - { "Sequence Feature Colours" }, "Sequence Feature Colours"); + JalviewFileChooser chooser = new JalviewFileChooser( + jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[] + { "fc" }, new String[] + { "Sequence Feature Colours" }, "Sequence Feature Colours"); chooser.setFileView(new jalview.io.JalviewFileView()); chooser.setDialogTitle("Save Feature Colour Scheme"); chooser.setToolTipText("Save"); @@ -898,7 +904,7 @@ public class FeatureSettings extends JPanel settingsPane.setLayout(borderLayout2); dasSettingsPane.setLayout(borderLayout3); bigPanel.setLayout(borderLayout4); - invert.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + invert.setFont(JvSwingUtils.getLabelFont()); invert.setText("Invert Selection"); invert.addActionListener(new ActionListener() { @@ -907,7 +913,7 @@ public class FeatureSettings extends JPanel invertSelection(); } }); - optimizeOrder.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + optimizeOrder.setFont(JvSwingUtils.getLabelFont()); optimizeOrder.setText("Optimise Order"); optimizeOrder.addActionListener(new ActionListener() { @@ -916,7 +922,7 @@ public class FeatureSettings extends JPanel orderByAvWidth(); } }); - sortByScore.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + sortByScore.setFont(JvSwingUtils.getLabelFont()); sortByScore.setText("Seq sort by Score"); sortByScore.addActionListener(new ActionListener() { @@ -925,7 +931,7 @@ public class FeatureSettings extends JPanel sortByScore(null); } }); - sortByDens.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + sortByDens.setFont(JvSwingUtils.getLabelFont()); sortByDens.setText("Seq Sort by density"); sortByDens.addActionListener(new ActionListener() { @@ -934,7 +940,7 @@ public class FeatureSettings extends JPanel sortByDens(null); } }); - cancel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + cancel.setFont(JvSwingUtils.getLabelFont()); cancel.setText("Cancel"); cancel.addActionListener(new ActionListener() { @@ -944,7 +950,7 @@ public class FeatureSettings extends JPanel close(); } }); - ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + ok.setFont(JvSwingUtils.getLabelFont()); ok.setText("OK"); ok.addActionListener(new ActionListener() { @@ -953,7 +959,7 @@ public class FeatureSettings extends JPanel close(); } }); - loadColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + loadColours.setFont(JvSwingUtils.getLabelFont()); loadColours.setText("Load Colours"); loadColours.addActionListener(new ActionListener() { @@ -962,7 +968,7 @@ public class FeatureSettings extends JPanel load(); } }); - saveColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + saveColours.setFont(JvSwingUtils.getLabelFont()); saveColours.setText("Save Colours"); saveColours.addActionListener(new ActionListener() { @@ -1288,7 +1294,7 @@ public class FeatureSettings extends JPanel fetchDAS.setEnabled(true); cancelDAS.setEnabled(false); dassourceBrowser.setGuiEnabled(true); - + } public void cancelDAS_actionPerformed(ActionEvent e)