Package com.biglybt.pifimpl.local.ui
Class AbstractUIMessage
- java.lang.Object
-
- com.biglybt.pifimpl.local.ui.AbstractUIMessage
-
- All Implemented Interfaces:
UIMessage
- Direct Known Subclasses:
UIMessageImpl
public abstract class AbstractUIMessage extends java.lang.Object implements UIMessage
-
-
Field Summary
Fields Modifier and Type Field Description protected int
input_type
protected int
message_type
protected java.lang.String[]
messages
protected java.lang.String
title
-
Fields inherited from interface com.biglybt.pif.ui.UIMessage
ANSWER_ABORT, ANSWER_CANCEL, ANSWER_IGNORE, ANSWER_NO, ANSWER_OK, ANSWER_RETRY, ANSWER_YES, INPUT_OK, INPUT_OK_CANCEL, INPUT_RETRY_CANCEL, INPUT_RETRY_CANCEL_IGNORE, INPUT_YES_NO, INPUT_YES_NO_CANCEL, MSG_ERROR, MSG_INFO, MSG_NONE, MSG_QUESTION, MSG_WARN, MSG_WORKING
-
-
Constructor Summary
Constructors Constructor Description AbstractUIMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
ask()
This displays the message to the user.private java.lang.String
localise(java.lang.String key)
protected java.lang.String
messagesAsString()
void
setInputType(int input_type)
Sets what type of input is allowed - use one of the INPUT_ constants defined here.void
setLocalisedMessage(java.lang.String message)
Sets the main message to display the user.void
setLocalisedMessages(java.lang.String[] messages)
Sets the main message to display the user.void
setLocalisedTitle(java.lang.String title)
Sets the title for the message.void
setMessage(java.lang.String message)
Sets the main message to display the user.void
setMessages(java.lang.String[] messages)
Sets the main message to display the user.void
setMessageType(int msg_type)
Sets what type of message to display - use one of the MSG_ constants defined here.void
setTitle(java.lang.String title)
Sets the title for the message.
-
-
-
Method Detail
-
setInputType
public void setInputType(int input_type)
Description copied from interface:UIMessage
Sets what type of input is allowed - use one of the INPUT_ constants defined here.- Specified by:
setInputType
in interfaceUIMessage
-
setMessageType
public void setMessageType(int msg_type)
Description copied from interface:UIMessage
Sets what type of message to display - use one of the MSG_ constants defined here.- Specified by:
setMessageType
in interfaceUIMessage
-
setLocalisedTitle
public void setLocalisedTitle(java.lang.String title)
Description copied from interface:UIMessage
Sets the title for the message. For some interfaces, this means that a window will be presented, and the title of the window will be the value passed here.- Specified by:
setLocalisedTitle
in interfaceUIMessage
-
setLocalisedMessage
public void setLocalisedMessage(java.lang.String message)
Description copied from interface:UIMessage
Sets the main message to display the user. For multiple lines, seeUIMessage.setLocalisedMessages(java.lang.String[])
.- Specified by:
setLocalisedMessage
in interfaceUIMessage
-
setLocalisedMessages
public void setLocalisedMessages(java.lang.String[] messages)
Description copied from interface:UIMessage
Sets the main message to display the user.The value passed here will be an array of strings - each string will be usually outputted on its own line.
- Specified by:
setLocalisedMessages
in interfaceUIMessage
-
setMessage
public void setMessage(java.lang.String message)
Description copied from interface:UIMessage
Sets the main message to display the user. For multiple lines, seeUIMessage.setMessages(java.lang.String[])
.- Specified by:
setMessage
in interfaceUIMessage
-
setTitle
public void setTitle(java.lang.String title)
Description copied from interface:UIMessage
Sets the title for the message. For some interfaces, this means that a window will be presented, and the title of the window will be the value passed here.
-
messagesAsString
protected final java.lang.String messagesAsString()
-
setMessages
public void setMessages(java.lang.String[] messages)
Description copied from interface:UIMessage
Sets the main message to display the user.The value passed here will be an array of strings - each string will be usually outputted on its own line.
- Specified by:
setMessages
in interfaceUIMessage
-
localise
private java.lang.String localise(java.lang.String key)
-
-