import jalview.api.AlignmentViewPanel;
//from JalviewLite imports import jalview.api.FeatureRenderer;
import jalview.api.FeatureSettingsControllerI;
+import jalview.api.FeatureSettingsModelI;
import jalview.api.SplitContainerI;
import jalview.api.ViewStyleI;
import jalview.api.analysis.SimilarityParamsI;
import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;
import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
*/
@SuppressWarnings("serial")
public class AlignFrame extends GAlignFrame
- implements AlignFrameI, DropTargetListener,
- IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener
+ implements AlignFrameI, DropTargetListener, IProgressIndicator,
+ AlignViewControllerGuiI, ColourChangeListener
{
public static final int DEFAULT_WIDTH = 700;
/**
* Current filename for this alignment
*/
- private String fileName = null;
+ String fileName = null;
- private File fileObject;
+ File fileObject;
/**
* Creates a new AlignFrame object with specific width and height.
addAlignmentPanel(alignPanel, newPanel);
// setBackground(Color.white); // BH 2019
-
+
if (!Jalview.isHeadlessMode())
{
progressBar = new ProgressBar(this.statusPanel, this.statusBar);
+ // JalviewJS options
statusPanel.setVisible(Jalview.getInstance().getShowStatus());
alignFrameMenuBar.setVisible(Jalview.getInstance().getAllowMenuBar());
}
calculateTree.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
if (Desktop.getDesktopPane() != null)
{
this.setDropTarget(new java.awt.dnd.DropTarget(this, this));
- PropertyChangeListener serviceListener = (Platform.isJS() ? null
- : addServiceListeners());
- addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
+ if (!Platform.isJS())
{
- @Override
- public void internalFrameClosed(
- javax.swing.event.InternalFrameEvent evt)
- {
- // System.out.println("deregistering discoverer listener");
- if (serviceListener != null)
- {
- Desktop.getInstance().removeJalviewPropertyChangeListener(
- "services", serviceListener);
- }
- closeMenuItem_actionPerformed(true);
- }
- });
-
+ addServiceListeners();
+ }
setGUINucleotide();
}
new ViewSetProvider()
{
+
@Override
public AlignmentPanel[] getAllAlignmentPanels()
{
}, selviews, new ItemListener()
{
+
@Override
public void itemStateChanged(ItemEvent e)
{
}
addFocusListener(new FocusAdapter()
{
+
@Override
public void focusGained(FocusEvent e)
{
{
addKeyListener(new KeyAdapter()
{
+
@Override
public void keyPressed(KeyEvent evt)
{
{
case KeyEvent.VK_ESCAPE: // escape key
- deselectAllSequenceMenuItem_actionPerformed(null);
-
+ // alignPanel.deselectAllSequences();
+ alignPanel.deselectAllSequences();
break;
case KeyEvent.VK_DOWN:
}
}
+
@Override
public void keyReleased(KeyEvent evt)
{
}
/* Set up intrinsic listeners for dynamically generated GUI bits. */
- private PropertyChangeListener addServiceListeners()
+ private void addServiceListeners()
{
- PropertyChangeListener serviceListener = new PropertyChangeListener()
+ final java.beans.PropertyChangeListener thisListener;
+ Desktop.getInstance().addJalviewPropertyChangeListener("services",
+ thisListener = new java.beans.PropertyChangeListener()
+ {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt)
+ {
+ // // System.out.println("Discoverer property change.");
+ // if (evt.getPropertyName().equals("services"))
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+
+
+ @Override
+ public void run()
+ {
+ System.err.println(
+ "Rebuild WS Menu for service change");
+ BuildWebServiceMenu();
+ }
+
+ });
+ }
+ }
+ });
+ addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
{
+
@Override
- public void propertyChange(PropertyChangeEvent evt)
+ public void internalFrameClosed(
+ javax.swing.event.InternalFrameEvent evt)
{
- {
- SwingUtilities.invokeLater(new Runnable()
- {
-
- @Override
- public void run()
- {
- System.err.println("Rebuild WS Menu for service change");
- BuildWebServiceMenu();
- }
- });
- }
+ // System.out.println("deregistering discoverer listener");
+ Desktop.getInstance().removeJalviewPropertyChangeListener(
+ "services", thisListener);
+ closeMenuItem_actionPerformed(true);
}
- };
-
- Desktop.getInstance().addJalviewPropertyChangeListener("services",
- serviceListener);
+ });
// Finally, build the menu once to get current service state
new Thread(new Runnable()
{
+
@Override
public void run()
{
BuildWebServiceMenu();
}
}).start();
- return serviceListener;
}
/**
* operation that affects the data in the current view (selection changed,
* etc) to update the menus to reflect the new state.
*/
+
@Override
public void setMenusForViewport()
{
scaleLeft.setVisible(av.getWrapAlignment());
scaleRight.setVisible(av.getWrapAlignment());
annotationPanelMenuItem.setState(av.isShowAnnotation());
- /*
- * Show/hide annotations only enabled if annotation panel is shown
- */
- syncAnnotationMenuItems();
-
+ // Show/hide annotations only enabled if annotation panel is shown
+ syncAnnotationMenuItems(av.isShowAnnotation());
viewBoxesMenuItem.setSelected(av.getShowBoxes());
viewTextMenuItem.setSelected(av.getShowText());
showNonconservedMenuItem.setSelected(av.getShowUnconserved());
applyToAllGroups.setState(av.getColourAppliesToAllGroups());
showNpFeatsMenuitem.setSelected(av.isShowNPFeats());
showDbRefsMenuitem.setSelected(av.isShowDBRefs());
- autoCalculate.setSelected(av.getAutoCalculateConsensusAndConservation());
+ autoCalculate
+ .setSelected(av.getAutoCalculateConsensusAndConservation());
sortByTree.setSelected(av.sortByTree);
listenToViewSelections.setSelected(av.followSelection);
*
* @see jalview.gui.IProgressIndicator#setProgressBar(java.lang.String, long)
*/
+
@Override
public void setProgressBar(String message, long id)
{
progressBar.setProgressBar(message, id);
}
+
@Override
public void registerHandler(final long id,
final IProgressIndicatorHandler handler)
*
* @return true if any progress bars are still active
*/
+
@Override
public boolean operationInProgress()
{
* will cause the status bar to be hidden, with possibly undesirable flicker
* of the screen layout.
*/
+
@Override
public void setStatus(String text)
{
return alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer();
}
+
@Override
public void fetchSequence_actionPerformed()
{
new SequenceFetcher(this);
}
+
@Override
public void addFromFile_actionPerformed(ActionEvent e)
{
Desktop.getInstance().inputLocalFileMenuItem_actionPerformed(viewport);
}
+
@Override
public void reload_actionPerformed(ActionEvent e)
{
final FeatureSettings nfs = newframe.featureSettings;
SwingUtilities.invokeLater(new Runnable()
{
+
@Override
public void run()
{
}
}
+
@Override
public void addFromText_actionPerformed(ActionEvent e)
{
.inputTextboxMenuItem_actionPerformed(viewport.getAlignPanel());
}
+
@Override
public void addFromURL_actionPerformed(ActionEvent e)
{
Desktop.getInstance().inputURLMenuItem_actionPerformed(viewport);
}
+
@Override
public void save_actionPerformed(ActionEvent e)
{
* Saves the alignment to a file with a name chosen by the user, if necessary
* warning if a file would be overwritten
*/
+
@Override
public void saveAs_actionPerformed()
{
String shortName = title;
if (shortName.indexOf(File.separatorChar) > -1)
{
- shortName = shortName.substring(
- shortName.lastIndexOf(File.separatorChar) + 1);
+ shortName = shortName
+ .substring(shortName.lastIndexOf(File.separatorChar) + 1);
}
- lastSaveSuccessful = new Jalview2XML().saveAlignment(this, file, shortName);
-
+ lastSaveSuccessful = new Jalview2XML().saveAlignment(this, file,
+ shortName);
+
statusBar.setText(MessageManager.formatMessage(
"label.successfully_saved_to_file_in_format", new Object[]
{ fileName, format }));
-
+
return;
}
AlignExportSettingsI options = new AlignExportSettingsAdapter(false);
Runnable cancelAction = new Runnable()
{
+
@Override
public void run()
{
};
Runnable outputAction = new Runnable()
{
+
@Override
public void run()
{
BackupFiles backupfiles = doBackup ? new BackupFiles(file) : null;
try
{
- String tempFilePath = doBackup ? backupfiles.getTempFilePath() : file;
- PrintWriter out = new PrintWriter(
- new FileWriter(tempFilePath));
+ String tempFilePath = doBackup ? backupfiles.getTempFilePath()
+ : file;
+ PrintWriter out = new PrintWriter(new FileWriter(tempFilePath));
out.print(output);
out.close();
AlignFrame.this.setTitle(file);
statusBar.setText(MessageManager.formatMessage(
- "label.successfully_saved_to_file_in_format", new Object[]
- { fileName, format.getName() }));
+ "label.successfully_saved_to_file_in_format",
+ new Object[]
+ { fileName, format.getName() }));
lastSaveSuccessful = true;
} catch (Exception ex)
{
*
* @param fileFormatName
*/
+
@Override
protected void outputText_actionPerformed(String fileFormatName)
{
AlignExportSettingsI options = new AlignExportSettingsAdapter(false);
Runnable outputAction = new Runnable()
{
+
@Override
public void run()
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void htmlMenuItem_actionPerformed(ActionEvent e)
{
htmlSVG.exportHTML(null);
}
+
@Override
public void bioJSMenuItem_actionPerformed(ActionEvent e)
{
*
* @param f
*/
+
@Override
public void createPNG(File f)
{
*
* @param f
*/
+
@Override
public void createEPS(File f)
{
*
* @param f
*/
+
@Override
public void createSVG(File f)
{
alignPanel.makeAlignmentImage(TYPE.SVG, f);
}
+
@Override
public void pageSetup_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void printMenuItem_actionPerformed(ActionEvent e)
{
thread.start();
}
+
@Override
public void exportFeatures_actionPerformed(ActionEvent e)
{
new AnnotationExporter(alignPanel).exportFeatures();
}
+
@Override
public void exportAnnotations_actionPerformed(ActionEvent e)
{
new AnnotationExporter(alignPanel).exportAnnotations();
}
+
@Override
public void associatedData_actionPerformed(ActionEvent e)
{
final JalviewFileChooser chooser = new JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle(
- MessageManager.getString("label.load_jalview_annotations"));
- chooser.setToolTipText(
- MessageManager.getString("label.load_jalview_annotations"));
+ String tooltip = MessageManager
+ .getString("label.load_jalview_annotations");
+ chooser.setDialogTitle(tooltip);
+ chooser.setToolTipText(tooltip);
chooser.setResponseHandler(0, new Runnable()
{
+
@Override
public void run()
{
*
* @param closeAllTabs
*/
+
@Override
public void closeMenuItem_actionPerformed(boolean closeAllTabs)
{
if (closeAllTabs)
{
+ // JalviewJS-develop only
+ //
+ // if (featureSettings != null && featureSettings.isOpen())
+ // {
+ // featureSettings.close();
+ // featureSettings = null;
+ // }
/*
* this will raise an INTERNAL_FRAME_CLOSED event and this method will
* be called recursively, with the frame now in 'closed' state
}
}
+
@Override
public void addHistoryItem(CommandI command)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void undoMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void redoMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void copy_actionPerformed()
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void pasteNew_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void pasteThis_actionPerformed(ActionEvent e)
{
newGraphGroups.add(q, null);
}
newGraphGroups.set(newann.graphGroup,
- new Integer(++fgroup));
+ Integer.valueOf(++fgroup));
}
newann.graphGroup = newGraphGroups.get(newann.graphGroup)
.intValue();
newGraphGroups.add(q, null);
}
newGraphGroups.set(newann.graphGroup,
- new Integer(++fgroup));
+ Integer.valueOf(++fgroup));
}
newann.graphGroup = newGraphGroups.get(newann.graphGroup)
.intValue();
}
+
@Override
protected void expand_newalign(ActionEvent e)
{
/**
* Action Cut (delete and copy) the selected region
*/
+
@Override
protected void cut_actionPerformed()
{
/**
* Performs menu option to Delete the currently selected region
*/
+
@Override
protected void delete_actionPerformed()
{
return;
}
- Runnable okAction = new Runnable()
- {
- @Override
- public void run()
- {
- SequenceI[] cut = sg.getSequences()
- .toArray(new SequenceI[sg.getSize()]);
-
- addHistoryItem(new EditCommand(
- MessageManager.getString("label.cut_sequences"), Action.CUT,
- cut, sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
- viewport.getAlignment()));
-
- viewport.setSelectionGroup(null);
- viewport.sendSelection();
- viewport.getAlignment().deleteGroup(sg);
-
- viewport.firePropertyChange("alignment", null,
- viewport.getAlignment().getSequences());
- if (viewport.getAlignment().getHeight() < 1)
- {
- try
- {
- AlignFrame.this.setClosed(true);
- } catch (Exception ex)
- {
- }
- }
- }};
+ Runnable okAction = new Runnable()
+ {
+
+ @Override
+ public void run()
+ {
+ SequenceI[] cut = sg.getSequences()
+ .toArray(new SequenceI[sg.getSize()]);
+
+ addHistoryItem(new EditCommand(
+ MessageManager.getString("label.cut_sequences"), Action.CUT,
+ cut, sg.getStartRes(),
+ sg.getEndRes() - sg.getStartRes() + 1,
+ viewport.getAlignment()));
+
+ viewport.setSelectionGroup(null);
+ viewport.sendSelection();
+ viewport.getAlignment().deleteGroup(sg);
+
+ viewport.firePropertyChange("alignment", null,
+ viewport.getAlignment().getSequences());
+ if (viewport.getAlignment().getHeight() < 1)
+ {
+ try
+ {
+ AlignFrame.this.setClosed(true);
+ } catch (Exception ex)
+ {
+ }
+ }
+ }
+ };
/*
* If the cut affects all sequences, prompt for confirmation
*/
- boolean wholeHeight = sg.getSize() == viewport.getAlignment().getHeight();
+ boolean wholeHeight = sg.getSize() == viewport.getAlignment()
+ .getHeight();
boolean wholeWidth = (((sg.getEndRes() - sg.getStartRes())
+ 1) == viewport.getAlignment().getWidth()) ? true : false;
- if (wholeHeight && wholeWidth)
- {
- JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane());
- dialog.setResponseHandler(0, okAction); // 0 = OK_OPTION
- Object[] options = new Object[] { MessageManager.getString("action.ok"),
- MessageManager.getString("action.cancel") };
- dialog.showDialog(MessageManager.getString("warn.delete_all"),
- MessageManager.getString("label.delete_all"),
- JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
- options, options[0]);
- } else
- {
- okAction.run();
- }
+ if (wholeHeight && wholeWidth)
+ {
+ JvOptionPane dialog = JvOptionPane
+ .newOptionDialog(Desktop.getDesktopPane());
+ dialog.setResponseHandler(0, okAction); // 0 = OK_OPTION
+ Object[] options = new Object[] {
+ MessageManager.getString("action.ok"),
+ MessageManager.getString("action.cancel") };
+ dialog.showDialog(MessageManager.getString("warn.delete_all"),
+ MessageManager.getString("label.delete_all"),
+ JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
+ options, options[0]);
+ }
+ else
+ {
+ okAction.run();
+ }
}
/**
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void deleteGroups_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
{
- SequenceGroup sg = new SequenceGroup(
- viewport.getAlignment().getSequences());
-
- sg.setEndRes(viewport.getAlignment().getWidth() - 1);
- viewport.setSelectionGroup(sg);
- viewport.isSelectionGroupChanged(true);
- viewport.sendSelection();
- // JAL-2034 - should delegate to
- // alignPanel to decide if overview needs
- // updating.
- alignPanel.paintAlignment(false, false);
- PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+ // SequenceGroup sg = new SequenceGroup(
+ // viewport.getAlignment().getSequences());
+ //
+ // sg.setEndRes(viewport.getAlignment().getWidth() - 1);
+ // viewport.setSelectionGroup(sg);
+ // viewport.isSelectionGroupChanged(true);
+ // viewport.sendSelection();
+ // // JAL-2034 - should delegate to
+ // // alignPanel to decide if overview needs
+ // // updating.
+ // alignPanel.paintAlignment(false, false);
+ // PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+ alignPanel.selectAllSequences();
}
/**
* @param e
* DOCUMENT ME!
*/
+
@Override
public void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
{
- if (viewport.cursorMode)
- {
- alignPanel.getSeqPanel().keyboardNo1 = null;
- alignPanel.getSeqPanel().keyboardNo2 = null;
- }
- viewport.setSelectionGroup(null);
- viewport.getColumnSelection().clear();
- viewport.setSelectionGroup(null);
- alignPanel.getIdPanel().getIdCanvas().searchResults = null;
- // JAL-2034 - should delegate to
- // alignPanel to decide if overview needs
- // updating.
- alignPanel.paintAlignment(false, false);
- PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
- viewport.sendSelection();
+ alignPanel.deselectAllSequences();
+ // if (viewport.cursorMode)
+ // {
+ // alignPanel.getSeqPanel().keyboardNo1 = null;
+ // alignPanel.getSeqPanel().keyboardNo2 = null;
+ // }
+ // viewport.setSelectionGroup(null);
+ // viewport.getColumnSelection().clear();
+ // viewport.setSelectionGroup(null);
+ // alignPanel.getIdPanel().getIdCanvas().searchResults = null;
+ // // JAL-2034 - should delegate to
+ // // alignPanel to decide if overview needs
+ // // updating.
+ // alignPanel.paintAlignment(false, false);
+ // PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+ // viewport.sendSelection();
}
/**
* @param e
* DOCUMENT ME!
*/
+
@Override
public void invertSequenceMenuItem_actionPerformed(ActionEvent e)
{
if (sg == null)
{
- selectAllSequenceMenuItem_actionPerformed(null);
+ alignPanel.selectAllSequences();
return;
}
viewport.sendSelection();
}
+
@Override
public void invertColSel_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void remove2LeftMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void remove2RightMenuItem_actionPerformed(ActionEvent e)
{
column, viewport.getAlignment());
}
- setStatus(MessageManager
- .formatMessage("label.removed_columns", new String[]
+ setStatus(MessageManager.formatMessage("label.removed_columns",
+ new String[]
{ Integer.valueOf(trimRegion.getSize()).toString() }));
addHistoryItem(trimRegion);
* @param e
* DOCUMENT ME!
*/
+
@Override
public void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
{
addHistoryItem(removeGapCols);
- setStatus(MessageManager
- .formatMessage("label.removed_empty_columns", new Object[]
+ setStatus(MessageManager.formatMessage("label.removed_empty_columns",
+ new Object[]
{ Integer.valueOf(removeGapCols.getSize()).toString() }));
// This is to maintain viewport position on first residue
* @param e
* DOCUMENT ME!
*/
+
@Override
public void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void padGapsMenuitem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void findMenuItem_actionPerformed(ActionEvent e)
{
/**
* Create a new view of the current alignment.
*/
+
@Override
public void newView_actionPerformed(ActionEvent e)
{
if (viewport.getViewName() == null)
{
- viewport.setViewName(MessageManager
- .getString("label.view_name_original"));
+ viewport.setViewName(
+ MessageManager.getString("label.view_name_original"));
}
/*
/**
* Explode tabbed views into separate windows.
*/
+
@Override
public void expandViews_actionPerformed(ActionEvent e)
{
/**
* Gather views in separate windows back into a tabbed presentation.
*/
+
@Override
public void gatherViews_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void font_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void seqLimit_actionPerformed(ActionEvent e)
{
alignPanel.paintAlignment(true, false);
}
+
@Override
public void idRightAlign_actionPerformed(ActionEvent e)
{
alignPanel.paintAlignment(false, false);
}
+
@Override
public void centreColumnLabels_actionPerformed(ActionEvent e)
{
*
* @see jalview.jbgui.GAlignFrame#followHighlight_actionPerformed()
*/
+
@Override
protected void followHighlight_actionPerformed()
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void colourTextMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void wrapMenuItem_actionPerformed(ActionEvent e)
{
alignPanel.updateLayout();
}
+
@Override
public void showAllSeqs_actionPerformed(ActionEvent e)
{
viewport.showAllHiddenSeqs();
}
+
@Override
public void showAllColumns_actionPerformed(ActionEvent e)
{
viewport.sendSelection();
}
+
@Override
public void hideSelSequences_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#hideAllButSelection_actionPerformed(java.awt.
* event.ActionEvent)
*/
+
@Override
public void hideAllButSelection_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#hideAllSelection_actionPerformed(java.awt.event
* .ActionEvent)
*/
+
@Override
public void hideAllSelection_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showAllhidden_actionPerformed(java.awt.event.
* ActionEvent)
*/
+
@Override
public void showAllhidden_actionPerformed(ActionEvent e)
{
viewport.sendSelection();
}
+
@Override
public void hideSelColumns_actionPerformed(ActionEvent e)
{
viewport.sendSelection();
}
+
@Override
public void hiddenMarkers_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void scaleAbove_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void scaleLeft_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void scaleRight_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void viewBoxesMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void viewTextMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
{
public FeatureSettings featureSettings;
+
@Override
public FeatureSettingsControllerI getFeatureSettingsUI()
{
return featureSettings;
}
+
@Override
public void featureSettings_actionPerformed(ActionEvent e)
{
+ showFeatureSettingsUI();
+ }
+
+
+ public FeatureSettingsControllerI showFeatureSettingsUI()
+ {
if (featureSettings != null)
{
- featureSettings.close();
+ // featureSettings.closeOldSettings();
featureSettings = null;
}
if (!showSeqFeatures.isSelected())
showSeqFeatures_actionPerformed(null);
}
featureSettings = new FeatureSettings(this);
+ return featureSettings;
}
/**
* @param evt
* DOCUMENT ME!
*/
+
@Override
public void showSeqFeatures_actionPerformed(ActionEvent evt)
{
*
* @param e
*/
+
@Override
public void annotationPanelMenuItem_actionPerformed(ActionEvent e)
{
final boolean setVisible = annotationPanelMenuItem.isSelected();
viewport.setShowAnnotation(setVisible);
- syncAnnotationMenuItems();
+ syncAnnotationMenuItems(setVisible);
alignPanel.updateLayout();
}
- private void syncAnnotationMenuItems()
+ private void syncAnnotationMenuItems(boolean setVisible)
{
- final boolean setVisible = annotationPanelMenuItem.isSelected();
showAllSeqAnnotations.setEnabled(setVisible);
hideAllSeqAnnotations.setEnabled(setVisible);
showAllAlAnnotations.setEnabled(setVisible);
hideAllAlAnnotations.setEnabled(setVisible);
}
-
+
@Override
public void alignmentProperties()
{
JLabel textLabel = new JLabel();
textLabel.setText(content);
textLabel.setBackground(Color.WHITE);
-
+
pane = new JPanel(new BorderLayout());
((JPanel) pane).setOpaque(true);
pane.setBackground(Color.WHITE);
* @param e
* DOCUMENT ME!
*/
+
@Override
public void overviewMenuItem_actionPerformed(ActionEvent e)
{
frame.addInternalFrameListener(
new javax.swing.event.InternalFrameAdapter()
{
+
@Override
public void internalFrameClosed(
javax.swing.event.InternalFrameEvent evt)
alignPanel.setOverviewPanel(overview);
}
+
@Override
public void textColour_actionPerformed()
{
* CovariationColourScheme(viewport.getAlignment().getAlignmentAnnotation
* ()[0])); }
*/
+
@Override
public void annotationColour_actionPerformed()
{
new AnnotationColourChooser(viewport, alignPanel);
}
+
@Override
public void annotationColumn_actionPerformed(ActionEvent e)
{
*
* @param selected
*/
+
@Override
public void applyToAllGroups_actionPerformed(boolean selected)
{
* @param name
* the name (not the menu item label!) of the colour scheme
*/
+
@Override
public void changeColour_actionPerformed(String name)
{
* otherwise set the chosen colour scheme (or null for 'None')
*/
ColourSchemeI cs = ColourSchemes.getInstance().getColourScheme(name,
- viewport,
- viewport.getAlignment(), viewport.getHiddenRepSequences());
+ viewport, viewport.getAlignment(),
+ viewport.getHiddenRepSequences());
changeColour(cs);
}
*
* @param cs
*/
+
@Override
public void changeColour(ColourSchemeI cs)
{
/**
* Show the PID threshold slider panel
*/
+
@Override
protected void modifyPID_actionPerformed()
{
/**
* Show the Conservation slider panel
*/
+
@Override
protected void modifyConservation_actionPerformed()
{
/**
* Action on selecting or deselecting (Colour) By Conservation
*/
+
@Override
public void conservationMenuItem_actionPerformed(boolean selected)
{
/**
* Action on selecting or deselecting (Colour) Above PID Threshold
*/
+
@Override
public void abovePIDThreshold_actionPerformed(boolean selected)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void sortIDMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void sortLengthMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void sortGroupMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
public void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
{
}
}
+
@Override
public void autoCalculate_actionPerformed(ActionEvent e)
{
- viewport.setAutoCalculateConsensusAndConservation(autoCalculate.isSelected());
+ viewport.setAutoCalculateConsensusAndConservation(
+ autoCalculate.isSelected());
if (viewport.getAutoCalculateConsensusAndConservation())
{
viewport.firePropertyChange("alignment", null,
}
}
+
@Override
public void sortByTreeOption_actionPerformed(ActionEvent e)
{
viewport.sortByTree = sortByTree.isSelected();
}
+
@Override
protected void listenToViewSelections_actionPerformed(ActionEvent e)
{
sort.add(item);
item.addActionListener(new java.awt.event.ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
sort.add(item);
item.addActionListener(new java.awt.event.ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
* rebuilding in subsequence calls.
*
*/
+
@Override
public void buildSortByAnnotationScoresMenu()
{
Enumeration<String> labels = scoreSorts.keys();
while (labels.hasMoreElements())
{
- addSortByAnnotScoreMenuItem(sortByAnnotScore,
- labels.nextElement());
+ addSortByAnnotScoreMenuItem(sortByAnnotScore, labels.nextElement());
}
sortByAnnotScore.setVisible(scoreSorts.size() > 0);
scoreSorts.clear();
* closed, and adjust the tree leaf to sequence mapping when the alignment is
* modified.
*/
+
@Override
public void buildTreeSortMenu()
{
final JMenuItem item = new JMenuItem(tp.getTitle());
item.addActionListener(new java.awt.event.ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
* @param e
* DOCUMENT ME!
*/
+
@Override
protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
{
chooser.setToolTipText(
MessageManager.getString("label.load_tree_file"));
- chooser.setResponseHandler(0,new Runnable()
+ chooser.setResponseHandler(0, new Runnable()
{
+
@Override
public void run()
{
viewport.setCurrentTree(showNewickTree(fin, filePath).getTree());
} catch (Exception ex)
{
- JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), ex.getMessage(),
+ JvOptionPane.showMessageDialog(Desktop.getDesktopPane(),
+ ex.getMessage(),
MessageManager
.getString("label.problem_reading_tree_file"),
JvOptionPane.WARNING_MESSAGE);
buildingMenu = true;
new Thread(new Runnable()
{
+
@Override
public void run()
{
final JMenu dismenu = new JMenu("Protein Disorder");
// JAL-940 - only show secondary structure prediction services from
// the legacy server
- Hashtable<String, Vector<ServiceHandle>> services = Discoverer
+ Hashtable<String, Vector<ServiceHandle>> ds = Discoverer
.getInstance().getServices();
if (// Cache.getDefault("SHOW_JWS1_SERVICES", true)
// &&
- services != null && (services.size() > 0))
+ ds != null && (ds.size() > 0))
{
// TODO: refactor to allow list of AbstractName/Handler bindings to
// be
// No MSAWS used any more:
// Vector msaws = null; // (Vector)
// Discoverer.services.get("MsaWS");
- Vector<ServiceHandle> secstrpr = services.get("SecStrPred");
+ Vector<ServiceHandle> secstrpr = ds.get("SecStrPred");
if (secstrpr != null)
{
// Add any secondary structure prediction services
for (int i = 0, j = secstrpr.size(); i < j; i++)
{
- final ext.vamsas.ServiceHandle sh = secstrpr
- .get(i);
+ final ext.vamsas.ServiceHandle sh = secstrpr.get(i);
jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer
.getServiceClient(sh);
int p = secstrmenu.getItemCount();
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
+
@Override
public void run()
{
* JMenuItem testAlView = new JMenuItem("Test AlignmentView"); final
* AlignFrame af = this; testAlView.addActionListener(new ActionListener() {
*
- * @Override public void actionPerformed(ActionEvent e) {
+ * public void actionPerformed(ActionEvent e) {
* jalview.datamodel.AlignmentView
* .testSelectionViews(af.viewport.getAlignment(),
* af.viewport.getColumnSelection(), af.viewport.selectionGroup); }
JMenuItem xtype = new JMenuItem(source);
xtype.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
* Construct and display a new frame containing the translation of this
* frame's DNA sequences to their aligned protein (amino acid) equivalents.
*/
+
@Override
public void showTranslation_actionPerformed(GeneticCodeI codeTable)
{
final String errorTitle = MessageManager
.getString("label.implementation_error")
+ MessageManager.getString("label.translation_failed");
- JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg, errorTitle,
- JvOptionPane.ERROR_MESSAGE);
+ JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg,
+ errorTitle, JvOptionPane.ERROR_MESSAGE);
return;
}
if (al == null || al.getHeight() == 0)
"label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation");
final String errorTitle = MessageManager
.getString("label.translation_failed");
- JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg, errorTitle,
- JvOptionPane.WARNING_MESSAGE);
+ JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg,
+ errorTitle, JvOptionPane.WARNING_MESSAGE);
}
else
{
}
+
@Override
public void refreshFeatureUI(boolean enableIfNecessary)
{
}
+
@Override
public void dragEnter(DropTargetDragEvent evt)
{
}
+
@Override
public void dragExit(DropTargetEvent evt)
{
}
+
@Override
public void dragOver(DropTargetDragEvent evt)
{
}
+
@Override
public void dropActionChanged(DropTargetDragEvent evt)
{
}
+
@Override
public void drop(DropTargetDropEvent evt)
{
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
Transferable t = evt.getTransferable();
- final AlignFrame thisaf = this;
final List<Object> files = new ArrayList<>();
List<DataSourceType> protocols = new ArrayList<>();
try
{
Desktop.transferFromDropTarget(files, protocols, evt, t);
- } catch (Exception e)
- {
- e.printStackTrace();
- }
- if (files != null)
+ if (files.size() > 0)
{
new Thread(new Runnable()
{
+
@Override
public void run()
{
+ loadDroppedFiles(files, protocols, evt, t);
+ }
+ }).start();
+ }
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ protected void loadDroppedFiles(List<Object> files,
+ List<DataSourceType> protocols, DropTargetDropEvent evt,
+ Transferable t)
+ {
try
{
// check to see if any of these files have names matching sequences
if (protocol == DataSourceType.FILE)
{
File fl;
- if (file instanceof File) {
+ if (file instanceof File)
+ {
fl = (File) file;
Platform.cacheFileData(fl);
- } else {
+ }
+ else
+ {
fl = new File(fileName);
}
pdbfn = fl.getName();
int assocfiles = 0;
if (filesmatched.size() > 0)
{
- boolean autoAssociate = Cache
- .getDefault(Preferences.AUTOASSOCIATE_PDBANDSEQS, false);
+ boolean autoAssociate = Cache.getDefault(
+ Preferences.AUTOASSOCIATE_PDBANDSEQS, false);
if (!autoAssociate)
{
String msg = MessageManager.formatMessage(
.toString() });
String ttl = MessageManager.getString(
"label.automatically_associate_structure_files_by_name");
- int choice = JvOptionPane.showConfirmDialog(thisaf, msg,
- ttl, JvOptionPane.YES_NO_OPTION);
+ int choice = JvOptionPane.showConfirmDialog(this, msg, ttl,
+ JvOptionPane.YES_NO_OPTION);
autoAssociate = choice == JvOptionPane.YES_OPTION;
}
if (autoAssociate)
}
if (filesnotmatched.size() > 0)
{
- if (assocfiles > 0 && (Cache.getDefault(
- "AUTOASSOCIATE_PDBANDSEQS_IGNOREOTHERS", false)
- || JvOptionPane.showConfirmDialog(thisaf,
+ if (assocfiles > 0 && (Cache
+ .getDefault("AUTOASSOCIATE_PDBANDSEQS_IGNOREOTHERS", false)
+ || JvOptionPane.showConfirmDialog(this,
"<html>" + MessageManager.formatMessage(
"label.ignore_unmatched_dropped_files_info",
new Object[]
ex.printStackTrace();
}
}
- }).start();
- }
- }
/**
* Attempt to load a "dropped" file or URL string, by testing in turn for
{
if (parseFeaturesFile(file, sourceType))
{
+ SplitFrame splitFrame = (SplitFrame) getSplitViewContainer();
+ if (splitFrame != null)
+ {
+ splitFrame.repaint();
+ }
+ else
+ {
alignPanel.paintAlignment(true, true);
}
}
+ }
else
{
new FileLoader().loadFile(viewport, file, sourceType, format);
}
/**
+ * Change the display state for the given feature groups -- Added by BH from
+ * JalviewLite
+ *
+ * @param groups
+ * list of group strings
+ * @param state
+ * visible or invisible
+ */
+
+ public void setFeatureGroupState(String[] groups, boolean state)
+ {
+ jalview.api.FeatureRenderer fr = null;
+ viewport.setShowSequenceFeatures(true);
+ if (alignPanel != null
+ && (fr = alignPanel.getFeatureRenderer()) != null)
+ {
+
+ fr.setGroupVisibility(Arrays.asList(groups), state);
+ alignPanel.getSeqPanel().seqCanvas.repaint();
+ if (alignPanel.overviewPanel != null)
+ {
+ alignPanel.overviewPanel.updateOverviewImage();
+ }
+ }
+ }
+
+ /**
* Method invoked by the ChangeListener on the tabbed pane, in other words
* when a different tabbed pane is selected by the user or programmatically.
*/
+
@Override
public void tabSelectionChanged(int index)
{
viewport = alignPanel.av;
avc.setViewportAndAlignmentPanel(viewport, alignPanel);
setMenusFromViewport(viewport);
+ if (featureSettings != null// && featureSettings.isOpen()
+ && featureSettings.fr.getViewport() != viewport)
+ {
+ if (viewport.isShowSequenceFeatures())
+ {
+ // refresh the featureSettings to reflect UI change
+ showFeatureSettingsUI();
+ }
+ else
+ {
+ // close feature settings for this view.
+ featureSettings.close();
+ }
+ }
+
}
/*
/**
* On right mouse click on view tab, prompt for and set new view name.
*/
+
@Override
public void tabbedPane_mousePressed(MouseEvent e)
{
}
/**
- * Change the display state for the given feature groups -- Added by BH from
- * JalviewLite
- *
- * @param groups
- * list of group strings
- * @param state
- * visible or invisible
- */
- public void setFeatureGroupState(String[] groups, boolean state)
- {
- jalview.api.FeatureRenderer fr = null;
- viewport.setShowSequenceFeatures(true);
- if (alignPanel != null
- && (fr = alignPanel.getFeatureRenderer()) != null)
- {
-
- fr.setGroupVisibility(Arrays.asList(groups), state);
- alignPanel.getSeqPanel().seqCanvas.repaint();
- if (alignPanel.overviewPanel != null)
- {
- alignPanel.overviewPanel.updateOverviewImage();
- }
- }
- }
-
- /**
* Open the dialog for regex description parsing.
*/
+
@Override
protected void extractScores_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showDbRefs_actionPerformed(java.awt.event.ActionEvent
* )
*/
+
@Override
protected void showDbRefs_actionPerformed(ActionEvent e)
{
* @seejalview.jbgui.GAlignFrame#showNpFeats_actionPerformed(java.awt.event.
* ActionEvent)
*/
+
@Override
protected void showNpFeats_actionPerformed(ActionEvent e)
{
Cache.getDefault(DBRefFetcher.TRIM_RETRIEVED_SEQUENCES, true));
trimrs.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
fetchr.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
new Thread(new Runnable()
{
+
@Override
public void run()
{
alignPanel.alignFrame.featureSettings, isNucleotide);
dbRefFetcher.addListener(new FetchFinishedListenerI()
{
+
@Override
public void finished()
{
+ //
+ // for (FeatureSettingsModelI srcSettings : dbRefFetcher
+ // .getFeatureSettingsModels())
+ // {
+ //
+ // alignPanel.av.mergeFeaturesStyle(srcSettings);
+ // }
AlignFrame.this.setMenusForViewport();
}
});
rfetch.add(fetchr);
new Thread(new Runnable()
{
+
@Override
public void run()
{
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
+
@Override
public void run()
{
- String[] dbclasses = jalview.ws.SequenceFetcher.getInstance()
- .getNonAlignmentSources();
+ jalview.ws.SequenceFetcher
+ sf = jalview.ws.SequenceFetcher.getInstance();
+ String[] dbclasses = sf.getNonAlignmentSources();
List<DbSourceProxy> otherdb;
JMenu dfetch = new JMenu();
JMenu ifetch = new JMenu();
int dbi = 0;
for (String dbclass : dbclasses)
{
- otherdb = jalview.ws.SequenceFetcher.getInstance()
- .getSourceProxy(dbclass);
+ otherdb = sf.getSourceProxy(dbclass);
// add a single entry for this class, or submenu allowing 'fetch
// all' or pick one
if (otherdb == null || otherdb.size() < 1)
if (otherdb.size() == 1)
{
DbSourceProxy src = otherdb.get(0);
- DbSourceProxy[] dassource = new DbSourceProxy[] {
- src };
+ DbSourceProxy[] dassource = new DbSourceProxy[] { src };
fetchr = new JMenuItem(src.getDbSource());
fetchr.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
new Thread(new Runnable()
{
+
@Override
public void run()
{
dbRefFetcher
.addListener(new FetchFinishedListenerI()
{
+
@Override
public void finished()
{
+ FeatureSettingsModelI srcSettings = dassource[0]
+ .getFeatureColourScheme();
+ // alignPanel.av.mergeFeaturesStyle(
+ // srcSettings);
AlignFrame.this.setMenusForViewport();
}
});
{ src.getDbSource() }));
fetchr.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
new Thread(new Runnable()
{
+
@Override
public void run()
{
dbRefFetcher
.addListener(new FetchFinishedListenerI()
{
+
@Override
public void finished()
{
fetchr.addActionListener(new ActionListener()
{
+
@Override
public void actionPerformed(ActionEvent e)
{
new Thread(new Runnable()
{
+
@Override
public void run()
{
dbRefFetcher
.addListener(new FetchFinishedListenerI()
{
+
@Override
public void finished()
{
/**
* Left justify the whole alignment.
*/
+
@Override
protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
{
/**
* Right justify the whole alignment.
*/
+
@Override
protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
{
viewport.firePropertyChange("alignment", null, al);
}
+
@Override
public void setShowSeqFeatures(boolean b)
{
* jalview.jbgui.GAlignFrame#showUnconservedMenuItem_actionPerformed(java.
* awt.event.ActionEvent)
*/
+
@Override
protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showGroupConsensus_actionPerformed(java.awt.event
* .ActionEvent)
*/
+
@Override
protected void showGroupConsensus_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showGroupConservation_actionPerformed(java.awt
* .event.ActionEvent)
*/
+
@Override
protected void showGroupConservation_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showConsensusHistogram_actionPerformed(java.awt
* .event.ActionEvent)
*/
+
@Override
protected void showConsensusHistogram_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt
* .event.ActionEvent)
*/
+
@Override
protected void showSequenceLogo_actionPerformed(ActionEvent e)
{
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
}
+
@Override
protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
{
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
}
+
@Override
protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
{
* jalview.jbgui.GAlignFrame#makeGrpsFromSelection_actionPerformed(java.awt
* .event.ActionEvent)
*/
+
@Override
protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
{
}
}
+
@Override
protected void createGroup_actionPerformed(ActionEvent e)
{
}
}
+
@Override
protected void unGroup_actionPerformed(ActionEvent e)
{
* @param forAlignment
* update non-sequence-related annotations
*/
+
@Override
protected void setAnnotationsVisibility(boolean visible,
boolean forSequences, boolean forAlignment)
/**
* Store selected annotation sort order for the view and repaint.
*/
+
@Override
protected void sortAnnotations_actionPerformed()
{
*
* @param show
*/
+
@Override
protected void showComplement_actionPerformed(boolean show)
{
* Generate the reverse (optionally complemented) of the selected sequences,
* and add them to the alignment
*/
+
@Override
protected void showReverse_actionPerformed(boolean complement)
{
* AlignFrame is set as currentAlignFrame in Desktop, to allow the script to
* be targeted at this alignment.
*/
+
@Override
protected void runGroovy_actionPerformed()
{
return false;
}
+
@Override
protected void selectHighlightedColumns_actionPerformed(
ActionEvent actionEvent)
}
}
+
@Override
protected void loadVcf_actionPerformed()
{
final AlignFrame us = this;
chooser.setResponseHandler(0, new Runnable()
{
+
@Override
public void run()
{
}
+ private Rectangle lastFeatureSettingsBounds = null;
+
+
+ public void setFeatureSettingsGeometry(Rectangle bounds)
+ {
+ lastFeatureSettingsBounds = bounds;
+ }
+
+
+ public Rectangle getFeatureSettingsGeometry()
+ {
+ return lastFeatureSettingsBounds;
+ }
+
+
+ public void scrollTo(int row, int column)
+ {
+ alignPanel.getSeqPanel().scrollTo(row, column);
+ }
+
+
+ public void scrollToRow(int row)
+ {
+ alignPanel.getSeqPanel().scrollToRow(row);
+ }
+
+
+ public void scrollToColumn(int column)
+ {
+ alignPanel.getSeqPanel().scrollToColumn(column);
+ }
+
/**
* BH 2019 from JalviewLite
*
{
jalview.api.FeatureRenderer fr = null;
if (alignPanel != null
- && (fr = alignPanel
- .getFeatureRenderer()) != null)
+ && (fr = alignPanel.getFeatureRenderer()) != null)
{
List<String> gps = fr.getGroups(visible);
String[] _gps = gps.toArray(new String[gps.size()]);
return null;
}
- public void scrollTo(int row, int column)
- {
- alignPanel.getSeqPanel().scrollTo(row, column);
- }
-
- public void scrollToRow(int row)
- {
- alignPanel.getSeqPanel().scrollToRow(row);
- }
-
- public void scrollToColumn(int column)
- {
- alignPanel.getSeqPanel().scrollToColumn(column);
- }
-
/**
*
* @return list of feature groups on the view