X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=b5a0d30f35e42fd34f36bd3e7dc1bd5eef31d562;hb=d587f1aa61946dc14f6f089cf1dc2a3116cfb773;hp=14975b746dcaa6c05310bb8000ae2ada0acdfbda;hpb=5874ca652d08909c74d422552eb03a996112316d;p=jalview.git
diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java
index 14975b7..b5a0d30 100755
--- a/src/jalview/jbgui/GAlignFrame.java
+++ b/src/jalview/jbgui/GAlignFrame.java
@@ -1,6 +1,6 @@
/*
* Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -21,8 +21,13 @@ package jalview.jbgui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
+import javax.swing.event.*;
import jalview.schemes.*;
+import java.awt.BorderLayout;
+
+
+
public class GAlignFrame
extends JInternalFrame
@@ -53,10 +58,9 @@ public class GAlignFrame
protected JMenuItem PCAMenuItem = new JMenuItem();
protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
- protected JMenuItem clustalAlignMenuItem = new JMenuItem();
BorderLayout borderLayout1 = new BorderLayout();
public JLabel statusBar = new JLabel();
- protected JMenuItem saveAlignmentMenu = new JMenuItem();
+ protected JMenuItem saveAs = new JMenuItem();
protected JMenu outputTextboxMenu = new JMenu();
protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
@@ -84,7 +88,6 @@ public class GAlignFrame
JMenuItem printMenuItem = new JMenuItem();
public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
JMenuItem findMenuItem = new JMenuItem();
- JMenu searchMenu = new JMenu();
public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
@@ -92,7 +95,7 @@ public class GAlignFrame
JMenuItem delete = new JMenuItem();
JMenuItem copy = new JMenuItem();
JMenuItem cut = new JMenuItem();
- JMenu jMenu1 = new JMenu();
+ JMenu pasteMenu = new JMenu();
JMenuItem pasteNew = new JMenuItem();
JMenuItem pasteThis = new JMenuItem();
public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
@@ -113,37 +116,50 @@ public class GAlignFrame
protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
protected ButtonGroup colours = new ButtonGroup();
JMenuItem vamsasStore = new JMenuItem();
- protected JCheckBoxMenuItem showTranslation = new JCheckBoxMenuItem();
- //protected JTabbedPane tabbedPane = new JTabbedPane();
+ protected JMenuItem showTranslation = new JMenuItem();
public JMenuItem featureSettings = new JMenuItem();
JMenuItem fetchSequence = new JMenuItem();
- protected JCheckBoxMenuItem smoothFont = new JCheckBoxMenuItem();
JMenuItem annotationColour = new JMenuItem();
- JMenuItem fetchSeqFeatures = new JMenuItem();
-
-
-
JMenuItem associatedData = new JMenuItem();
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
JMenu addSequenceMenu = new JMenu();
JMenuItem addFromFile = new JMenuItem();
JMenuItem addFromText = new JMenuItem();
JMenuItem addFromURL = new JMenuItem();
+ JMenuItem exportAnnotations = new JMenuItem();
+ JMenuItem exportFeatures = new JMenuItem();
+ protected JPanel statusPanel = new JPanel();
+ GridLayout gridLayout1 = new GridLayout();
+ JMenu jMenu3 = new JMenu();
+ JMenuItem showAllSeqs = new JMenuItem();
+ JMenuItem showAllColumns = new JMenuItem();
+ JMenu hideMenu = new JMenu();
+ JMenuItem hideSelSequences = new JMenuItem();
+ JMenuItem hideSelColumns = new JMenuItem();
+ protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
+ JMenuItem invertColSel = new JMenuItem();
+ protected JTabbedPane tabbedPane = new JTabbedPane();
+ JMenuItem save = new JMenuItem();
+ protected JMenuItem reload = new JMenuItem();
+ JMenuItem newView = new JMenuItem();
+ JMenuItem textColour = new JMenuItem();
+ JMenu formatMenu = new JMenu();
+ JMenu selectMenu = new JMenu();
+ protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
+ protected JMenuItem gatherViews = new JMenuItem();
+ protected JMenuItem expandViews = new JMenuItem();
public GAlignFrame()
{
-
-
try
{
jbInit();
setJMenuBar(alignFrameMenuBar);
// dynamically fill save as menu with available formats
- for (int i = 0; i < jalview.io.FormatAdapter.formats.size(); i++)
+ for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
{
- JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.
- elementAt(
- i));
+ JMenuItem item = new JMenuItem( jalview.io.FormatAdapter.WRITEABLE_FORMATS[i] );
+
item.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -159,6 +175,18 @@ public class GAlignFrame
{
}
+ if (!System.getProperty("os.name").startsWith("Mac"))
+ {
+ closeMenuItem.setMnemonic('C');
+ outputTextboxMenu.setMnemonic('T');
+ undoMenuItem.setMnemonic('Z');
+ redoMenuItem.setMnemonic('0');
+ copy.setMnemonic('C');
+ cut.setMnemonic('U');
+ pasteMenu.setMnemonic('P');
+ reload.setMnemonic('R');
+ }
+
if(jalview.gui.UserDefinedColours.getUserColourSchemes()!=null)
{
@@ -306,26 +334,26 @@ public class GAlignFrame
private void jbInit()
throws Exception
{
- fileMenu.setMnemonic('F');
fileMenu.setText("File");
- saveAlignmentMenu.setMnemonic('L');
- saveAlignmentMenu.setText("Save As");
- saveAlignmentMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.
- awt.event.KeyEvent.VK_S, java.awt.event.KeyEvent.CTRL_MASK, false));
- saveAlignmentMenu.addActionListener(new ActionListener()
+ saveAs.setText("Save As...");
+ saveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.
+ KeyEvent.VK_S,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()| java.awt.event.KeyEvent.SHIFT_MASK, false));
+ saveAs.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
- saveAlignmentMenu_actionPerformed(e);
+ saveAs_actionPerformed(e);
}
});
- closeMenuItem.setMnemonic('C');
closeMenuItem.setText("Close");
+ closeMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_W, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
closeMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
- closeMenuItem_actionPerformed(e);
+ closeMenuItem_actionPerformed(false);
}
});
editMenu.setText("Edit");
@@ -333,7 +361,7 @@ public class GAlignFrame
colourMenu.setText("Colour");
calculateMenu.setText("Calculate");
webService.setText("Web Service");
- selectAllSequenceMenuItem.setText("Select all");
+ selectAllSequenceMenuItem.setText("Select All");
selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_A,
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
@@ -357,7 +385,10 @@ public class GAlignFrame
deselectAllSequenceMenuItem_actionPerformed(e);
}
});
- invertSequenceMenuItem.setText("Invert Selection");
+ invertSequenceMenuItem.setText("Invert Sequence Selection");
+ invertSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_I,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -366,6 +397,8 @@ public class GAlignFrame
}
});
remove2LeftMenuItem.setText("Remove Left");
+ remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.
+ awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -374,6 +407,8 @@ public class GAlignFrame
}
});
remove2RightMenuItem.setText("Remove Right");
+ remove2RightMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.
+ awt.event.KeyEvent.VK_R, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -382,6 +417,9 @@ public class GAlignFrame
}
});
removeGappedColumnMenuItem.setText("Remove Empty Columns");
+ removeGappedColumnMenuItem.setAccelerator(javax.swing.KeyStroke.
+ getKeyStroke(java.awt.event.
+ KeyEvent.VK_E, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
removeGappedColumnMenuItem.addActionListener(new java.awt.event.
ActionListener()
{
@@ -391,6 +429,9 @@ public class GAlignFrame
}
});
removeAllGapsMenuItem.setText("Remove All Gaps");
+ removeAllGapsMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_E,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | java.awt.event.KeyEvent.SHIFT_MASK, false));
removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -441,6 +482,8 @@ public class GAlignFrame
}
});
removeRedundancyMenuItem.setText("Remove Redundancy...");
+ removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_D, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
removeRedundancyMenuItem.addActionListener(new java.awt.event.
ActionListener()
{
@@ -490,7 +533,6 @@ public class GAlignFrame
statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
statusBar.setText("Status bar");
- outputTextboxMenu.setMnemonic('T');
outputTextboxMenu.setText("Output to Textbox");
clustalColour.setText("Clustalx");
@@ -634,7 +676,6 @@ public class GAlignFrame
}
});
undoMenuItem.setEnabled(false);
- undoMenuItem.setMnemonic('Z');
undoMenuItem.setText("Undo");
undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_Z,
@@ -647,8 +688,9 @@ public class GAlignFrame
}
});
redoMenuItem.setEnabled(false);
- redoMenuItem.setMnemonic('0');
redoMenuItem.setText("Redo");
+ redoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_Y, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
redoMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -681,6 +723,8 @@ public class GAlignFrame
}
});
printMenuItem.setText("Print");
+ printMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_P, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
printMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -708,8 +752,6 @@ public class GAlignFrame
findMenuItem_actionPerformed(e);
}
});
- searchMenu.setText("Search");
-
abovePIDThreshold.setText("Above Identity Threshold");
abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
{
@@ -735,6 +777,8 @@ public class GAlignFrame
}
});
deleteGroups.setText("Undefine groups");
+ deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_U, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
deleteGroups.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -746,7 +790,6 @@ public class GAlignFrame
copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_C,
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
- copy.setMnemonic(KeyEvent.VK_C);
copy.addActionListener(new java.awt.event.ActionListener()
{
@@ -759,7 +802,6 @@ public class GAlignFrame
cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_X,
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
- cut.setMnemonic(KeyEvent.VK_X);
cut.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -768,6 +810,8 @@ public class GAlignFrame
}
});
delete.setText("Delete");
+ delete.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.
+ KeyEvent.VK_BACK_SPACE, 0, false));
delete.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -775,12 +819,11 @@ public class GAlignFrame
delete_actionPerformed(e);
}
});
- jMenu1.setMnemonic('V');
- jMenu1.setText("Paste");
+ pasteMenu.setText("Paste");
pasteNew.setText("To New Alignment");
pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_V,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()|java.awt.event.KeyEvent.SHIFT_MASK, false));
pasteNew.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -789,6 +832,9 @@ public class GAlignFrame
}
});
pasteThis.setText("Add To This Alignment");
+ pasteThis.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
+ java.awt.event.KeyEvent.VK_V,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
pasteThis.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -797,7 +843,6 @@ public class GAlignFrame
}
});
applyToAllGroups.setText("Apply Colour To All Groups");
- applyToAllGroups.setState(true);
applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -896,9 +941,24 @@ public class GAlignFrame
});
sortByTreeMenu.setText("By Tree Order");
sort.setText("Sort");
+ sort.addMenuListener(new MenuListener()
+ {
+ public void menuSelected(MenuEvent e)
+ {
+ buildTreeMenu();
+ }
+
+ public void menuDeselected(MenuEvent e)
+ {
+ }
+
+ public void menuCanceled(MenuEvent e)
+ {
+ }
+ });
calculate.setText("Calculate Tree");
- jMenu2.setText("Export");
+ jMenu2.setText("Export Image");
padGapsMenuitem.setText("Pad Gaps");
padGapsMenuitem.setState( jalview.bin.Cache.getDefault("PAD_GAPS", false));
padGapsMenuitem.addActionListener(new ActionListener()
@@ -926,14 +986,7 @@ public class GAlignFrame
}
});
- /* tabbedPane.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent ece)
- {
- tabSelected();
- }
- });*/
featureSettings.setText("Feature Settings...");
featureSettings.addActionListener(new ActionListener()
{
@@ -950,15 +1003,7 @@ public class GAlignFrame
fetchSequence_actionPerformed(e);
}
});
- smoothFont.setText("Smooth Fonts");
- smoothFont.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- smoothFont_actionPerformed(e);
- }
- });
- smoothFont.setState( jalview.bin.Cache.getDefault("ANTI_ALIAS",false));
+
annotationColour.setText("By Annotation...");
annotationColour.addActionListener(new ActionListener()
{
@@ -967,14 +1012,6 @@ public class GAlignFrame
annotationColour_actionPerformed(e);
}
});
- fetchSeqFeatures.setText("Fetch Sequence Features");
- fetchSeqFeatures.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- fetchSeqFeatures_actionPerformed(e);
- }
- });
associatedData.setText("Load Features / Annotations");
associatedData.addActionListener(new ActionListener()
{
@@ -1017,22 +1054,194 @@ public class GAlignFrame
addFromURL_actionPerformed(e);
}
});
+ exportFeatures.setText("Export Features...");
+ exportFeatures.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ exportFeatures_actionPerformed(e);
+ }
+ });
+ exportAnnotations.setText("Export Annotations...");
+ exportAnnotations.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ exportAnnotations_actionPerformed(e);
+ }
+ });
+ statusPanel.setLayout(gridLayout1);
+ jMenu3.setText("Show");
+ showAllSeqs.setText("All Sequences");
+ showAllSeqs.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ showAllSeqs_actionPerformed(e);
+ }
+ });
+ showAllColumns.setText("All Columns");
+ showAllColumns.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ showAllColumns_actionPerformed(e);
+ }
+ });
+ hideMenu.setText("Hide");
+ hideSelSequences.setText("Selected Sequences");
+ hideSelSequences.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ hideSelSequences_actionPerformed(e);
+ }
+ });
+ hideSelColumns.setText("Selected Columns");
+ hideSelColumns.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ hideSelColumns_actionPerformed(e);
+ }
+ });
+ hiddenMarkers.setText("Show Hidden Markers");
+ hiddenMarkers.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ hiddenMarkers_actionPerformed(e);
+ }
+ });
+ invertColSel.setText("Invert Column Selection");
+ invertColSel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_I,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
+ |java.awt.event.KeyEvent.ALT_MASK,
+ false));
+ invertColSel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ invertColSel_actionPerformed(e);
+ }
+ });
+ tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
+ {
+ public void stateChanged(ChangeEvent evt)
+ {
+ JTabbedPane pane = (JTabbedPane)evt.getSource();
+ int sel = pane.getSelectedIndex();
+ tabSelectionChanged(sel);
+ }
+ });
+ tabbedPane.addMouseListener(new MouseAdapter()
+ {
+ public void mousePressed(MouseEvent e)
+ {
+ tabbedPane_mousePressed(e);
+ }
+ });
+ tabbedPane.addFocusListener(new FocusAdapter()
+ {
+ public void focusGained(FocusEvent e)
+ {
+ tabbedPane_focusGained(e);
+ }
+ });
+ save.setText("Save");
+ save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.
+ KeyEvent.VK_S, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ save.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ save_actionPerformed(e);
+ }
+ });
+ reload.setEnabled(false);
+ reload.setText("Reload");
+ reload.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ reload_actionPerformed(e);
+ }
+ });
+ newView.setText("New View");
+ newView.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.
+ KeyEvent.VK_T, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ newView.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ newView_actionPerformed(e);
+ }
+ });
+ tabbedPane.setToolTipText(" Right-click to rename tab"
+ +"
Press X to eXpand tabs, G to reGroup.");
+ textColour.setText("Text Colour");
+ textColour.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ textColour_actionPerformed(e);
+ }
+ });
+ formatMenu.setText("Format");
+ selectMenu.setText("Select");
+ idRightAlign.setText("Right Align Sequence Id");
+ idRightAlign.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ idRightAlign_actionPerformed(e);
+ }
+ });
+ gatherViews.setEnabled(false);
+ gatherViews.setText("Gather Views");
+ gatherViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_G, 0, false));
+ gatherViews.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ gatherViews_actionPerformed(e);
+ }
+ });
+ expandViews.setEnabled(false);
+ expandViews.setText("Expand Views");
+ expandViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.
+ event.KeyEvent.VK_X, 0, false));
+ expandViews.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ expandViews_actionPerformed(e);
+ }
+ });
+
alignFrameMenuBar.add(fileMenu);
alignFrameMenuBar.add(editMenu);
- alignFrameMenuBar.add(searchMenu);
+ alignFrameMenuBar.add(selectMenu);
alignFrameMenuBar.add(viewMenu);
+ alignFrameMenuBar.add(formatMenu);
alignFrameMenuBar.add(colourMenu);
alignFrameMenuBar.add(calculateMenu);
alignFrameMenuBar.add(webService);
- fileMenu.add(addSequenceMenu);
fileMenu.add(fetchSequence);
+ fileMenu.add(addSequenceMenu);
+ fileMenu.add(reload);
fileMenu.addSeparator();
fileMenu.add(vamsasStore);
- fileMenu.add(saveAlignmentMenu);
- fileMenu.add(jMenu2);
+ fileMenu.add(save);
+ fileMenu.add(saveAs);
fileMenu.add(outputTextboxMenu);
fileMenu.add(printMenuItem);
fileMenu.addSeparator();
+ fileMenu.add(jMenu2);
+ fileMenu.add(exportFeatures);
+ fileMenu.add(exportAnnotations);
fileMenu.add(LoadtreeMenuItem);
fileMenu.add(associatedData);
fileMenu.addSeparator();
@@ -1041,14 +1250,9 @@ public class GAlignFrame
editMenu.add(redoMenuItem);
editMenu.add(cut);
editMenu.add(copy);
- editMenu.add(jMenu1);
+ editMenu.add(pasteMenu);
editMenu.add(delete);
editMenu.addSeparator();
- editMenu.add(selectAllSequenceMenuItem);
- editMenu.add(deselectAllSequenceMenuItem);
- editMenu.add(invertSequenceMenuItem);
- editMenu.add(deleteGroups);
- editMenu.addSeparator();
editMenu.add(remove2LeftMenuItem);
editMenu.add(remove2RightMenuItem);
editMenu.add(removeGappedColumnMenuItem);
@@ -1056,27 +1260,21 @@ public class GAlignFrame
editMenu.add(removeRedundancyMenuItem);
editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
- searchMenu.add(findMenuItem);
- viewMenu.add(font);
- viewMenu.add(smoothFont);
+ viewMenu.add(newView);
+ viewMenu.add(expandViews);
+ viewMenu.add(gatherViews);
+ viewMenu.addSeparator();
+ viewMenu.add(jMenu3);
+ viewMenu.add(hideMenu);
viewMenu.addSeparator();
- viewMenu.add(wrapMenuItem);
- viewMenu.add(seqLimits);
- viewMenu.add(scaleAbove);
- viewMenu.add(scaleLeft);
- viewMenu.add(scaleRight);
- viewMenu.add(viewBoxesMenuItem);
- viewMenu.add(viewTextMenuItem);
- viewMenu.add(colourTextMenuItem);
- viewMenu.add(renderGapsMenuItem);
viewMenu.add(annotationPanelMenuItem);
viewMenu.addSeparator();
- viewMenu.add(fetchSeqFeatures);
viewMenu.add(showSeqFeatures);
viewMenu.add(featureSettings);
viewMenu.addSeparator();
viewMenu.add(overviewMenuItem);
colourMenu.add(applyToAllGroups);
+ colourMenu.add(textColour);
colourMenu.addSeparator();
colourMenu.add(noColourmenuItem);
colourMenu.add(clustalColour);
@@ -1106,14 +1304,12 @@ public class GAlignFrame
calculateMenu.add(showTranslation);
calculateMenu.add(autoCalculate);
webServiceNoServices=new JMenuItem("");
- webService.add(webServiceNoServices);
- this.getContentPane().add(statusBar, BorderLayout.SOUTH);
- // this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
- jMenu1.add(pasteNew);
- jMenu1.add(pasteThis);
+ webService.add(webServiceNoServices);pasteMenu.add(pasteNew);
+ pasteMenu.add(pasteThis);
sort.add(sortIDMenuItem);
sort.add(sortGroupMenuItem);
sort.add(sortPairwiseMenuItem);
+ sort.add(sortByTreeMenu);
calculate.add(averageDistanceTreeMenuItem);
calculate.add(neighbourTreeMenuItem);
calculate.add(avDistanceTreeBlosumMenuItem);
@@ -1124,17 +1320,69 @@ public class GAlignFrame
addSequenceMenu.add(addFromFile);
addSequenceMenu.add(addFromText);
addSequenceMenu.add(addFromURL);
+ this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
+ statusPanel.add(statusBar, null);
+ this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
+ jMenu3.add(showAllColumns);
+ jMenu3.add(showAllSeqs);
+ hideMenu.add(hideSelColumns);
+ hideMenu.add(hideSelSequences);
+ formatMenu.add(font);
+ formatMenu.addSeparator();
+ formatMenu.add(wrapMenuItem);
+ formatMenu.add(scaleAbove);
+ formatMenu.add(scaleLeft);
+ formatMenu.add(scaleRight);
+ formatMenu.add(seqLimits);
+ formatMenu.add(idRightAlign);
+ formatMenu.add(hiddenMarkers);
+ formatMenu.add(viewBoxesMenuItem);
+ formatMenu.add(viewTextMenuItem);
+ formatMenu.add(colourTextMenuItem);
+ formatMenu.add(renderGapsMenuItem);
+ selectMenu.add(findMenuItem);
+ selectMenu.addSeparator();
+ selectMenu.add(selectAllSequenceMenuItem);
+ selectMenu.add(deselectAllSequenceMenuItem);
+ selectMenu.add(invertSequenceMenuItem);
+ selectMenu.add(invertColSel);
+ selectMenu.add(deleteGroups);
}
protected void outputText_actionPerformed(ActionEvent e)
{
}
+ public void addFromFile_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void addFromText_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void addFromURL_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void exportFeatures_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void exportAnnotations_actionPerformed(ActionEvent e)
+ {
+
+ }
+
protected void htmlMenuItem_actionPerformed(ActionEvent e)
{
}
- protected void closeMenuItem_actionPerformed(ActionEvent e)
+ protected void closeMenuItem_actionPerformed(boolean b)
{
}
@@ -1394,7 +1642,7 @@ public class GAlignFrame
- protected void saveAlignmentMenu_actionPerformed(ActionEvent e)
+ protected void saveAs_actionPerformed(ActionEvent e)
{
}
@@ -1438,32 +1686,113 @@ public class GAlignFrame
}
- public void fetchSeqFeatures_actionPerformed(ActionEvent e)
+
+ public void associatedData_actionPerformed(ActionEvent e)
{
}
- public void associatedData_actionPerformed(ActionEvent e)
+ public void autoCalculate_actionPerformed(ActionEvent e)
{
}
- public void autoCalculate_actionPerformed(ActionEvent e)
+ public void showAllSeqs_actionPerformed(ActionEvent e)
{
}
- public void addFromFile_actionPerformed(ActionEvent e)
+ public void showAllColumns_actionPerformed(ActionEvent e)
{
}
- public void addFromText_actionPerformed(ActionEvent e)
+ public void hideSelSequences_actionPerformed(ActionEvent e)
{
}
- public void addFromURL_actionPerformed(ActionEvent e)
+ public void hideSelColumns_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void hiddenMarkers_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void findPdbId_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void enterPdbId_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void pdbFile_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void invertColSel_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void tabSelectionChanged(int sel)
+ {
+
+ }
+
+ public void tabbedPane_mousePressed(MouseEvent e)
+ {
+
+ }
+
+ public void tabbedPane_focusGained(FocusEvent e)
+ {
+ requestFocus();
+ }
+
+ public void save_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void reload_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void newView_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void textColour_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void idRightAlign_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void expandViews_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void gatherViews_actionPerformed(ActionEvent e)
+ {
+
+ }
+
+ public void buildTreeMenu()
{
}