Top Description Fields Methods
org.controlsfx.validation

public Interface ValidationMessage

extends Comparable<ValidationMessage>
Known Direct Implementers
org.controlsfx.validation.SimpleValidationMessage
Imports
java.util.Comparator, javafx.scene.control.Control

Interface to define basic contract for validation message

Field Summary

Modifier and TypeField and Description
public static final Comparator<ValidationMessage>

Method Summary

Modifier and TypeMethod and Description
public default int
compareTo(ValidationMessage msg)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public static ValidationMessage

Returns:

error message
error
(Control
message target
target
,
String
message text
text
)

Factory method to create a simple error message

public Severity

Returns:

message severity
getSeverity
()

Message Severity

public Control

Returns:

message target
getTarget
()

Message target - Control which message is related to .

public String

Returns:

message text
getText
()

Message text

public static ValidationMessage

Returns:

info message
info
(Control
message target
target
,
String
message text
text
)

Factory method to create a simple info message

public static ValidationMessage

Returns:

ok message
ok
(Control
message target
target
,
String
message text
text
)

Factory method to create a simple ok message

public static ValidationMessage

Returns:

ok message
ok
(Control
message target
target
)

Factory method to create a simple ok message

public static ValidationMessage

Returns:

warning message
warning
(Control
message target
target
,
String
message text
text
)

Factory method to create a simple warning message

Field Detail

COMPARATORback to summary
public static final Comparator<ValidationMessage> COMPARATOR

Method Detail

compareToback to summary
public default int compareTo(ValidationMessage msg)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Annotations
@Override
errorback to summary
public static ValidationMessage error(Control target, String text)

Factory method to create a simple error message

Parameters
target:Control

message target

text:String

message text

Returns:ValidationMessage

error message

getSeverityback to summary
public Severity getSeverity()

Message Severity

Returns:Severity

message severity

getTargetback to summary
public Control getTarget()

Message target - Control which message is related to .

Returns:Control

message target

getTextback to summary
public String getText()

Message text

Returns:String

message text

infoback to summary
public static ValidationMessage info(Control target, String text)

Factory method to create a simple info message

Parameters
target:Control

message target

text:String

message text

Returns:ValidationMessage

info message

okback to summary
public static ValidationMessage ok(Control target, String text)

Factory method to create a simple ok message

Parameters
target:Control

message target

text:String

message text

Returns:ValidationMessage

ok message

okback to summary
public static ValidationMessage ok(Control target)

Factory method to create a simple ok message

Parameters
target:Control

message target

Returns:ValidationMessage

ok message

warningback to summary
public static ValidationMessage warning(Control target, String text)

Factory method to create a simple warning message

Parameters
target:Control

message target

text:String

message text

Returns:ValidationMessage

warning message