X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FChimeraViewFrame.java;h=ec9feb7786407694f87b0fc2384f0088767f0e3c;hb=484abc22be60686d5188c8ff1b90613e821ea946;hp=9b0d85be02c6756f1b53888aa04531b4b6cb17c0;hpb=4762b29420ed4df01b55a8afe5ab05467aaf41a9;p=jalview.git diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index 9b0d85b..ec9feb7 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.FeatureRenderer; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; @@ -76,6 +77,10 @@ public class ChimeraViewFrame extends StructureViewerBase private Random random = new Random(); + private int myWidth = 500; + + private int myHeight = 150; + /** * Initialise menu options. */ @@ -185,7 +190,9 @@ public class ChimeraViewFrame extends StructureViewerBase */ protected void sendFeaturesToChimera() { - jmb.sendFeaturesToViewer(getAlignmentPanel()); + int count = jmb.sendFeaturesToViewer(getAlignmentPanel()); + statusBar.setText(MessageManager.formatMessage("label.attributes_set", + count)); } /** @@ -254,7 +261,7 @@ public class ChimeraViewFrame extends StructureViewerBase useAlignmentPanelForSuperposition(ap); } jmb.setColourBySequence(true); - setSize(400, 400); // probably should be a configurable/dynamic default here + setSize(myWidth, myHeight); initMenus(); addingStructures = false; @@ -607,6 +614,16 @@ public class ChimeraViewFrame extends StructureViewerBase jmb.setFinishedInit(true); jmb.setLoadingFromArchive(false); + /* + * ensure that any newly discovered features (e.g. RESNUM) + * are added to any open feature settings dialog + */ + FeatureRenderer fr = getBinding().getFeatureRenderer(null); + if (fr != null) + { + fr.featuresAdded(); + } + // refresh the sequence colours for the new structure(s) for (AlignmentPanel ap : _colourwith) { @@ -851,10 +868,19 @@ public class ChimeraViewFrame extends StructureViewerBase return "Chimera"; } + /** + * Sends commands to align structures according to associated alignment(s). + * + * @return + */ @Override - public void updateTitleAndMenus() + protected String alignStructs_withAllAlignPanels() { - super.updateTitleAndMenus(); - viewerActionMenu.setVisible(true); + String reply = super.alignStructs_withAllAlignPanels(); + if (reply != null) + { + statusBar.setText("Superposition failed: " + reply); + } + return reply; } }