// create a GraphMouse for each view
// each one has a different scaling plugin
DefaultModalGraphMouse gm1 = new DefaultModalGraphMouse() {
protected void loadPlugins() {
pickingPlugin = new PickingGraphMousePlugin();
animatedPickingPlugin = new AnimatedPickingGraphMousePlugin();
translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
scalingPlugin = new ScalingGraphMousePlugin(new LayoutScalingControl(), 0);
rotatingPlugin = new RotatingGraphMousePlugin();
shearingPlugin = new ShearingGraphMousePlugin();
add(scalingPlugin);
setMode(Mode.TRANSFORMING);
}
};
DefaultModalGraphMouse gm2 = new DefaultModalGraphMouse() {
protected void loadPlugins() {
pickingPlugin = new PickingGraphMousePlugin();
animatedPickingPlugin = new AnimatedPickingGraphMousePlugin();
translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
scalingPlugin = new ScalingGraphMousePlugin(new ViewScalingControl(), 0);
rotatingPlugin = new RotatingGraphMousePlugin();
shearingPlugin = new ShearingGraphMousePlugin();