Skip to content
Snippets Groups Projects
Commit 28777b05 authored by tjc's avatar tjc
Browse files

zoom buttons

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@11728 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 0519b98c
No related branches found
No related tags found
No related merge requests found
...@@ -784,6 +784,34 @@ public class JamView extends JPanel ...@@ -784,6 +784,34 @@ public class JamView extends JPanel
topPanel.add(goTo, gc); topPanel.add(goTo, gc);
topPanel.add(baseText, gc); topPanel.add(baseText, gc);
JButton zoomIn = new JButton("+");
zoomIn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
int startBase = getBaseAtStartOfView();
setZoomLevel( (int) (JamView.this.nbasesInView*1.1) );
goToBasePosition(startBase);
repaint();
}
});
topPanel.add(zoomIn, gc);
JButton zoomOut = new JButton("-");
zoomOut.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
int startBase = getBaseAtStartOfView();
setZoomLevel( (int) (JamView.this.nbasesInView*.9) );
goToBasePosition(startBase);
repaint();
}
});
topPanel.add(zoomOut, gc);
panel.setPreferredSize(new Dimension(1000,500)); panel.setPreferredSize(new Dimension(1000,500));
setLength(nbasesInView); setLength(nbasesInView);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment