Package com.iizix.prop
Class PropErrorItemValue
java.lang.Object
com.iizix.prop.PropErrorItem
com.iizix.prop.PropErrorItemValue
- All Implemented Interfaces:
IPropErrorItem,Cloneable
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
Field Summary
Fields inherited from interface com.iizix.prop.IPropErrorItem
CHILD_PROP_ERROR_PREFIX, ERROR, INFO, VERIFY_ERROR_CHILD_PREFIX, WARNINGConstructor Summary
ConstructorsConstructorDescriptionConstructs a new instance from an XML element.PropErrorItemValue(String input, String message) Constructs a new instance without ID (empty string).PropErrorItemValue(String id, String input, String message) Constructs a new instance.PropErrorItemValue(String id, String input, String message, int level) Constructs a new instance.PropErrorItemValue(String id, String input, String message, int level, String... quickFixes) Constructs a new instance.PropErrorItemValue(String id, String input, String message, String location, int level, String... quickFixes) Constructs a new instance.Method Summary
Methods inherited from class com.iizix.prop.PropErrorItem
clone, getID, getIndex, getLocation, getLocationOrName, getMessage, getQuickFixes, getSeverity, getText, setIndex, toStringMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.prop.IPropErrorItem
getChildPropName, isChildPropError
Constructor Details
PropErrorItemValue
public PropErrorItemValue()Constructs a new instance from an XML element.PropErrorItemValue
Constructs a new instance without ID (empty string).- Parameters:
input- The user input string, never null.message- The error message string, never null.- Throws:
NullPointerException- If input or message is null.
PropErrorItemValue
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:
NullPointerException- If id, input or message is null.
PropErrorItemValue
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:
IllegalArgumentException- If level is not INFO, WARNING or ERROR.NullPointerException- If id, input or message is null.
PropErrorItemValue
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:
IllegalArgumentException- If level is not INFO, WARNING or ERROR.NullPointerException- If id, input or message is null.
PropErrorItemValue
public PropErrorItemValue(String id, String input, String message, String location, int level, 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:
IllegalArgumentException- If level is not INFO, WARNING or ERROR.NullPointerException- If id, input or message is null.
Method Details
load
Loads the error from XML.- Specified by:
loadin interfaceIPropErrorItem- Overrides:
loadin classPropErrorItem- Parameters:
element- TheerrorItemelement.- Throws:
Exception- For errors in XML.
getInput
Gets the user input.equals
Checks if two items are equal.- Specified by:
equalsin interfaceIPropErrorItem- Overrides:
equalsin classPropErrorItem
paramString
Formats the error input to a string.- Overrides:
paramStringin classPropErrorItem
save
Called when the XML file for the error tree is serialized from properties.- Specified by:
savein interfaceIPropErrorItem- Overrides:
savein classPropErrorItem- Parameters:
element- TheElementto initialize.