Class PropErrorItemValue

  • All Implemented Interfaces:
    IPropErrorItem, java.lang.Cloneable

    public class PropErrorItemValue
    extends PropErrorItem
    Class holding information about an error for the Property Editor in the Designer. Several errors can be set for a single property, e.g. when there are of multi-style.
    Author:
    Christopher Mindus
    • Constructor Detail

      • PropErrorItemValue

        public PropErrorItemValue()
        Constructs a new instance from an XML element.
      • PropErrorItemValue

        public PropErrorItemValue​(java.lang.String input,
                                  java.lang.String message)
        Constructs a new instance without ID (empty string).
        Parameters:
        input - The user input string, never null.
        message - The error message string, never null.
        Throws:
        java.lang.NullPointerException - If input or message is null.
      • PropErrorItemValue

        public PropErrorItemValue​(java.lang.String id,
                                  java.lang.String input,
                                  java.lang.String message)
        Constructs a new instance.
        Parameters:
        id - The ID of the message, never null.
        input - The user input string, never null.
        message - The error message string, never null.
        Throws:
        java.lang.NullPointerException - If id, input or message is null.
      • PropErrorItemValue

        public PropErrorItemValue​(java.lang.String id,
                                  java.lang.String input,
                                  java.lang.String message,
                                  int level)
        Constructs a new instance.
        Parameters:
        id - The ID of the message, never null.
        input - The user input string, never null.
        message - The error message string, never null.
        level - The severity level: INFO, WARNING or ERROR.
        Throws:
        java.lang.IllegalArgumentException - If level is not INFO, WARNING or ERROR.
        java.lang.NullPointerException - If id, input or message is null.
      • PropErrorItemValue

        public PropErrorItemValue​(java.lang.String id,
                                  java.lang.String input,
                                  java.lang.String message,
                                  int level,
                                  java.lang.String... quickFixes)
        Constructs a new instance.
        Parameters:
        id - The ID of the message, never null.
        input - The user input string, never null.
        message - The error message string, never null.
        level - The severity level: INFO, WARNING or ERROR.
        quickFixes - The quick-fix ID's.
        Throws:
        java.lang.IllegalArgumentException - If level is not INFO, WARNING or ERROR.
        java.lang.NullPointerException - If id, input or message is null.
      • PropErrorItemValue

        public PropErrorItemValue​(java.lang.String id,
                                  java.lang.String input,
                                  java.lang.String message,
                                  java.lang.String location,
                                  int level,
                                  java.lang.String... quickFixes)
        Constructs a new instance.
        Parameters:
        id - The ID of the message, never null.
        input - The user input string, never null.
        message - The error message string, never null.
        location - The location, null for none.
        level - The severity level: INFO, WARNING or ERROR.
        quickFixes - The quick-fix ID's.
        Throws:
        java.lang.IllegalArgumentException - If level is not INFO, WARNING or ERROR.
        java.lang.NullPointerException - If id, input or message is null.
    • Method Detail

      • load

        public void load​(org.w3c.dom.Element element)
                  throws java.lang.Exception
        Loads the error from XML.
        Specified by:
        load in interface IPropErrorItem
        Overrides:
        load in class PropErrorItem
        Parameters:
        element - The errorItem element.
        Throws:
        java.lang.Exception - For errors in XML.
      • getInput

        public java.lang.String getInput()
        Gets the user input.
      • paramString

        protected java.lang.String paramString()
        Formats the error input to a string.
        Overrides:
        paramString in class PropErrorItem
      • save

        public void save​(org.w3c.dom.Element element)
        Called when the XML file for the error tree is serialized from properties.
        Specified by:
        save in interface IPropErrorItem
        Overrides:
        save in class PropErrorItem
        Parameters:
        element - The Element to initialize.