import jalview.io.IdentifyFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
+import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.ws.params.ParamManager;
dialogPause = false;
block.release();
}
+ @Override
+ protected void snapShotWindow_actionPerformed(ActionEvent e)
+ {
+ invalidate();
+ File of;
+ ImageMaker im = new jalview.util.ImageMaker(this, ImageMaker.EPS, "View of Desktop", getWidth(), getHeight(), of=new File("Jalview_snapshot"+System.currentTimeMillis()+".eps"), "View of desktop");
+ try {
+ paintAll(im.getGraphics());
+ im.writeImage();
+ } catch (Exception q)
+ {
+ Cache.log.error("Couldn't write snapshot to "+of.getAbsolutePath(),q);
+ return;
+ }
+ Cache.log.info("Successfully written snapshot to file "+of.getAbsolutePath());
+ }
}
JMenuItem saveState = new JMenuItem();
JMenuItem loadState = new JMenuItem();
-
+
JMenu inputMenu = new JMenu();
protected JMenuItem vamsasStart = new JMenuItem();
protected JCheckBoxMenuItem showConsole = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showNews = new JCheckBoxMenuItem();
-
+
+ protected JMenuItem snapShotWindow = new JMenuItem();
/**
* Creates a new GDesktop object.
*/
showNews_actionPerformed(e);
}
});
+ snapShotWindow.setText(MessageManager.getString("label.take_snapshot"));
+ snapShotWindow.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ snapShotWindow_actionPerformed(e);
+ }
+ });
+
desktopMenubar.add(FileMenu);
desktopMenubar.add(toolsMenu);
VamsasMenu.setVisible(false);
toolsMenu.add(showConsole);
toolsMenu.add(showNews);
toolsMenu.add(garbageCollect);
+ toolsMenu.add(snapShotWindow);
inputMenu.add(inputLocalFileMenuItem);
inputMenu.add(inputURLMenuItem);
inputMenu.add(inputTextboxMenuItem);
// inputMenu.add(vamsasLoad);
}
+ protected void snapShotWindow_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void showConsole_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub