/** {@inheritDoc} */
  @Override
  public void installUI(JComponent c) {
    super.installUI(c);

    this.pane = (JXErrorPane) c;

    installDefaults();
    installComponents();
    installListeners();

    // if the report action needs to be defined, do so
    Action a = c.getActionMap().get(JXErrorPane.REPORT_ACTION_KEY);
    if (a == null) {
      final JXErrorPane pane = (JXErrorPane) c;
      AbstractActionExt reportAction =
          new AbstractActionExt() {
            public void actionPerformed(ActionEvent e) {
              ErrorReporter reporter = pane.getErrorReporter();
              if (reporter != null) {
                reporter.reportError(pane.getErrorInfo());
              }
            }
          };
      configureReportAction(reportAction);
      c.getActionMap().put(JXErrorPane.REPORT_ACTION_KEY, reportAction);
    }
  }
Ejemplo n.º 2
0
  /*
   * (non-Javadoc)
   *
   * @see org.jdesktop.swingx.plaf.basic.BasicErrorPaneUI#installComponents()
   */
  @Override
  protected void installComponents() {
    super.installComponents();

    this.errorMessage.setBorder(null);
    this.errorScrollPane.setOpaque(false);
    this.errorScrollPane.getViewport().setOpaque(false);

    this.iconGlowTracker = new IconGlowTracker(this.iconLabel);
  }