Package com.biglybt.pif.ui
Interface UIMessage
- All Known Implementing Classes:
AbstractUIMessage
,UIMessageImpl
public interface UIMessage
This interface provides a mechanism to display a message to the user,
potentially to ask the user a question.
There are four main elements to set:
- the message type - defaults to MSG_NONE.
- the input type - defaults to INPUT_OK.
- the message title.
- the message text.
There are various methods which have a setXXX and setLocalisedXXX counterparts. The setXXX methods will attempt to translate the given string to a localised representation of it - the setLocalisedXXX method will assume that the localisation has already been done, and leave it intact.
Note: Only for implementation by Azureus, not plugins.
- Since:
- 3.0.5.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionint
ask()
This displays the message to the user.void
setInputType
(int input_type) Sets what type of input is allowed - use one of the INPUT_ constants defined here.void
setLocalisedMessage
(String message) Sets the main message to display the user.void
setLocalisedMessages
(String[] messages) Sets the main message to display the user.void
setLocalisedTitle
(String title) Sets the title for the message.void
setMessage
(String message) Sets the main message to display the user.void
setMessages
(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
Sets the title for the message.
-
Field Details
-
MSG_NONE
static final int MSG_NONE- See Also:
-
MSG_ERROR
static final int MSG_ERROR- See Also:
-
MSG_INFO
static final int MSG_INFO- See Also:
-
MSG_WARN
static final int MSG_WARN- See Also:
-
MSG_QUESTION
static final int MSG_QUESTION- See Also:
-
MSG_WORKING
static final int MSG_WORKING- See Also:
-
INPUT_OK
static final int INPUT_OK- See Also:
-
INPUT_OK_CANCEL
static final int INPUT_OK_CANCEL- See Also:
-
INPUT_YES_NO
static final int INPUT_YES_NO- See Also:
-
INPUT_YES_NO_CANCEL
static final int INPUT_YES_NO_CANCEL- See Also:
-
INPUT_RETRY_CANCEL
static final int INPUT_RETRY_CANCEL- See Also:
-
INPUT_RETRY_CANCEL_IGNORE
static final int INPUT_RETRY_CANCEL_IGNORE- See Also:
-
ANSWER_OK
static final int ANSWER_OK- See Also:
-
ANSWER_CANCEL
static final int ANSWER_CANCEL- See Also:
-
ANSWER_YES
static final int ANSWER_YES- See Also:
-
ANSWER_NO
static final int ANSWER_NO- See Also:
-
ANSWER_RETRY
static final int ANSWER_RETRY- See Also:
-
ANSWER_IGNORE
static final int ANSWER_IGNORE- See Also:
-
ANSWER_ABORT
static final int ANSWER_ABORT- See Also:
-
-
Method Details
-
setMessageType
void setMessageType(int msg_type) Sets what type of message to display - use one of the MSG_ constants defined here. -
setInputType
void setInputType(int input_type) Sets what type of input is allowed - use one of the INPUT_ constants defined here. -
setTitle
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. -
setLocalisedTitle
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. -
setMessage
Sets the main message to display the user. For multiple lines, seesetMessages(java.lang.String[])
. -
setLocalisedMessage
Sets the main message to display the user. For multiple lines, seesetLocalisedMessages(java.lang.String[])
. -
setMessages
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.
-
setLocalisedMessages
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.
-
ask
int ask()This displays the message to the user. The way that the user acknowledges will be the method result - which will be one of the ANSWER_ constants defined here.
-