|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.editor.widgets.ValidityMessages
public final class ValidityMessages
Describes correctness of data in a widget.
| Field Summary | |
|---|---|
String |
error
Error message. |
String |
info
Info message. |
String |
warning
Warning message. |
| Constructor Summary | |
|---|---|
ValidityMessages()
Constructor, sets all three strings to null. |
|
ValidityMessages(String error)
Constructor, sets error message. |
|
ValidityMessages(ValidityMessages other)
Clones given object. |
|
| Method Summary | |
|---|---|
boolean |
equalsTopLevelMsg(ValidityMessages other)
Checks if two validity messages equals, in terms of changing the displayed text. |
static boolean |
equalsTopLevelMsg(ValidityMessages msg1,
ValidityMessages msg2)
Checks if two validity messages equals, in terms of changing the displayed text. |
MessageLevelEnum |
getLevel()
Returns level of messages. |
static boolean |
isError(ValidityMessages messages)
Checks if given messages contains error. |
void |
setField(MessageLevelEnum level,
String message,
boolean overwrite)
Sets given field. |
static ValidityMessages |
setField(ValidityMessages messages,
MessageLevelEnum level,
String message,
boolean overwrite)
Sets field to a value and returns instance of messages object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String error
null or empty string then there is no
error.
public String warning
null or empty string then there is no
warning.
public String info
null or empty string then there is no
info.
| Constructor Detail |
|---|
public ValidityMessages()
null. Calls
this((String)null).
public ValidityMessages(String error)
error - the error message to set.public ValidityMessages(ValidityMessages other)
other - object to clone. If null then all messages
will be null.| Method Detail |
|---|
public String toString()
toString in class Objectpublic MessageLevelEnum getLevel()
null if the message does not
contain error, warning nor information.
public static final boolean equalsTopLevelMsg(ValidityMessages msg1,
ValidityMessages msg2)
msg1 - first messages object.msg2 - second messages object.
true if setting other over this
will not change the displayed message.public final boolean equalsTopLevelMsg(ValidityMessages other)
other - the other messages object.
true if setting other over this
will not change the displayed message.public static boolean isError(ValidityMessages messages)
messages - messages to check
true if it contains non-empty error message
public void setField(MessageLevelEnum level,
String message,
boolean overwrite)
level - determines the field.message - the message.overwrite - if false and given field is not
null then it is not overwritten.
public static ValidityMessages setField(ValidityMessages messages,
MessageLevelEnum level,
String message,
boolean overwrite)
messages==null && message!=null).
messages - current message object. Overwritten if not
null.level - determines the fieldmessage - the messageoverwrite - if false and given field is not
null then it is not overwritten.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||