/** Called to start zooming. */
  public void startInteractiveZoom() {
    final ZoomRubberBox rubberBox = new ZoomRubberBox(drawerVisitor);
    dragZoomRotateInteraction.setEnable(false);

    rubberBox.addListener(
        new RubberBoxListener() {
          public void rubberBoxEnd() {
            dragZoomRotateInteraction.setEnable(true);
            drawerVisitor.removePostRendering(rubberBox);
          }
        });
    drawerVisitor.addPostRendering(rubberBox);
    rubberBox.setEnable(true);
  }
  public double[] startDragRubberBox() {
    final BlockingResult<double[]> result = new BlockingResult<double[]>();
    final DragPointRubberBox rubberBox = new DragPointRubberBox(drawerVisitor);

    dragZoomRotateInteraction.setEnable(false);
    rubberBox.addListener(
        new RubberBoxListener() {
          @Override
          public void rubberBoxEnd() {
            result.setResult(rubberBox.getResults());
            dragZoomRotateInteraction.setEnable(true);
            drawerVisitor.removePostRendering(rubberBox);
          }
        });
    drawerVisitor.addPostRendering(rubberBox);
    rubberBox.setEnable(true);
    return result.getResult();
  }
  public double[] startClickRubberBox(double initialRect[]) {
    final BlockingResult<double[]> result = new BlockingResult<double[]>();
    final PointRubberBox rubberBox;
    if (initialRect.length == 0) {
      rubberBox = new TwoPointsRubberBox(drawerVisitor);
    } else {
      rubberBox = new OnePointRubberBox(drawerVisitor, initialRect);
    }

    dragZoomRotateInteraction.setEnable(false);
    rubberBox.addListener(
        new RubberBoxListener() {
          @Override
          public void rubberBoxEnd() {
            result.setResult(rubberBox.getResults());
            dragZoomRotateInteraction.setEnable(true);
            drawerVisitor.removePostRendering(rubberBox);
          }
        });
    drawerVisitor.addPostRendering(rubberBox);
    rubberBox.setEnable(true);
    return result.getResult();
  }
 /**
  * Default constructor.
  *
  * @param drawerVisitor parent drawer visitor.
  */
 public InteractionManager(DrawerVisitor drawerVisitor) {
   this.drawerVisitor = drawerVisitor;
   dragZoomRotateInteraction = new DragZoomRotateInteraction(drawerVisitor);
   dragZoomRotateInteraction.setEnable(true);
 }
 public void setTranslationEnable(boolean b) {
   dragZoomRotateInteraction.setTranslationEnable(b);
 }
 public boolean isInteractiveZoom() {
   return !dragZoomRotateInteraction.isEnable();
 }
 @Override
 public void rubberBoxEnd() {
   dragZoomRotateInteraction.setEnable(true);
   rubberBox = null;
 }