@IDProperty(value="id")
public abstract class Message
extends java.lang.Object
LENGTH_SHORT
or
LENGTH_LONG
which corresponds to 2 and 3.5 seconds respectively.
There are two types of Message:
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<javafx.util.Duration> |
duration
The time the Message is shown.
|
javafx.beans.property.StringProperty |
id
The id of this
Message . |
javafx.beans.property.StringProperty |
message
The message to display.
|
Modifier and Type | Field and Description |
---|---|
static javafx.util.Duration |
LENGTH_LONG
A long amount of time to display the message - 3500 ms.
|
static javafx.util.Duration |
LENGTH_SHORT
A short amount of time to display the message - 2000 ms.
|
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
abstract void |
cancel()
If the Message is currently showing, calling this method will hide it immediately
and show the next Message in queue.
|
javafx.beans.property.ObjectProperty<javafx.util.Duration> |
durationProperty()
The time the Message is shown.
|
javafx.util.Duration |
getDuration()
Gets the value of the property duration.
|
java.lang.String |
getId()
Gets the value of the property id.
|
java.lang.String |
getMessage()
Gets the value of the property message.
|
javafx.beans.property.StringProperty |
idProperty()
The id of this
Message . |
javafx.beans.property.StringProperty |
messageProperty()
The message to display.
|
void |
setDuration(javafx.util.Duration duration)
Sets the value of the property duration.
|
void |
setId(java.lang.String id)
Sets the value of the property id.
|
void |
setMessage(java.lang.String text)
Sets the value of the property message.
|
abstract void |
show()
Shows the Message immediately, if no other message is showing.
|
public final javafx.beans.property.StringProperty messageProperty
getMessage()
,
setMessage(String)
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> durationProperty
getDuration()
,
setDuration(Duration)
public final javafx.beans.property.StringProperty idProperty
Message
. This simple string identifier is useful for
finding a specific Message within the scene graph. While the id of a notification
should be unique within the scene graph, this uniqueness is not enforced.
This is analogous to the "id" attribute on an HTML element
(CSS ID Specification).
For example, if a notification is given the id of "myId", then the lookup method can
be used to find this notification as follows: scene.lookup("#myId");
.
getId()
,
setId(String)
public static final javafx.util.Duration LENGTH_SHORT
public static final javafx.util.Duration LENGTH_LONG
public final void setMessage(java.lang.String text)
public final java.lang.String getMessage()
public final javafx.beans.property.StringProperty messageProperty()
getMessage()
,
setMessage(String)
public final void setDuration(javafx.util.Duration duration)
public final javafx.util.Duration getDuration()
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> durationProperty()
getDuration()
,
setDuration(Duration)
public final javafx.beans.property.StringProperty idProperty()
Message
. This simple string identifier is useful for
finding a specific Message within the scene graph. While the id of a notification
should be unique within the scene graph, this uniqueness is not enforced.
This is analogous to the "id" attribute on an HTML element
(CSS ID Specification).
For example, if a notification is given the id of "myId", then the lookup method can
be used to find this notification as follows: scene.lookup("#myId");
.
getId()
,
setId(String)
public final void setId(java.lang.String id)
Message
. This simple string identifier is useful for
finding a specific Message within the scene graph. While the id of a notification
should be unique within the scene graph, this uniqueness is not enforced.
This is analogous to the "id" attribute on an HTML element
(CSS ID Specification).
For example, if a notification is given the id of "myId", then the lookup method can
be used to find this notification as follows: scene.lookup("#myId");
.
public final java.lang.String getId()
Message
. This simple string identifier is useful for
finding a specific Message within the scene graph. While the id of a notification
should be unique within the scene graph, this uniqueness is not enforced.
This is analogous to the "id" attribute on an HTML element
(CSS ID Specification).
For example, if a notification is given the id of "myId", then the lookup method can
be used to find this notification as follows: scene.lookup("#myId");
.
public abstract void show()
public abstract void cancel()