import jalview.api.AlignViewControllerI;
import jalview.api.AlignViewportI;
import jalview.api.FeatureRenderer;
+import jalview.api.FeatureSettingsControllerI;
import jalview.api.SequenceStructureBinding;
import jalview.bin.JalviewLite;
import jalview.commands.CommandI;
import jalview.schemes.PIDColourScheme;
import jalview.schemes.PurinePyrimidineColourScheme;
import jalview.schemes.RNAHelicesColourChooser;
-import jalview.schemes.RNAInteractionColourScheme;
import jalview.schemes.StrandColourScheme;
import jalview.schemes.TCoffeeColourScheme;
import jalview.schemes.TaylorColourScheme;
import java.util.StringTokenizer;
import java.util.Vector;
+import org.jmol.viewer.Viewer;
+
public class AlignFrame extends EmbmenuFrame implements ActionListener,
ItemListener, KeyListener, AlignViewControllerGuiI
{
public AlignFrame(AlignmentI al, JalviewLite applet,
String title, boolean embedded, boolean addToDisplay)
{
+ this(al, null, null, applet, title, embedded, addToDisplay);
+ }
+
+ public AlignFrame(AlignmentI al, SequenceI[] hiddenSeqs,
+ ColumnSelection columnSelection, JalviewLite applet,
+ String title, boolean embedded)
+ {
+ this(al, hiddenSeqs, columnSelection, applet, title, embedded, true);
+ }
+
+ public AlignFrame(AlignmentI al, SequenceI[] hiddenSeqs,
+ ColumnSelection columnSelection, JalviewLite applet,
+ String title, boolean embedded, boolean addToDisplay)
+ {
if (applet != null)
{
jalviewServletURL = applet.getParameter("APPLICATION_URL");
}
}
viewport = new AlignViewport(al, applet);
+
+ if (hiddenSeqs != null && hiddenSeqs.length > 0)
+ {
+ viewport.hideSequence(hiddenSeqs);
+ }
+ if (columnSelection != null)
+ {
+ viewport.setColumnSelection(columnSelection);
+ }
+
alignPanel = new AlignmentPanel(this, viewport);
avc = new jalview.controller.AlignViewController(this, viewport,
alignPanel);
: showForSequences);
aa.visible = visible;
}
- alignPanel.validateAnnotationDimensions(false);
+ alignPanel.validateAnnotationDimensions(true);
+ validate();
+ repaint();
}
private void setAnnotationSortOrder(SequenceAnnotationOrder order)
@Override
public void actionPerformed(ActionEvent evt)
{
+ viewport.applet.currentAlignFrame = this;
+
Object source = evt.getSource();
if (source == inputText)
{
changeColour(new PurinePyrimidineColourScheme());
}
- else if (source == RNAInteractionColour)
- {
- changeColour(new RNAInteractionColourScheme());
- }
+ // else if (source == RNAInteractionColour)
+ // {
+ // changeColour(new RNAInteractionColourScheme());
+ // }
else if (source == RNAHelixColour)
{
new RNAHelicesColourChooser(viewport, alignPanel);
jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.alignment_output_command", new Object[]
{ e.getActionCommand() }), 600, 500);
- cap.setText(new AppletFormatAdapter().formatSequences(
+
+ FeatureRenderer fr = this.alignPanel.cloneFeatureRenderer();
+ cap.setText(new AppletFormatAdapter(alignPanel).formatSequences(
e.getActionCommand(), viewport.getAlignment(),
viewport.getShowJVSuffix()));
}
public void changeColour(ColourSchemeI cs)
{
- int threshold = 0;
if (cs != null)
{
}
viewport.setGlobalColourScheme(cs);
- if (alignPanel.getOverviewPanel() != null)
- {
- alignPanel.getOverviewPanel().updateOverviewImage();
- }
-
- jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(viewport.applet)
- .sequenceColoursChanged(alignPanel);
-
alignPanel.paintAlignment(true);
}
MessageManager.getString("label.load_features_annotations"));
MenuItem outputFeatures = new MenuItem(
- MessageManager.getString("label.export_features").concat("..."));
+ MessageManager.getString("label.export_features"));
MenuItem outputAnnotations = new MenuItem(
- MessageManager.getString("label.export_annotations").concat("..."));
+ MessageManager.getString("label.export_annotations"));
MenuItem closeMenuItem = new MenuItem(
MessageManager.getString("action.close"));
MenuItem purinePyrimidineColour = new MenuItem();
- MenuItem RNAInteractionColour = new MenuItem();
+ // MenuItem RNAInteractionColour = new MenuItem();
MenuItem RNAHelixColour = new MenuItem();
removeAllGapsMenuItem.setLabel(MessageManager
.getString("action.remove_all_gaps"));
removeAllGapsMenuItem.addActionListener(this);
- removeRedundancyMenuItem.setLabel(MessageManager.getString(
- "action.remove_redundancy").concat("..."));
+ removeRedundancyMenuItem.setLabel(MessageManager
+ .getString("action.remove_redundancy"));
removeRedundancyMenuItem.addActionListener(this);
/*
grpsFromSelection.addActionListener(this);
createGroup.setLabel(MessageManager.getString("action.create_group"));
unGroup.setLabel(MessageManager.getString("action.remove_group"));
- annotationColumnSelection.setLabel("Select by Annotation");
+ annotationColumnSelection.setLabel(MessageManager
+ .getString("action.select_by_annotation"));
annotationColumnSelection.addActionListener(this);
/*
hideAllSelection.addActionListener(this);
showAllHidden.addActionListener(this);
featureSettings.setLabel(MessageManager
- .getString("label.feature_settings"));
+ .getString("action.feature_settings"));
featureSettings.addActionListener(this);
sequenceFeatures.setLabel(MessageManager
.getString("label.show_sequence_features"));
purinePyrimidineColour.setLabel(MessageManager
.getString("label.purine_pyrimidine"));
purinePyrimidineColour.addActionListener(this);
- RNAInteractionColour.setLabel(MessageManager
- .getString("label.rna_interaction"));
- RNAInteractionColour.addActionListener(this);
+ // RNAInteractionColour.setLabel(MessageManager
+ // .getString("label.rna_interaction"));
+ // RNAInteractionColour.addActionListener(this);
RNAHelixColour.setLabel(MessageManager
.getString("action.by_rna_helixes"));
RNAHelixColour.addActionListener(this);
public SequenceStructureBinding addStructureViewInstance(
Object jmolviewer, String[] sequenceIds)
{
- org.jmol.api.JmolViewer viewer = null;
+ Viewer viewer = null;
try
{
- viewer = (org.jmol.api.JmolViewer) jmolviewer;
+ viewer = (Viewer) jmolviewer;
} catch (ClassCastException ex)
{
System.err.println("Unsupported viewer object :"
boolean needtoadd = false;
if (toaddpdb != null)
{
- Vector pdbe = toaddpdb.getPDBId();
+ Vector pdbe = toaddpdb.getAllPDBEntries();
PDBEntry pdbentry = null;
if (pdbe != null && pdbe.size() > 0)
{
this.splitFrame = sf;
}
+ // may not need this
@Override
public void setShowSeqFeatures(boolean b)
{
// setMenusFromViewport(viewport);
}
+ @Override
+ public void refreshFeatureUI(boolean enableIfNecessary)
+ {
+ if (enableIfNecessary)
+ {
+ sequenceFeatures.setState(true);
+ alignPanel.av.setShowSequenceFeatures(true);
+ }
+ }
+
+ @Override
+ public FeatureSettingsControllerI getFeatureSettingsUI()
+ {
+ return alignPanel.av.featureSettings;
+ }
+
}