|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jurvis.util.JvErrorList
public class JvErrorList
A instance of ErrorList maintains a list of user errors for a dialog. When
an error is detected, the add(org.jurvis.util.JvErrorList.Entry) method is used to add the error to
the list. After all error detection code is evaluated, showDialog(java.awt.Component, java.lang.String)
may be used to display the errors to the user.
TODO: showDialog() should be moved to a separate class, maybe ErrorListView.
| Nested Class Summary | |
|---|---|
static class |
JvErrorList.Entry
An entry within a ErrorList. |
| Constructor Summary | |
|---|---|
JvErrorList()
Construct an JvErrorList. |
|
| Method Summary | |
|---|---|
void |
add(JComponent field,
String label,
String message)
Add an error regarding the specified component to the errors list. |
void |
add(JvErrorList.Entry entry)
Add an error entry to the end of the errors list. |
void |
add(String message)
Add an error regarding the specified component to the errors list. |
List |
getErrors()
Return the list of JvErrorList.Entry's in this ErrorList. |
boolean |
hasErrors()
Return whether there are any errors in this list. |
Iterator |
iterator()
Return an iterator over the list of JvErrorList.Entry's in this
ErrorList. |
void |
merge(JvErrorList errorList)
Merge the errors in this list with those in the specified list. |
void |
showDialog(Component owner,
String name)
Show the list of errors (if there are any) to the user in a dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JvErrorList()
JvErrorList.
| Method Detail |
|---|
public void add(JvErrorList.Entry entry)
entry - the entry to addpublic void add(String message)
message - error message to display
public void add(JComponent field,
String label,
String message)
field - the field in error (to be used in the future for hyperlink)label - label containing name of field; may be nullmessage - error message to displaypublic boolean hasErrors()
public List getErrors()
JvErrorList.Entry's in this ErrorList.
public Iterator iterator()
JvErrorList.Entry's in this
ErrorList. If there are no entries, an iterator over an
empty list is returned.
public void merge(JvErrorList errorList)
errorList - list of errors to merge in
public void showDialog(Component owner,
String name)
owner - the owner of the dialogname - the name of the dialog
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||