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
Fields Modifier and Type Field Description static int
ANSWER_ABORT
static int
ANSWER_CANCEL
static int
ANSWER_IGNORE
static int
ANSWER_NO
static int
ANSWER_OK
static int
ANSWER_RETRY
static int
ANSWER_YES
static int
INPUT_OK
static int
INPUT_OK_CANCEL
static int
INPUT_RETRY_CANCEL
static int
INPUT_RETRY_CANCEL_IGNORE
static int
INPUT_YES_NO
static int
INPUT_YES_NO_CANCEL
static int
MSG_ERROR
static int
MSG_INFO
static int
MSG_NONE
static int
MSG_QUESTION
static int
MSG_WARN
static int
MSG_WORKING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
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(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.
-
-
-
Field Detail
-
MSG_NONE
static final int MSG_NONE
- See Also:
- Constant Field Values
-
MSG_ERROR
static final int MSG_ERROR
- See Also:
- Constant Field Values
-
MSG_INFO
static final int MSG_INFO
- See Also:
- Constant Field Values
-
MSG_WARN
static final int MSG_WARN
- See Also:
- Constant Field Values
-
MSG_QUESTION
static final int MSG_QUESTION
- See Also:
- Constant Field Values
-
MSG_WORKING
static final int MSG_WORKING
- See Also:
- Constant Field Values
-
INPUT_OK
static final int INPUT_OK
- See Also:
- Constant Field Values
-
INPUT_OK_CANCEL
static final int INPUT_OK_CANCEL
- See Also:
- Constant Field Values
-
INPUT_YES_NO
static final int INPUT_YES_NO
- See Also:
- Constant Field Values
-
INPUT_YES_NO_CANCEL
static final int INPUT_YES_NO_CANCEL
- See Also:
- Constant Field Values
-
INPUT_RETRY_CANCEL
static final int INPUT_RETRY_CANCEL
- See Also:
- Constant Field Values
-
INPUT_RETRY_CANCEL_IGNORE
static final int INPUT_RETRY_CANCEL_IGNORE
- See Also:
- Constant Field Values
-
ANSWER_OK
static final int ANSWER_OK
- See Also:
- Constant Field Values
-
ANSWER_CANCEL
static final int ANSWER_CANCEL
- See Also:
- Constant Field Values
-
ANSWER_YES
static final int ANSWER_YES
- See Also:
- Constant Field Values
-
ANSWER_NO
static final int ANSWER_NO
- See Also:
- Constant Field Values
-
ANSWER_RETRY
static final int ANSWER_RETRY
- See Also:
- Constant Field Values
-
ANSWER_IGNORE
static final int ANSWER_IGNORE
- See Also:
- Constant Field Values
-
ANSWER_ABORT
static final int ANSWER_ABORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setTitle(java.lang.String title)
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
void setLocalisedTitle(java.lang.String title)
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
void setMessage(java.lang.String message)
Sets the main message to display the user. For multiple lines, seesetMessages(java.lang.String[])
.
-
setLocalisedMessage
void setLocalisedMessage(java.lang.String message)
Sets the main message to display the user. For multiple lines, seesetLocalisedMessages(java.lang.String[])
.
-
setMessages
void setMessages(java.lang.String[] messages)
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
void setLocalisedMessages(java.lang.String[] messages)
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.
-
-