vv2.setGraphMouse(gm2);
// vv3.setGraphMouse(gm3);
// create zoom buttons for scaling the transformer that is
// shared between the two models.
final ScalingControl scaler = new CrossoverScalingControl();
vv0.scaleToLayout(scaler);
vv1.scaleToLayout(scaler);
vv2.scaleToLayout(scaler);
// vv3.scaleToLayout(scaler);
JButton plus = new JButton("+");
plus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv1, 1.1f, vv1.getCenter());
}
});
JButton minus = new JButton("-");
minus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv1, 1/1.1f, vv1.getCenter());
}
});
JPanel zoomPanel = new JPanel(new GridLayout(1,2));
zoomPanel.setBorder(BorderFactory.createTitledBorder("Zoom"));