protected SwingController commonWindowCreation() {
    SwingController controller = new SwingController(messageBundle);
    controller.setWindowManagementCallback(this);

    // assign properties manager.
    controller.setPropertiesManager(properties);

    // add interactive mouse link annotation support
    controller
        .getDocumentViewController()
        .setAnnotationCallback(new MyAnnotationCallback(controller.getDocumentViewController()));

    controllers.add(controller);
    // guild a new swing viewer with remembered view settings.
    int viewType = DocumentViewControllerImpl.ONE_PAGE_VIEW;
    int pageFit = DocumentViewController.PAGE_FIT_WINDOW_WIDTH;
    try {
      viewType =
          getProperties().getInt("document.viewtype", DocumentViewControllerImpl.ONE_PAGE_VIEW);
      pageFit =
          getProperties()
              .getInt(
                  PropertiesManager.PROPERTY_DEFAULT_PAGEFIT,
                  DocumentViewController.PAGE_FIT_WINDOW_WIDTH);
    } catch (NumberFormatException e) {
      // eating error, as we can continue with out alarm
    }

    SwingViewBuilder factory = new SwingViewBuilder(controller, viewType, pageFit);

    JFrame frame = factory.buildViewerFrame();
    if (frame != null) {
      int width = getProperties().getInt("application.width", 800);
      int height = getProperties().getInt("application.height", 600);
      frame.setSize(width, height);

      int x = getProperties().getInt("application.x", 1);
      int y = getProperties().getInt("application.y", 1);

      frame.setLocation(
          (int) (x + (newWindowInvokationCounter * 10)),
          (int) (y + (newWindowInvokationCounter * 10)));
      ++newWindowInvokationCounter;
      frame.setVisible(true);
    }

    return controller;
  }