.getSelectionInteractor();
BoundsManipulator manip = new BoundsManipulator();
defaultInteractor.setPrototypeDecorator(manip);
// Create a custom rectangle and make it draggable
AbstractFigure blue = new CustomRectangle(10.0, 10.0, 50.0, 50.0);
layer.add(blue);
blue.setInteractor(defaultInteractor);
blue.setToolTipText("Blue figure 1");
// Create a custom rectangle and make it draggable
AbstractFigure blue2 = new CustomRectangle(100.0, 100.0, 100.0, 50.0);
layer.add(blue2);
blue2.setInteractor(defaultInteractor);
blue2.setToolTipText("Blue figure 2");
// Create an image figure and make it draggable
Image img = Toolkit.getDefaultToolkit().getImage(IMAGE_FILE_NAME);
MediaTracker tracker = new MediaTracker(canvas);
tracker.addImage(img, 0);