Class Message

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Component, Displayable, InfoModel, LabelModel, Model, PresentationModel, DepictedObject
Direct Known Subclasses:
Table.DefaultCellMessage

public class Message extends AbstractComponent
A message component showing the message and any label. The message only supports text content types, including:
  • text/*
  • application/xml
  • application/*+xml

The message defaults to a content type of text/plain.

Author:
Garret Wilson
  • Field Details

    • MESSAGE_PROPERTY

      public static final String MESSAGE_PROPERTY
      The message bound property.
    • MESSAGE_CONTENT_TYPE_PROPERTY

      public static final String MESSAGE_CONTENT_TYPE_PROPERTY
      The message content type bound property.
  • Constructor Details

    • Message

      public Message()
      Default constructor.
  • Method Details

    • getMessage

      public String getMessage()
      Returns:
      The message text, which may include a resource reference, or null if there is no message text.
    • setMessage

      public void setMessage(String newMessage)
      Sets the text of the message. This is a bound property.
      Parameters:
      newMessage - The new text of the message, which may include a resource reference.
      See Also:
    • getMessageContentType

      public com.globalmentor.net.MediaType getMessageContentType()
      Returns:
      The content type of the message text.
    • setMessageContentType

      public void setMessageContentType(com.globalmentor.net.MediaType newMessageContentType)
      Sets the content type of the message text. This is a bound property.
      Parameters:
      newMessageContentType - The new message text content type.
      Throws:
      NullPointerException - if the given content type is null.
      IllegalArgumentException - if the given content type is not a text content type.
      See Also: