*/
void init()
{
- if (viewport.getAlignmentConservationAnnotation()== null)
+ if (viewport.getAlignmentConservationAnnotation() == null)
{
BLOSUM62Colour.setEnabled(false);
conservationMenuItem.setEnabled(false);
|| evt.isShiftDown() || evt.isAltDown());
}
break;
-
- //case KeyEvent.VK_A:
- // if (viewport.cursorMode)
- // {
- // alignPanel.seqPanel.insertNucAtCursor(false,"A");
- // //System.out.println("A");
- // }
- // break;
- /*
- case KeyEvent.VK_CLOSE_BRACKET:
- if (viewport.cursorMode)
- {
- System.out.println("closing bracket");
- }
- break;
+
+ // case KeyEvent.VK_A:
+ // if (viewport.cursorMode)
+ // {
+ // alignPanel.seqPanel.insertNucAtCursor(false,"A");
+ // //System.out.println("A");
+ // }
+ // break;
+ /*
+ * case KeyEvent.VK_CLOSE_BRACKET: if (viewport.cursorMode) {
+ * System.out.println("closing bracket"); } break;
*/
case KeyEvent.VK_DELETE:
case KeyEvent.VK_BACK_SPACE:
rnahelicesColour.setEnabled(nucleotide);
purinePyrimidineColour.setEnabled(nucleotide);
// Remember AlignFrame always starts as protein
- //if (!nucleotide)
- // {
- // showTr
- // calculateMenu.remove(calculateMenu.getItemCount() - 2);
- // }
+ // if (!nucleotide)
+ // {
+ // showTr
+ // calculateMenu.remove(calculateMenu.getItemCount() - 2);
+ // }
}
/**
showConsensusHistogram.setSelected(av.isShowConsensusHistogram());
showSequenceLogo.setSelected(av.isShowSequenceLogo());
normaliseSequenceLogo.setSelected(av.isNormaliseSequenceLogo());
-
+
setColourSelected(ColourSchemeProperty.getColourName(av
.getGlobalColourScheme()));
sortByTree.setSelected(av.sortByTree);
listenToViewSelections.setSelected(av.followSelection);
rnahelicesColour.setEnabled(av.getAlignment().hasRNAStructure());
- rnahelicesColour.setSelected(av.getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour);
+ rnahelicesColour
+ .setSelected(av.getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour);
setShowProductsEnabled();
updateEditMenuBar();
}
}
FormatAdapter f = new FormatAdapter();
- String output = f.formatSequences(format,
+ String output = f.formatSequences(
+ format,
(Alignment) viewport.getAlignment(), // class cast exceptions will
// occur in the distant future
- omitHidden, f.getCacheSuffixDefault(format), viewport.getColumnSelection());
+ omitHidden, f.getCacheSuffixDefault(format),
+ viewport.getColumnSelection());
if (output == null)
{
try
{
cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),
- viewport.getAlignment(), omitHidden, viewport.getColumnSelection()));
+ viewport.getAlignment(), omitHidden,
+ viewport.getColumnSelection()));
Desktop.addInternalFrame(cap,
"Alignment output - " + e.getActionCommand(), 600, 500);
} catch (OutOfMemoryError oom)
public void exportAnnotations_actionPerformed(ActionEvent e)
{
- new AnnotationExporter().exportAnnotations(
- alignPanel,
+ new AnnotationExporter().exportAnnotations(alignPanel,
viewport.showAnnotation ? viewport.getAlignment()
- .getAlignmentAnnotation() : null, viewport.getAlignment()
- .getGroups(),
- ((Alignment) viewport.getAlignment()).alignmentProperties);
+ .getAlignmentAnnotation() : null, viewport
+ .getAlignment().getGroups(), ((Alignment) viewport
+ .getAlignment()).alignmentProperties);
}
public void associatedData_actionPerformed(ActionEvent e)
viewport.redoList.clear();
updateEditMenuBar();
viewport.updateHiddenColumns();
-// viewport.hasHiddenColumns = (viewport.getColumnSelection() != null
-// && viewport.getColumnSelection().getHiddenColumns() != null && viewport.getColumnSelection()
-// .getHiddenColumns().size() > 0);
+ // viewport.hasHiddenColumns = (viewport.getColumnSelection() != null
+ // && viewport.getColumnSelection().getHiddenColumns() != null &&
+ // viewport.getColumnSelection()
+ // .getHiddenColumns().size() > 0);
}
}
if (originalSource != null)
{
- if (originalSource!=viewport)
+ if (originalSource != viewport)
{
- Cache.log.warn("Implementation worry: mismatch of viewport origin for undo");
+ Cache.log
+ .warn("Implementation worry: mismatch of viewport origin for undo");
}
originalSource.updateHiddenColumns();
-// originalSource.hasHiddenColumns = (viewport.getColumnSelection() != null
-// && viewport.getColumnSelection().getHiddenColumns() != null && viewport.getColumnSelection()
-// .getHiddenColumns().size() > 0);
- originalSource.firePropertyChange("alignment", null,
- originalSource.getAlignment().getSequences());
+ // originalSource.hasHiddenColumns = (viewport.getColumnSelection() !=
+ // null
+ // && viewport.getColumnSelection().getHiddenColumns() != null &&
+ // viewport.getColumnSelection()
+ // .getHiddenColumns().size() > 0);
+ originalSource.firePropertyChange("alignment", null, originalSource
+ .getAlignment().getSequences());
}
}
if (originalSource != null)
{
- if (originalSource!=viewport)
+ if (originalSource != viewport)
{
- Cache.log.warn("Implementation worry: mismatch of viewport origin for redo");
+ Cache.log
+ .warn("Implementation worry: mismatch of viewport origin for redo");
}
originalSource.updateHiddenColumns();
- //originalSource.hasHiddenColumns = (viewport.getColumnSelection() != null
- // && viewport.getColumnSelection().getHiddenColumns() != null && viewport.getColumnSelection()
- // .getHiddenColumns().size() > 0);
- originalSource.firePropertyChange("alignment", null,
- originalSource.getAlignment().getSequences());
+ // originalSource.hasHiddenColumns = (viewport.getColumnSelection() !=
+ // null
+ // && viewport.getColumnSelection().getHiddenColumns() != null &&
+ // viewport.getColumnSelection()
+ // .getHiddenColumns().size() > 0);
+ originalSource.firePropertyChange("alignment", null, originalSource
+ .getAlignment().getSequences());
}
}
Vector sg = new Vector();
if (viewport.cursorMode)
{
- sg.addElement(viewport.getAlignment()
- .getSequenceAt(alignPanel.seqPanel.seqCanvas.cursorY));
+ sg.addElement(viewport.getAlignment().getSequenceAt(
+ alignPanel.seqPanel.seqCanvas.cursorY));
}
else if (viewport.getSelectionGroup() != null
- && viewport.getSelectionGroup().getSize() != viewport.getAlignment()
- .getHeight())
+ && viewport.getSelectionGroup().getSize() != viewport
+ .getAlignment().getHeight())
{
sg = viewport.getSelectionGroup().getSequences(
viewport.getHiddenRepSequences());
}
RemoveGapColCommand removeGapCols = new RemoveGapColCommand(
- "Remove Gapped Columns", seqs, start, end, viewport.getAlignment());
+ "Remove Gapped Columns", seqs, start, end,
+ viewport.getAlignment());
addHistoryItem(removeGapCols);
// Hide everything by the current selection - this is a hack - we do the
// invert and then hide
// first check that there will be visible columns after the invert.
- if ((viewport.getColumnSelection() != null && viewport.getColumnSelection().getSelected() != null && viewport.getColumnSelection()
- .getSelected().size() > 0)
+ if ((viewport.getColumnSelection() != null
+ && viewport.getColumnSelection().getSelected() != null && viewport
+ .getColumnSelection().getSelected().size() > 0)
|| (sg != null && sg.getSize() > 0 && sg.getStartRes() <= sg
.getEndRes()))
{
hideSelSequences_actionPerformed(null);
hide = true;
}
- else if (!(toggleCols && viewport.getColumnSelection().getSelected().size() > 0))
+ else if (!(toggleCols && viewport.getColumnSelection().getSelected()
+ .size() > 0))
{
showAllSeqs_actionPerformed(null);
}
*/
public void clustalColour_actionPerformed(ActionEvent e)
{
- changeColour(new ClustalxColourScheme(
- viewport.getAlignment().getSequences(),
- viewport.getAlignment().getWidth()));
+ changeColour(new ClustalxColourScheme(viewport.getAlignment()
+ .getSequences(), viewport.getAlignment().getWidth()));
}
/**
{
changeColour(new PurinePyrimidineColourScheme());
}
+
/*
- public void covariationColour_actionPerformed(ActionEvent e)
- {
- changeColour(new CovariationColourScheme(viewport.getAlignment().getAlignmentAnnotation()[0]));
- }
- */
+ * public void covariationColour_actionPerformed(ActionEvent e) {
+ * changeColour(new
+ * CovariationColourScheme(viewport.getAlignment().getAlignmentAnnotation
+ * ()[0])); }
+ */
public void annotationColour_actionPerformed(ActionEvent e)
{
new AnnotationColourChooser(viewport, alignPanel);
}
-
+
public void rnahelicesColour_actionPerformed(ActionEvent e)
{
new RNAHelicesColourChooser(viewport, alignPanel);
if (cs instanceof ClustalxColourScheme)
{
- sg.cs = new ClustalxColourScheme(
- sg.getSequences(viewport.getHiddenRepSequences()),
- sg.getWidth());
+ sg.cs = new ClustalxColourScheme(sg.getSequences(viewport
+ .getHiddenRepSequences()), sg.getWidth());
}
else if (cs instanceof UserColourScheme)
{
if (viewport.getConservationSelected())
{
Conservation c = new Conservation("Group",
- ResidueProperties.propHash, 3,
- sg.getSequences(viewport.getHiddenRepSequences()),
- sg.getStartRes(), sg.getEndRes() + 1);
+ ResidueProperties.propHash, 3, sg.getSequences(viewport
+ .getHiddenRepSequences()), sg.getStartRes(),
+ sg.getEndRes() + 1);
c.calculate();
c.verdict(false, viewport.getConsPercGaps());
sg.cs.setConservation(c);
protected void modifyConservation_actionPerformed(ActionEvent e)
{
if (viewport.getConservationSelected()
- && viewport.getGlobalColourScheme()!= null)
+ && viewport.getGlobalColourScheme() != null)
{
SliderPanel.setConservationSlider(alignPanel,
viewport.getGlobalColourScheme(), "Background");
{
SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
AlignmentSorter.sortByID(viewport.getAlignment());
- addHistoryItem(new OrderCommand("ID Sort", oldOrder, viewport.getAlignment()));
+ addHistoryItem(new OrderCommand("ID Sort", oldOrder,
+ viewport.getAlignment()));
alignPanel.paintAlignment(true);
}
.getAlignment().getSequences());
}
}
+
public void sortByTreeOption_actionPerformed(ActionEvent e)
{
viewport.sortByTree = sortByTree.isSelected();
{
viewport.followSelection = listenToViewSelections.isSelected();
}
+
/**
* DOCUMENT ME!
*
// pointers
AlignmentSorter.sortBy(viewport.getAlignment(), order);
- addHistoryItem(new OrderCommand(order.getName(), oldOrder,
- viewport.getAlignment()));
+ addHistoryItem(new OrderCommand(order.getName(), oldOrder, viewport
+ .getAlignment()));
alignPanel.paintAlignment(true);
}
{
tp.sortByTree_actionPerformed(null);
addHistoryItem(tp.sortAlignmentIn(alignPanel));
-
+
}
});
}
-
/**
* construct any groupURL type service menu entries.
*
* AlignFrame af = this; testAlView.addActionListener(new ActionListener() {
*
* @Override public void actionPerformed(ActionEvent e) {
- * jalview.datamodel.AlignmentView.testSelectionViews(af.viewport.getAlignment(),
+ * jalview.datamodel.AlignmentView
+ * .testSelectionViews(af.viewport.getAlignment(),
* af.viewport.getColumnSelection(), af.viewport.selectionGroup); }
*
* }); webService.add(testAlView);
// rest-style services with other types of analysis/calculation service
// SHmmr test client - still being implemented.
// DEBUG - alignmentView
-
- for (jalview.ws.rest.RestClient client: jalview.ws.rest.RestClient.getRestClients()) {
- client.attachWSMenuEntry(JvSwingUtils.findOrCreateMenu(webService, client.getAction()), this);
+
+ for (jalview.ws.rest.RestClient client : jalview.ws.rest.RestClient
+ .getRestClients())
+ {
+ client.attachWSMenuEntry(
+ JvSwingUtils.findOrCreateMenu(webService, client.getAction()),
+ this);
}
if (Cache.getDefault("SHOW_ENFIN_SERVICES", true))
boolean featuresFile = false;
try
{
- featuresFile = new FeaturesFile(file, type)
- .parse(viewport.getAlignment().getDataset(),
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours,
- false, jalview.bin.Cache.getDefault(
- "RELAXEDSEQIDMATCHING", false));
+ featuresFile = new FeaturesFile(file, type).parse(viewport
+ .getAlignment().getDataset(), alignPanel.seqPanel.seqCanvas
+ .getFeatureRenderer().featureColours, false,
+ jalview.bin.Cache.getDefault("RELAXEDSEQIDMATCHING", false));
} catch (Exception ex)
{
ex.printStackTrace();
int l = 0, c = pdbfn.indexOf(".");
while (mtch == null && c != -1)
{
- do
+ do
{
l = c;
} while ((c = pdbfn.indexOf(".", l)) > l);
// try and associate
// TODO: may want to set a standard ID naming formalism for
// associating PDB files which have no IDs.
- for (SequenceI toassoc: (SequenceI[])fm[2]) {
- PDBEntry pe = new AssociatePdbFileWithSeq()
- .associatePdbWithSeq((String) fm[0], (String) fm[1],
- toassoc, false);
- if (pe != null)
+ for (SequenceI toassoc : (SequenceI[]) fm[2])
{
- System.err
- .println("Associated file : " + ((String) fm[0])
- + " with "
- + toassoc.getDisplayId(true));
- assocfiles++;
- }
+ PDBEntry pe = new AssociatePdbFileWithSeq()
+ .associatePdbWithSeq((String) fm[0],
+ (String) fm[1], toassoc, false);
+ if (pe != null)
+ {
+ System.err.println("Associated file : "
+ + ((String) fm[0]) + " with "
+ + toassoc.getDisplayId(true));
+ assocfiles++;
+ }
}
alignPanel.paintAlignment(true);
}
viewport.setShowSequenceLogo(showSequenceLogo.getState());
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
}
+
protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
{
viewport.setNormaliseSequenceLogo(normaliseSequenceLogo.getState());
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
}
+
protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
{
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom(
viewport.getSequenceSelection(),
viewport.getAlignmentView(true).getSequenceStrings(
- viewport.getGapCharacter()),
- viewport.getAlignment().getGroups());
+ viewport.getGapCharacter()), viewport.getAlignment()
+ .getGroups());
viewport.getAlignment().deleteAllGroups();
viewport.sequenceColours = null;
viewport.setSelectionGroup(null);
"Implementation error: cannot show a view from another alignment in an AlignFrame.");
}
if (tabbedPane != null
- & alignPanels.indexOf(alignmentPanel) != tabbedPane.getSelectedIndex())
+ & alignPanels.indexOf(alignmentPanel) != tabbedPane
+ .getSelectedIndex())
{
tabbedPane.setSelectedIndex(alignPanels.indexOf(alignmentPanel));
}