/**
   * Initialize this dialog for the job entry instance provided.
   *
   * @param jobEntry The job entry this dialog supports.
   */
  protected void init(E jobEntry) throws XulException {
    SwtXulLoader swtXulLoader = new SwtXulLoader();
    // Register the settings manager so dialog position and size is restored
    swtXulLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
    swtXulLoader.registerClassLoader(getClass().getClassLoader());
    // Register Kettle's variable text box so we can reference it from XUL
    swtXulLoader.register("VARIABLETEXTBOX", ExtTextbox.class.getName());
    swtXulLoader.setOuterContext(shell);

    // Load the XUL document with the dialog defined in it
    XulDomContainer container = swtXulLoader.loadXul(getXulFile(), bundle);

    // Create the controller with a default binding factory for the document we just loaded
    BindingFactory bf = new DefaultBindingFactory();
    bf.setDocument(container.getDocumentRoot());
    controller = createController(container, jobEntry, bf);
    container.addEventHandler(controller);

    // Load up the SWT-XUL runtime and initialize it with our container
    final XulRunner runner = new SwtXulRunner();
    runner.addContainer(container);
    runner.initialize();
  }