}
menu.addSeparator();
JMenu sizeMenu = new JMenu(Main.getString("menu_img_size"));
float zoom = m_imgView.getZoom();
JStatusRadioButtonMenuItem radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_fit"), Main.getString("statusbar_menuimg_size_fit_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 0.0f);
radioMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.CTRL_DOWN_MASK));
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.resetZoom();
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_8"), Main.getString("statusbar_menuimg_size_8_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 8.0f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(8.0f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_4"), Main.getString("statusbar_menuimg_size_4_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 4.0f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(4.0f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_2"), Main.getString("statusbar_menuimg_size_2_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 2.0f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(2.0f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_1"), Main.getString("statusbar_menuimg_size_1_help"), m_statusBar);
radioMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MULTIPLY, InputEvent.CTRL_DOWN_MASK));
radioMenuItem.setSelected(zoom == 1.0f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(1.0f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_075"), Main.getString("statusbar_menuimg_size_075_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 0.75f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(0.75f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_050"), Main.getString("statusbar_menuimg_size_050_help"), m_statusBar);
radioMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, InputEvent.CTRL_DOWN_MASK));
radioMenuItem.setSelected(zoom == 0.5f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(0.5f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_025"), Main.getString("statusbar_menuimg_size_025_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 0.25f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(.25f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_0125"), Main.getString("statusbar_menuimg_size_0125_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 0.125f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(.125f);
}
});
sizeMenu.add(radioMenuItem);
radioMenuItem = new JStatusRadioButtonMenuItem(Main.getString("menu_img_size_00625"), Main.getString("statusbar_menuimg_size_00625_help"), m_statusBar);
radioMenuItem.setSelected(zoom == 0.0625f);
radioMenuItem.addActionListener(new ActionListener()
{
public void actionPerformed (ActionEvent ev)
{
m_imgView.setZoom(.0625f);
}