Class DefaultErrorView

  • All Implemented Interfaces:
    ErrorView

    public class DefaultErrorView
    extends java.lang.Object
    implements ErrorView
    A dialog displaying a tree of error messages.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultErrorView​(@Nullable java.awt.Component parent)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addError​(@NotNull ErrorViewCategory categoryName, int lineNo, @NotNull java.lang.String message)
      Adds an error message.
      void addError​(@NotNull ErrorViewCategory categoryName, @NotNull java.lang.String message)
      Adds an error message.
      void addWarning​(@NotNull ErrorViewCategory categoryName, int lineNo, @NotNull java.lang.String message)
      Adds a warning message.
      void addWarning​(@NotNull ErrorViewCategory categoryName, @NotNull java.lang.String message)
      Adds a warning message.
      void errorViewOk()
      Action method for "ok" button of error dialog.
      boolean hasErrors()
      Whether at least one error message has been added.
      void waitDialog()
      Waits until the dialog has been dismissed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultErrorView

        public DefaultErrorView​(@Nullable
                                @Nullable java.awt.Component parent)
        Creates a new instance.
        Parameters:
        parent - the parent component for showing the error dialog or null
    • Method Detail

      • addError

        public void addError​(@NotNull
                             @NotNull ErrorViewCategory categoryName,
                             @NotNull
                             @NotNull java.lang.String message)
        Description copied from interface: ErrorView
        Adds an error message.
        Specified by:
        addError in interface ErrorView
        Parameters:
        categoryName - the error category
        message - the error message
      • addError

        public void addError​(@NotNull
                             @NotNull ErrorViewCategory categoryName,
                             int lineNo,
                             @NotNull
                             @NotNull java.lang.String message)
        Description copied from interface: ErrorView
        Adds an error message.
        Specified by:
        addError in interface ErrorView
        Parameters:
        categoryName - the error category
        lineNo - the line number of the error message
        message - the error message
      • addWarning

        public void addWarning​(@NotNull
                               @NotNull ErrorViewCategory categoryName,
                               @NotNull
                               @NotNull java.lang.String message)
        Description copied from interface: ErrorView
        Adds a warning message.
        Specified by:
        addWarning in interface ErrorView
        Parameters:
        categoryName - the warning category
        message - the warning message
      • addWarning

        public void addWarning​(@NotNull
                               @NotNull ErrorViewCategory categoryName,
                               int lineNo,
                               @NotNull
                               @NotNull java.lang.String message)
        Description copied from interface: ErrorView
        Adds a warning message.
        Specified by:
        addWarning in interface ErrorView
        Parameters:
        categoryName - the warning category
        lineNo - the line number of the error message
        message - the warning message
      • hasErrors

        public boolean hasErrors()
        Description copied from interface: ErrorView
        Whether at least one error message has been added.
        Specified by:
        hasErrors in interface ErrorView
        Returns:
        whether error exist
      • waitDialog

        public void waitDialog()
                        throws java.lang.InterruptedException
        Description copied from interface: ErrorView
        Waits until the dialog has been dismissed.
        Specified by:
        waitDialog in interface ErrorView
        Throws:
        java.lang.InterruptedException - if the current thread has been interrupted while waiting for the dialog to close
      • errorViewOk

        @ActionMethod
        public void errorViewOk()
        Action method for "ok" button of error dialog.