org.gudy.azureus2.pluginsimpl.local.ui
Class AbstractUIMessage

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.ui.AbstractUIMessage
All Implemented Interfaces:
UIMessage
Direct Known Subclasses:
UIMessageImpl

public abstract class AbstractUIMessage
extends Object
implements UIMessage

Author:
Allan Crooks

Field Summary
protected  int input_type
           
protected  int message_type
           
protected  String[] messages
           
protected  String title
           
 
Fields inherited from interface org.gudy.azureus2.plugins.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
AbstractUIMessage()
           
 
Method Summary
 int ask()
          This displays the message to the user.
protected  String messagesAsString()
           
 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 setTitle(String title)
          Sets the title for the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message_type

protected int message_type

input_type

protected int input_type

title

protected String title

messages

protected String[] messages
Constructor Detail

AbstractUIMessage

public AbstractUIMessage()
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 interface UIMessage

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 interface UIMessage

setLocalisedTitle

public void setLocalisedTitle(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 interface UIMessage

setLocalisedMessage

public void setLocalisedMessage(String message)
Description copied from interface: UIMessage
Sets the main message to display the user. For multiple lines, see UIMessage.setLocalisedMessages(java.lang.String[]).

Specified by:
setLocalisedMessage in interface UIMessage

setLocalisedMessages

public void setLocalisedMessages(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 interface UIMessage

setMessage

public void setMessage(String message)
Description copied from interface: UIMessage
Sets the main message to display the user. For multiple lines, see UIMessage.setMessages(java.lang.String[]).

Specified by:
setMessage in interface UIMessage

setTitle

public void setTitle(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:
setTitle in interface UIMessage

messagesAsString

protected final String messagesAsString()

setMessages

public void setMessages(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 interface UIMessage

ask

public int ask()
Description copied from interface: UIMessage
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.

Specified by:
ask in interface UIMessage