Package edu.tufts.hrilab.ava.display
Class DialogueMessage
java.lang.Object
edu.tufts.hrilab.ava.display.DialogueMessage
represents a char message within the Ava Display Component.
Each message is associated with a specific speaker and has a timeout
after which it is automatically removed from the display.
-
Constructor Summary
ConstructorsConstructorDescriptionDialogueMessage(String text, String speaker) Constructs a new ChatMessageDialogueMessage(String text, String speaker, int messageTimeout) Constructs a new ChatMessage with a custom message timeout -
Method Summary
-
Constructor Details
-
DialogueMessage
Constructs a new ChatMessage- Parameters:
text- The text of the chat message.speaker- The speaker of the chat message.
-
DialogueMessage
Constructs a new ChatMessage with a custom message timeout- Parameters:
text- The text of the chat message.speaker- The speaker of the chat message.messageTimeout- The time until the message is timed out in milliseconds.
-
-
Method Details
-
getText
Gets the text of the chat message.- Returns:
- The text of the chat message.
-
getSpeaker
Gets the speaker of the chat message.- Returns:
- the speaker of the chat message.
-
isRobotMessage
public boolean isRobotMessage()Checks if the message is from the robot- Returns:
- true if message is from the robot, false otherwise
-
isRemoved
public boolean isRemoved()Checks if the message has been removed.- Returns:
- true if the message has been removed, false otherwise.
-
cancel
public void cancel()Cancels the timer and removed the message. This is useful when removing messages before timeout.
-