Package com.iizix.prop
Class PropErrorItem
java.lang.Object
com.iizix.prop.PropErrorItem
- All Implemented Interfaces:
- IPropErrorItem,- Cloneable
- Direct Known Subclasses:
- PropErrorItemValue
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, WARNING
- Constructor SummaryConstructorsConstructorDescriptionConstructs a new instance from an XML element.- PropErrorItem- (String id, String message, int level) Constructs a new instance.- PropErrorItem- (String id, String message, int level, String... quickFixes) Constructs a new instance.- PropErrorItem- (String id, String message, String location, int level, String... quickFixes) Constructs a new instance.
- Method SummaryModifier and TypeMethodDescription- clone()Clones this instance.- booleanChecks if two items are equal.- getID()Gets the ID.- int- getIndex()Gets the index for a multi-property.Gets the location of an error, for user info only.Gets the location or property name of an error, for user info only.Gets the message.- String[]Gets the quick-fix ID's.- intGets the severity.- getText- (boolean includeID) Gets a textual error description as "LEVEL[{\t}id]{\t}text" (where {\t} is the tab character).- voidLoads the error from XML.- protected StringThe parameter string.- voidCalled when the XML file for the error tree is serialized from properties.- void- setIndex- (int index) Sets the index for a multi-property.- toString()Formats the error input to a string.- Methods inherited from class java.lang.Object- finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.prop.IPropErrorItem- getChildPropName, isChildPropError
- Constructor Details- PropErrorItempublic PropErrorItem()Constructs a new instance from an XML element.
- PropErrorItemConstructs a new instance.- Parameters:
- id- The ID of the message, 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 or message is null.
 
- PropErrorItemConstructs a new instance.- Parameters:
- id- The ID of the message, 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 or message is null.
 
- PropErrorItemConstructs a new instance.- Parameters:
- id- The ID of the message, 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 or message is null.
 
 
- Method Details- loadLoads the error from XML.- Specified by:
- loadin interface- IPropErrorItem
- Parameters:
- element- The- errorItemelement.
- Throws:
- Exception- For errors in XML.
 
- setIndexpublic void setIndex- (int index) Sets the index for a multi-property.- Specified by:
- setIndexin interface- IPropErrorItem
- Parameters:
- index- 0 for main part, otherwise one-based index for errored property value.
 
- getIDGets the ID.- Specified by:
- getIDin interface- IPropErrorItem
 
- getMessageGets the message.- Specified by:
- getMessagein interface- IPropErrorItem
- Returns:
- The error message.
 
- getIndexpublic int getIndex()Gets the index for a multi-property.- Specified by:
- getIndexin interface- IPropErrorItem
- Returns:
- -1 for none, 0 for main part, otherwise one-based index for errored property value.
 
- getLocationGets the location of an error, for user info only.- Specified by:
- getLocationin interface- IPropErrorItem
- Returns:
- The location, or null for none.
 
- getLocationOrNameGets the location or property name of an error, for user info only.- Specified by:
- getLocationOrNamein interface- IPropErrorItem
- Returns:
- The location, or the property name if none is defined, never null.
 
- getQuickFixesGets the quick-fix ID's.- Specified by:
- getQuickFixesin interface- IPropErrorItem
- Returns:
- The list of quick-fix ID's or nullfor none.
 
- getSeveritypublic int getSeverity()Gets the severity.- Specified by:
- getSeverityin interface- IPropErrorItem
- Returns:
- INFO, WARNING or ERROR.
 
- equalsChecks if two items are equal.- Specified by:
- equalsin interface- IPropErrorItem
- Overrides:
- equalsin class- Object
 
- toStringFormats the error input to a string.
- paramStringThe parameter string.
- getTextGets a textual error description as "LEVEL[{\t}id]{\t}text" (where {\t} is the tab character).- Specified by:
- getTextin interface- IPropErrorItem
- Parameters:
- includeID- Flag to include ID or not.
 
- saveCalled when the XML file for the error tree is serialized from properties.- Specified by:
- savein interface- IPropErrorItem
- Parameters:
- element- The- Elementto initialize.
 
- cloneClones this instance.- Specified by:
- clonein interface- IPropErrorItem
- Overrides:
- clonein class- Object
- Returns:
- A clone.