Class AbstractUIMessage

  • All Implemented Interfaces:
    UIMessage
    Direct Known Subclasses:
    UIMessageImpl

    public abstract class AbstractUIMessage
    extends java.lang.Object
    implements UIMessage
    • Field Detail

      • message_type

        protected int message_type
      • input_type

        protected int input_type
      • title

        protected java.lang.String title
      • messages

        protected java.lang.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​(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 interface UIMessage
      • 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 interface UIMessage
      • 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.
        Specified by:
        setTitle in interface UIMessage
      • 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 interface UIMessage
      • localise

        private java.lang.String localise​(java.lang.String key)
      • 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