{
return String.valueOf(model + 1) + ".1";
}
+
+ /**
+ * Sends a command to recentre the display
+ */
+ @Override
+ public void focusView()
+ {
+ /*
+ * don't use evalStateCommand because it ignores a command that is the same
+ * as the last command (why?); but user may have adjusted the display since
+ */
+ viewer.evalString("zoom 0");
+ }
}
helpItem.setText(MessageManager.getString("label.chimera_help"));
savemenu.setVisible(false); // not yet implemented
- viewMenu.add(fitToWindow);
JMenuItem writeFeatures = new JMenuItem(
MessageManager.getString("label.create_chimera_attributes"));
}
@Override
- protected void fitToWindow_actionPerformed()
- {
- jmb.focusView();
- }
-
- @Override
public ViewerType getViewerType()
{
return ViewerType.CHIMERA;
}
});
viewMenu.add(hideHiddenRegions);
+ viewMenu.add(fitToWindow);
final ItemListener handler = new ItemListener()
{
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- fitToWindow_actionPerformed();
+ getBinding().focusView();
}
});
statusPanel.add(statusBar, null);
}
- protected void fitToWindow_actionPerformed()
- {
- }
-
protected void highlightSelection_actionPerformed()
{
}
{
return chainNames;
}
+
+ /**
+ * Send a command to resize and/or centre the structure display
+ */
+ public void focusView()
+ {
+ }
}