Displays messages in this message display

The CSS class of each message is determined by the message being
displayed.
11811
public function display()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->getMessageCount() === 0) {
            return;
        }

        parent::display();

        $wrapper_div = new SwatHtmlTag('div');
        $wrapper_div->id = $this->id;
        $wrapper_div->class = $this->getCSSClassString();
        $wrapper_div->open();

        $has_dismiss_link = false;

        $message_count = count($this->display_messages);

        $count = 1;
        foreach ($this->display_messages as $key => $message) {
            if (in_array($key, $this->dismissable_messages)) {
                $has_dismiss_link = true;
            }

            $first = $count === 1;
            $last = $count === $message_count;

            $this->displayMessage($key, $message, $first, $last);

            $count++;
        }

        $wrapper_div->close();

        if ($has_dismiss_link) {
            Swat::displayInlineJavaScript($this->getInlineJavaScript());
        }
    }
302038
@Override
    public void displayMessage(Message message) {
        if (message == null) {
            getRequestPanel().clearView(true);
            getResponsePanel().clearView(false);
            return;
        }

        if (!(message instanceof HttpMessage)) {
            logger.warn("Unable to display message: " + message.getClass().getCanonicalName());
            return;
        }

        HttpMessage httpMessage = (HttpMessage) message;
        if (httpMessage.getRequestHeader().isEmpty()) {
            getRequestPanel().clearView(true);
        } else {
            getRequestPanel().setMessage(httpMessage);
        }

        if (httpMessage.getResponseHeader().isEmpty()) {
            getResponsePanel().clearView(false);
        } else {
            getResponsePanel().setMessage(httpMessage, true);
        }
    }
46236
public static MessageBox showMessageBox(String title, String message) {
		return showMessageBox(title, SafeHtmlUtils.fromString(message), MessageStyleType.INFO);
	}
1020867
public void showMessage(final String message)
	{
		display.asyncExec(new Runnable()
		{

			public void run()
			{

				cw.println(message);
				cw.show();
			}
		});
	}
76278
public function display()
    {
        if (!$this->visible) {
            return;
        }

        SwatWidget::display();

        $control_div = $this->getControlDivTag();
        $span = $this->getSpanTag();
        $input = $this->getInputTag();
        $container_div = $this->getContainerDivTag();
        $animate_div = $this->getAnimateDivTag();
        $padding_div = $this->getPaddingDivTag();

        $control_div->open();

        $span->display();
        $input->display();

        $container_div->open();
        $animate_div->open();
        $padding_div->open();
        $this->displayChildren();
        $padding_div->close();
        $animate_div->close();
        $container_div->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());

        $control_div->close();
    }
667188
public function _message($type, $message)
    {
        $context = $this->_context;

        $cssClasses = isset($this->_cssClasses[$type]) ? $this->_cssClasses[$type] : '';

        $context->messages[] = '<div class="' . $cssClasses . '">' . $message . '</div>' . PHP_EOL;
    }
982167
public function diag()
    {
        $messages = func_get_args();
        foreach ($messages as $message) {
            echo $this->colorizer->colorize('# ' . join("\n# ", (array)$message), 'COMMENT') . "\n";
        }
    }
1269896
protected function displayText()
    {
        if ($this->text === null) {
            // still show an empty span if there is no text for this
            // progress bar
            $text = '';
        } else {
            if ($this->text_value === null) {
                $text = $this->text;
            } elseif (is_array($this->text_value)) {
                $text = vsprintf($this->text, $this->text_value);
            } else {
                $text = sprintf($this->text, $this->text_value);
            }
        }

        $span_tag = new SwatHtmlTag('span');
        $span_tag->id = $this->id . '_text';
        $span_tag->class = 'swat-progress-bar-text';
        $span_tag->setContent($text, $this->content_type);
        $span_tag->display();
    }
45829
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $image_tag = new SwatHtmlTag('img');
        $image_tag->id = $this->id;
        $image_tag->class = $this->getCSSClassString();

        if (count($this->values)) {
            $image_tag->src = vsprintf($this->image, $this->values);
        } else {
            $image_tag->src = $this->image;
        }

        if ($this->height !== null) {
            $image_tag->height = $this->height;
        }

        if ($this->width !== null) {
            $image_tag->width = $this->width;
        }

        $image_tag->style = self::getOccupyMargin(
            $this->width,
            $this->height,
            $this->occupy_width,
            $this->occupy_height
        );

        if ($this->title !== null) {
            $image_tag->title = $this->title;
        }

        // alt is a required XHTML attribute. We should always display it even
        // if it is not specified.
        $image_tag->alt = $this->alt === null ? '' : $this->alt;

        $image_tag->display();
    }
218992
def render_message(type = :info, msg = nil, &blk)
      icon_class = message_icon_class(type)
      if block_given?
        content_tag :div, render_icon(icon_class) + capture(&blk), class: "#{type} message"
      else
        content_tag :div, render_icon(icon_class) + msg, class: "#{type} message"
      end
    end
1028678
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $wrapper_classes = array_merge(
            array_diff($this->getCSSClassNames(), array('swat-flydown')),
            array('swat-flydown-wrapper')
        );
        $wrapper = new SwatHtmlTag('span');
        $wrapper->class = implode(' ', $wrapper_classes);
        $wrapper->open();

        $options = $this->getOptions();
        $selected = false;

        if ($this->show_blank) {
            $options = array_merge(array($this->getBlankOption()), $options);
        }

        // only show a select if there is more than one option
        if (count($options) > 1) {
            $flydown_value = $this->serialize_values
                ? $this->value
                : (string) $this->value;

            if ($this->serialize_values) {
                $salt = $this->getForm()->getSalt();
            }

            $select_tag = new SwatHtmlTag('select');
            $select_tag->name = $this->id;
            $select_tag->id = $this->id;
            $select_tag->class = $this->getCSSClassString();

            if (!$this->isSensitive()) {
                $select_tag->disabled = 'disabled';
            }

            $option_tag = new SwatHtmlTag('option');

            $select_tag->open();

            foreach ($options as $flydown_option) {
                if ($this->serialize_values) {
                    $option_tag->value = SwatString::signedSerialize(
                        $flydown_option->value,
                        $salt
                    );
                } else {
                    $option_tag->value = (string) $flydown_option->value;
                }

                if ($flydown_option instanceof SwatFlydownDivider) {
                    $option_tag->disabled = 'disabled';
                    $option_tag->class = 'swat-flydown-option-divider';
                } elseif ($flydown_option instanceof SwatFlydownBlankOption) {
                    $option_tag->removeAttribute('disabled');
                    $option_tag->class = 'swat-blank-option';
                } else {
                    $option_tag->removeAttribute('disabled');
                    $option_tag->removeAttribute('class');

                    // add option-specific CSS classes from option metadata
                    $classes = $this->getOptionMetadata(
                        $flydown_option,
                        'classes'
                    );

                    if (is_array($classes)) {
                        $option_tag->class = implode(' ', $classes);
                    } elseif ($classes) {
                        $option_tag->class = strval($classes);
                    }
                }

                $value = $this->serialize_values
                    ? $flydown_option->value
                    : (string) $flydown_option->value;

                if (
                    $flydown_value === $value &&
                    !$selected &&
                    !($flydown_option instanceof SwatFlydownDivider)
                ) {
                    $option_tag->selected = 'selected';
                    $selected = true;
                } else {
                    $option_tag->removeAttribute('selected');
                }

                $option_tag->setContent(
                    $flydown_option->title,
                    $flydown_option->content_type
                );

                $option_tag->display();
            }

            $select_tag->close();
        } elseif (count($options) === 1) {
            // get first and only element
            $this->displaySingle(current($options));
        }

        $wrapper->close();
    }
1055950
public function display()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->getFirst() === null) {
            return;
        }

        SwatWidget::display();

        $container_tag = new SwatHtmlTag($this->container_tag);
        $container_tag->id = $this->id;
        $container_tag->class = $this->getCSSClassString();

        $container_tag->open();

        $content_wrapper = null;
        if ($this->wrap_content_and_notes) {
            $content_wrapper = new SwatHtmlTag('div');
            $content_wrapper->class = 'swat-form-field-content-wrapper';
        }

        if ($this->title_reversed) {
            if ($this->show_notes_first) {
                if ($this->wrap_content_and_notes) {
                    $content_wrapper->open();
                    $this->displayNotes();
                    $this->displayContent();
                    $content_wrapper->close();

                    $this->displayTitle();
                    $this->displayMessages();
                } else {
                    $this->displayNotes();
                    $this->displayContent();
                    $this->displayTitle();
                    $this->displayMessages();
                }
            } else {
                if ($this->wrap_content_and_notes) {
                    $content_wrapper->open();
                    $this->displayContent();
                    $this->displayNotes();
                    $content_wrapper->close();

                    $this->displayTitle();
                    $this->displayMessages();
                } else {
                    $this->displayContent();
                    $this->displayTitle();
                    $this->displayMessages();
                    $this->displayNotes();
                }
            }
        } else {
            if ($this->show_notes_first) {
                if ($this->wrap_content_and_notes) {
                    $this->displayTitle();

                    $content_wrapper->open();
                    $this->displayNotes();
                    $this->displayContent();
                    $content_wrapper->close();

                    $this->displayMessages();
                } else {
                    $this->displayTitle();
                    $this->displayNotes();
                    $this->displayContent();
                    $this->displayMessages();
                }
            } else {
                if ($this->wrap_content_and_notes) {
                    $this->displayTitle();

                    $content_wrapper->open();
                    $this->displayContent();
                    $this->displayNotes();
                    $content_wrapper->close();

                    $this->displayMessages();
                } else {
                    $this->displayTitle();
                    $this->displayContent();
                    $this->displayMessages();
                    $this->displayNotes();
                }
            }
        }

        $container_tag->close();
    }
1317857
public static void showMessage(String message, String caption) {
        getShell().getMessageWindow().showMessage(message, caption);
    }
160134
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $count = count($this);
        $i = 1;

        $container_tag = $this->getContainerTag();
        $container_tag->open();

        foreach ($this->entries as $entry) {
            // display separator
            if ($i > 1) {
                echo SwatString::minimizeEntities($this->separator);
            }

            // link all entries or link all but the last entry
            $link = $this->link_last_entry || $i < $count;

            $this->displayEntry($entry, $link, $i === 1);

            $i++;
        }

        $container_tag->close();
    }
233138
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $areas_flydown = $this->getCompositeWidget('areas_flydown');
        $regions_flydown = $this->getCompositeWidget('regions_flydown');

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = $this->getCSSClassString();
        $div_tag->open();

        $areas_flydown->value = $this->getArea($this->value);
        $areas_flydown->display();

        $regions_flydown->options = $this->regions;
        $regions_flydown->value = $this->getRegion($this->value);
        $regions_flydown->display();

        $div_tag->close();
    }
1289611
public function display()
    {
        if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
            return;
        }

        if (null === $this->format) {
            $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
        }

        $this->overwrite($this->buildLine());
    }
567964
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $div_tag = new SwatHtmlTag('div');
        $div_tag->class = 'swat-textarea-container';
        $div_tag->open();

        $textarea_tag = $this->getTextareaTag();
        $textarea_tag->display();

        $div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }