X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignFrame.java;h=2a2fc70d870f905f42fdcc47161a36bb314866d8;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=f6bbe146b46d66551770b56fbe47db3fa2b4d57e;hpb=a37041bf8b7fd50c1370e35f0aaa82a2d09a222b;p=jalview.git diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index f6bbe14..2a2fc70 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -95,6 +95,7 @@ import java.awt.Menu; import java.awt.MenuBar; import java.awt.MenuItem; import java.awt.Panel; +import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; @@ -417,7 +418,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, viewport.featureSettings.refreshTable(); } alignPanel.paintAlignment(true, true); - statusBar.setText(MessageManager + setStatus(MessageManager .getString("label.successfully_added_features_alignment")); } return featuresFile; @@ -575,8 +576,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, case KeyEvent.VK_F2: viewport.cursorMode = !viewport.cursorMode; - statusBar.setText(MessageManager - .formatMessage("label.keyboard_editing_mode", new String[] + setStatus(MessageManager.formatMessage("label.keyboard_editing_mode", + new String[] { (viewport.cursorMode ? "on" : "off") })); if (viewport.cursorMode) { @@ -1452,9 +1453,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } else { - features = formatter.printGffFormat(viewport.getAlignment() - .getSequencesArray(), alignPanel.getFeatureRenderer(), true, - false); + features = formatter.printGffFormat( + viewport.getAlignment().getSequencesArray(), + alignPanel.getFeatureRenderer(), true, false); } if (displayTextbox) @@ -1583,8 +1584,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, catch (java.net.MalformedURLException ex) { url = viewport.applet.getCodeBase() + url; - } - catch (UnsupportedEncodingException ex) + } catch (UnsupportedEncodingException ex) { System.err.println( "WARNING = IMPLEMENTATION ERROR - UNSUPPORTED ENCODING EXCEPTION FOR " @@ -2080,7 +2080,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, seqs, 0, viewport.getAlignment().getWidth(), viewport.getAlignment())); - viewport.getRanges().setEndSeq(viewport.getAlignment().getHeight()); + viewport.getRanges().setEndSeq(viewport.getAlignment().getHeight() - 1); // BH + // 2019.04.18 viewport.getAlignment().getWidth(); viewport.firePropertyChange("alignment", null, viewport.getAlignment().getSequences()); @@ -2356,8 +2357,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, column, al); } - statusBar.setText(MessageManager - .formatMessage("label.removed_columns", new String[] + setStatus(MessageManager.formatMessage("label.removed_columns", + new String[] { Integer.valueOf(trimRegion.getSize()).toString() })); addHistoryItem(trimRegion); @@ -2400,8 +2401,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, addHistoryItem(removeGapCols); - statusBar.setText(MessageManager - .formatMessage("label.removed_empty_columns", new String[] + setStatus(MessageManager.formatMessage("label.removed_empty_columns", + new String[] { Integer.valueOf(removeGapCols.getSize()).toString() })); // This is to maintain viewport position on first residue @@ -3519,17 +3520,17 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, hydrophobicityColour.setLabel( MessageManager.getString("label.colourScheme_hydrophobic")); hydrophobicityColour.addActionListener(this); - helixColour.setLabel(MessageManager - .getString("label.colourScheme_helix_propensity")); + helixColour.setLabel( + MessageManager.getString("label.colourScheme_helixpropensity")); helixColour.addActionListener(this); strandColour.setLabel(MessageManager - .getString("label.colourScheme_strand_propensity")); + .getString("label.colourScheme_strandpropensity")); strandColour.addActionListener(this); turnColour.setLabel( - MessageManager.getString("label.colourScheme_turn_propensity")); + MessageManager.getString("label.colourScheme_turnpropensity")); turnColour.addActionListener(this); buriedColour.setLabel( - MessageManager.getString("label.colourScheme_buried_index")); + MessageManager.getString("label.colourScheme_buriedindex")); buriedColour.addActionListener(this); purinePyrimidineColour.setLabel(MessageManager .getString("label.colourScheme_purine/pyrimidine")); @@ -3538,19 +3539,19 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, // .getString("label.rna_interaction")); // RNAInteractionColour.addActionListener(this); RNAHelixColour.setLabel( - MessageManager.getString("label.colourScheme_rna_helices")); + MessageManager.getString("label.colourScheme_rnahelices")); RNAHelixColour.addActionListener(this); userDefinedColour .setLabel(MessageManager.getString("action.user_defined")); userDefinedColour.addActionListener(this); PIDColour.setLabel( - MessageManager.getString("label.colourScheme_%_identity")); + MessageManager.getString("label.colourScheme_%identity")); PIDColour.addActionListener(this); BLOSUM62Colour.setLabel( MessageManager.getString("label.colourScheme_blosum62")); BLOSUM62Colour.addActionListener(this); tcoffeeColour.setLabel( - MessageManager.getString("label.colourScheme_t-coffee_scores")); + MessageManager.getString("label.colourScheme_t-coffeescores")); // it will be enabled only if a score file is provided tcoffeeColour.setEnabled(false); tcoffeeColour.addActionListener(this); @@ -3822,7 +3823,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, */ statusBar.setBackground(Color.white); statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); - statusBar.setText(MessageManager.getString("label.status_bar")); + setStatus(MessageManager.getString("label.status_bar")); this.add(statusBar, BorderLayout.SOUTH); } @@ -3962,7 +3963,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * without an additional javascript library to exchange messages between the * distinct applets. See http://issues.jalview.org/browse/JAL-621 * - * @param viewer + * @param jmolViewer * JmolViewer instance * @param sequenceIds * - sequence Ids to search for associations @@ -4150,7 +4151,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { // register the association(s) and quit, don't create any windows. if (StructureSelectionManager.getStructureSelectionManager(applet) - .setMapping(seqs, chains, pdb.getFile(), protocol, null) == null) + .setMapping(seqs, chains, pdb.getFile(), protocol, + null) == null) { System.err.println("Failed to map " + pdb.getFile() + " (" + protocol + ") to any sequences"); @@ -4190,7 +4192,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } else { - new MCview.AppletPDBViewer(pdb, seqs, chains, alignPanel, protocol); + new mc_view.AppletPDBViewer(pdb, seqs, chains, alignPanel, protocol); } } @@ -4344,4 +4346,18 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, return new FeatureSettings(alignPanel); } + private Rectangle fs_bounds = null; + + @Override + public void setFeatureSettingsGeometry(Rectangle bounds) + { + fs_bounds = bounds; + } + + @Override + public Rectangle getFeatureSettingsGeometry() + { + return fs_bounds; + } + }