com.levigo.util.swing.infobar
Interface MessageConsumer.Message

All Known Implementing Classes:
SimpleMessage
Enclosing interface:
MessageConsumer

public static interface MessageConsumer.Message

A message to be presented through the RollingMessagePanel.


Method Summary
 JComponent createDetailsView()
          Create a visual representation of the message.
 Icon getIcon()
          Get the icon (if any) to be associated with the message.
 String getID()
          Get the message's ID.
 String getMessage()
          Get the - usually one-line - message to be shown initially.
 int getPriority()
          Get the message priority.
 String getType()
          Get the message type.
 boolean hasDetails()
          Return whether the message has associated details.
 

Method Detail

getID

String getID()
Get the message's ID. The ID may be used to group similar messages even if the actual messages (as in getMessage()) vary slightly. If a message doesn't have an ID, it is ok to return null or the same string as getMessage().

Returns:

getMessage

String getMessage()
Get the - usually one-line - message to be shown initially.

Returns:

getPriority

int getPriority()
Get the message priority. Using message priorities allows consumers to prioritize messages with respect to their importance and thus control their presentation to a user. The absolute value of a priority must not be used by a consumer, only relative priorities shall be taken into consideration. Nevertheless, if a consumer is fed by multiple message sources, those sources must agree upon their relative priorities. Higher priority values indicate higher message importance.

Returns:

getType

String getType()
Get the message type. This information may be presented to users by some consumers.

Returns:

getIcon

Icon getIcon()
Get the icon (if any) to be associated with the message.

Returns:

hasDetails

boolean hasDetails()
Return whether the message has associated details. This method should return quickly. If this method returns true for a message, the message is obliged to create a visual representation for the message upon createDetailsView().

Returns:

createDetailsView

JComponent createDetailsView()
Create a visual representation of the message. It is up to the message to create any visual representation it sees fit. However, it is up to the caller of this method to provide a vessel for presentation to the user. Therefore the representation must refrain from adding unnecessary borders, UI elements for the disposal of the containing frame etc.

Returns:


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.