Class NullMessageOutput

  • All Implemented Interfaces:
    MessageOutput

    public class NullMessageOutput
    extends Object
    implements MessageOutput

    An implementation of the MessageOutput interface that does not output a message.

    This class provides an empty implementation of the show() method. Therefore messages are effectively suppressed. An instance of this class can be used when a MessageOutput object is required, but no message boxes are to be displayed, e.g. because there is an alternative way of giving feedback to the user.

    Version:
    $Id: NullMessageOutput.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • NullMessageOutput

        public NullMessageOutput()
    • Method Detail

      • show

        public int show​(Window parent,
                        Object message,
                        String title,
                        int messageType,
                        int buttonType)
        Outputs the specified message. This implementation does nothing; it simply ignores the message. It returns always RET_CANCEL.
        Specified by:
        show in interface MessageOutput
        Parameters:
        parent - the parent window
        message - specifies the message
        title - the title of the message box
        messageType - a type for the message
        buttonType - determines the buttons to be displayed
        Returns:
        a value indicating the button clicked by the user