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
FileFormatI further tweaks, clean compile
[jalview.git]
/
src
/
jalview
/
jbgui
/
GAlignFrame.java
diff --git
a/src/jalview/jbgui/GAlignFrame.java
b/src/jalview/jbgui/GAlignFrame.java
index
205b9c6
..
73d1b3c
100755
(executable)
--- a/
src/jalview/jbgui/GAlignFrame.java
+++ b/
src/jalview/jbgui/GAlignFrame.java
@@
-25,6
+25,7
@@
import jalview.api.SplitContainerI;
import jalview.bin.Cache;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
import jalview.bin.Cache;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
+import jalview.io.FileFormat;
import jalview.schemes.ColourSchemeProperty;
import jalview.util.MessageManager;
import jalview.schemes.ColourSchemeProperty;
import jalview.util.MessageManager;
@@
-55,7
+56,6
@@
import javax.swing.JPanel;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JTabbedPane;
import javax.swing.KeyStroke;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JTabbedPane;
import javax.swing.KeyStroke;
-import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import javax.swing.event.ChangeEvent;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
@@
-137,8
+137,6
@@
public class GAlignFrame extends JInternalFrame
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
-
JMenuItem copy = new JMenuItem();
JMenuItem cut = new JMenuItem();
JMenuItem copy = new JMenuItem();
JMenuItem cut = new JMenuItem();
@@
-179,6
+177,8
@@
public class GAlignFrame extends JInternalFrame
protected JMenu showProducts = new JMenu();
protected JMenu showProducts = new JMenu();
+ protected JMenuItem runGroovy = new JMenuItem();
+
protected JMenuItem rnahelicesColour = new JMenuItem();
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
protected JMenuItem rnahelicesColour = new JMenuItem();
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
@@
-245,10
+245,9
@@
public class GAlignFrame extends JInternalFrame
setJMenuBar(alignFrameMenuBar);
// dynamically fill save as menu with available formats
setJMenuBar(alignFrameMenuBar);
// dynamically fill save as menu with available formats
- for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
+ for (String ff : FileFormat.getWritableFormats())
{
{
- JMenuItem item = new JMenuItem(
- jalview.io.FormatAdapter.WRITEABLE_FORMATS[i]);
+ JMenuItem item = new JMenuItem(ff);
item.addActionListener(new ActionListener()
{
item.addActionListener(new ActionListener()
{
@@
-293,8
+292,7
@@
public class GAlignFrame extends JInternalFrame
@Override
public void mousePressed(MouseEvent evt)
{
@Override
public void mousePressed(MouseEvent evt)
{
- if (evt.isControlDown()
- || SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
radioItem.removeActionListener(radioItem.getActionListeners()[0]);
{
radioItem.removeActionListener(radioItem.getActionListeners()[0]);
@@
-1591,7
+1589,7
@@
public class GAlignFrame extends JInternalFrame
});
JMenuItem modifyPID = new JMenuItem(
});
JMenuItem modifyPID = new JMenuItem(
- MessageManager.getString("label.modify_identity_thereshold"));
+ MessageManager.getString("label.modify_identity_threshold"));
modifyPID.addActionListener(new ActionListener()
{
@Override
modifyPID.addActionListener(new ActionListener()
{
@Override
@@
-1601,7
+1599,7
@@
public class GAlignFrame extends JInternalFrame
}
});
modifyConservation.setText(MessageManager
}
});
modifyConservation.setText(MessageManager
- .getString("label.modify_conservation_thereshold"));
+ .getString("label.modify_conservation_threshold"));
modifyConservation.addActionListener(new ActionListener()
{
@Override
modifyConservation.addActionListener(new ActionListener()
{
@Override
@@
-1726,6
+1724,17
@@
public class GAlignFrame extends JInternalFrame
// for show products actions see AlignFrame.canShowProducts
showProducts.setText(MessageManager.getString("label.get_cross_refs"));
// for show products actions see AlignFrame.canShowProducts
showProducts.setText(MessageManager.getString("label.get_cross_refs"));
+ runGroovy.setText(MessageManager.getString("label.run_groovy"));
+ runGroovy.setToolTipText(MessageManager.getString("label.run_groovy_tip"));
+ runGroovy.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ runGroovy_actionPerformed();
+ }
+ });
+
JMenuItem openFeatureSettings = new JMenuItem(
MessageManager.getString("action.feature_settings"));
openFeatureSettings.addActionListener(new ActionListener()
JMenuItem openFeatureSettings = new JMenuItem(
MessageManager.getString("action.feature_settings"));
openFeatureSettings.addActionListener(new ActionListener()
@@
-2160,6
+2169,7
@@
public class GAlignFrame extends JInternalFrame
alignFrameMenuBar.add(colourMenu);
alignFrameMenuBar.add(calculateMenu);
alignFrameMenuBar.add(webService);
alignFrameMenuBar.add(colourMenu);
alignFrameMenuBar.add(calculateMenu);
alignFrameMenuBar.add(webService);
+
fileMenu.add(fetchSequence);
fileMenu.add(addSequenceMenu);
fileMenu.add(reload);
fileMenu.add(fetchSequence);
fileMenu.add(addSequenceMenu);
fileMenu.add(reload);
@@
-2178,6
+2188,9
@@
public class GAlignFrame extends JInternalFrame
fileMenu.add(associatedData);
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
fileMenu.add(associatedData);
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
+
+ pasteMenu.add(pasteNew);
+ pasteMenu.add(pasteThis);
editMenu.add(undoMenuItem);
editMenu.add(redoMenuItem);
editMenu.add(cut);
editMenu.add(undoMenuItem);
editMenu.add(redoMenuItem);
editMenu.add(cut);
@@
-2198,6
+2211,13
@@
public class GAlignFrame extends JInternalFrame
// editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
// editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
+ showMenu.add(showAllColumns);
+ showMenu.add(showAllSeqs);
+ showMenu.add(showAllhidden);
+ hideMenu.add(hideSelColumns);
+ hideMenu.add(hideSelSequences);
+ hideMenu.add(hideAllSelection);
+ hideMenu.add(hideAllButSelection);
viewMenu.add(newView);
viewMenu.add(expandViews);
viewMenu.add(gatherViews);
viewMenu.add(newView);
viewMenu.add(expandViews);
viewMenu.add(gatherViews);
@@
-2268,6
+2288,12
@@
public class GAlignFrame extends JInternalFrame
colourMenu.add(modifyPID);
colourMenu.add(annotationColour);
colourMenu.add(rnahelicesColour);
colourMenu.add(modifyPID);
colourMenu.add(annotationColour);
colourMenu.add(rnahelicesColour);
+
+ sort.add(sortIDMenuItem);
+ sort.add(sortLengthMenuItem);
+ sort.add(sortGroupMenuItem);
+ sort.add(sortPairwiseMenuItem);
+ sort.add(sortByTreeMenu);
calculateMenu.add(sort);
calculateMenu.add(calculateTree);
calculateMenu.addSeparator();
calculateMenu.add(sort);
calculateMenu.add(calculateTree);
calculateMenu.addSeparator();
@@
-2281,17
+2307,14
@@
public class GAlignFrame extends JInternalFrame
calculateMenu.add(autoCalculate);
calculateMenu.add(sortByTree);
calculateMenu.addSeparator();
calculateMenu.add(autoCalculate);
calculateMenu.add(sortByTree);
calculateMenu.addSeparator();
+ calculateMenu.add(expandAlignment);
calculateMenu.add(extractScores);
calculateMenu.add(extractScores);
+ calculateMenu.addSeparator();
+ calculateMenu.add(runGroovy);
+
webServiceNoServices = new JMenuItem(
MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
webServiceNoServices = new JMenuItem(
MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
- pasteMenu.add(pasteNew);
- pasteMenu.add(pasteThis);
- sort.add(sortIDMenuItem);
- sort.add(sortLengthMenuItem);
- sort.add(sortGroupMenuItem);
- sort.add(sortPairwiseMenuItem);
- sort.add(sortByTreeMenu);
exportImageMenu.add(htmlMenuItem);
exportImageMenu.add(epsFile);
exportImageMenu.add(createPNG);
exportImageMenu.add(htmlMenuItem);
exportImageMenu.add(epsFile);
exportImageMenu.add(createPNG);
@@
-2303,13
+2326,6
@@
public class GAlignFrame extends JInternalFrame
this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
statusPanel.add(statusBar, null);
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
statusPanel.add(statusBar, null);
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
- showMenu.add(showAllColumns);
- showMenu.add(showAllSeqs);
- showMenu.add(showAllhidden);
- hideMenu.add(hideSelColumns);
- hideMenu.add(hideSelSequences);
- hideMenu.add(hideAllSelection);
- hideMenu.add(hideAllButSelection);
formatMenu.add(font);
formatMenu.addSeparator();
formatMenu.add(font);
formatMenu.addSeparator();
@@
-2337,7
+2353,6
@@
public class GAlignFrame extends JInternalFrame
selectMenu.add(grpsFromSelection);
selectMenu.add(deleteGroups);
selectMenu.add(annotationColumn);
selectMenu.add(grpsFromSelection);
selectMenu.add(deleteGroups);
selectMenu.add(annotationColumn);
- calculateMenu.add(expandAlignment);
// TODO - determine if the listenToViewSelections button is needed : see bug
// JAL-574
// selectMenu.addSeparator();
// TODO - determine if the listenToViewSelections button is needed : see bug
// JAL-574
// selectMenu.addSeparator();
@@
-2355,6
+2370,14
@@
public class GAlignFrame extends JInternalFrame
}
/**
}
/**
+ * Try to run script in a Groovy console, having first ensured that this
+ * alignframe is set as currentAlignFrame in Desktop
+ */
+ protected void runGroovy_actionPerformed()
+ {
+
+ }
+ /**
* Adds the given action listener and key accelerator to the given menu item.
* Also saves in a lookup table to support lookup of action by key stroke.
*
* Adds the given action listener and key accelerator to the given menu item.
* Also saves in a lookup table to support lookup of action by key stroke.
*
@@
-2495,13
+2518,6
@@
public class GAlignFrame extends JInternalFrame
}
}
- protected void showSeqFeaturesHeight_actionPerformed(
- ActionEvent actionEvent)
- {
- // TODO Auto-generated method stub
-
- }
-
protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub