コード例 #1
0
  /** Initialise. */
  public synchronized void initialise() {

    // wait until application is properly initialised
    while (applicationService == null) {
      // idle in this thread
      try {
        this.wait(6000);
      } catch (InterruptedException e) {
        logger.warn("e.getMessage() = " + e.getMessage());
      }

      if (applicationService != null && applicationService.getErrorLoggerService() != null) {
        this.applicationService.getErrorLoggerService().registerListener(this);
      }
    }

    // set LNF first to avoid component UI errors
    LookAndFeelUtils.setDefaultLNF();

    errorPane = new JXErrorPane();
    errorPane.setPreferredSize(new Dimension(400, 300));
    errorPane.setIcon(ImageUtils.getIcon(ImageUtils.IconName.WARNING_ICON_48));
    errorPane.setErrorReporter(this);
    errorDialog = JXErrorPane.createDialog(null, errorPane);
    errorDialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
    errorDialog.pack();
  }