git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2491 Tidies
[jalview.git]
/
src
/
jalview
/
gui
/
ChimeraViewFrame.java
diff --git
a/src/jalview/gui/ChimeraViewFrame.java
b/src/jalview/gui/ChimeraViewFrame.java
index
67eddca
..
ec9feb7
100644
(file)
--- a/
src/jalview/gui/ChimeraViewFrame.java
+++ b/
src/jalview/gui/ChimeraViewFrame.java
@@
-20,6
+20,7
@@
*/
package jalview.gui;
*/
package jalview.gui;
+import jalview.api.FeatureRenderer;
import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.PDBEntry;
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 Random random = new Random();
+ private int myWidth = 500;
+
+ private int myHeight = 150;
+
/**
* Initialise menu options.
*/
/**
* Initialise menu options.
*/
@@
-185,7
+190,9
@@
public class ChimeraViewFrame extends StructureViewerBase
*/
protected void sendFeaturesToChimera()
{
*/
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);
useAlignmentPanelForSuperposition(ap);
}
jmb.setColourBySequence(true);
- setSize(400, 400); // probably should be a configurable/dynamic default here
+ setSize(myWidth, myHeight);
initMenus();
addingStructures = false;
initMenus();
addingStructures = false;
@@
-607,6
+614,16
@@
public class ChimeraViewFrame extends StructureViewerBase
jmb.setFinishedInit(true);
jmb.setLoadingFromArchive(false);
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)
{
// refresh the sequence colours for the new structure(s)
for (AlignmentPanel ap : _colourwith)
{
@@
-852,19
+869,18
@@
public class ChimeraViewFrame extends StructureViewerBase
}
/**
}
/**
- * Override superclass method to make the 'Chimera' menu always visible, but
- * 'Superpose with...' only enabled if there is more than one structure shown
+ * Sends commands to align structures according to associated alignment(s).
+ *
+ * @return
*/
@Override
*/
@Override
- public void updateTitleAndMenus()
+ protected String alignStructs_withAllAlignPanels()
{
{
- super.updateTitleAndMenus();
- viewerActionMenu.setVisible(true);
- viewSelectionMenu.setEnabled(false);
- if (getBinding().getPdbFile().length > 1
- && getBinding().getSequence().length > 1)
+ String reply = super.alignStructs_withAllAlignPanels();
+ if (reply != null)
{
{
- viewSelectionMenu.setEnabled(true);
+ statusBar.setText("Superposition failed: " + reply);
}
}
+ return reply;
}
}
}
}