final AnnotatingModalGraphMouse<String,Number> graphMouse =
new AnnotatingModalGraphMouse<String,Number>(rc, annotatingPlugin);
vv.setGraphMouse(graphMouse);
vv.addKeyListener(graphMouse.getModeKeyListener());
final ScalingControl scaler = new CrossoverScalingControl();
JButton plus = new JButton("+");
plus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv, 1.1f, vv.getCenter());
}
});
JButton minus = new JButton("-");
minus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv, 1/1.1f, vv.getCenter());
}
});
JComboBox modeBox = graphMouse.getModeComboBox();
modeBox.setSelectedItem(ModalGraphMouse.Mode.ANNOTATING);