'Set a state message to display over the item.
Parameters
message : UserMessage
Message to display. `message.severity` is used to determine
the icon and `message.contents` is used as a tool tip.'

def setStateMessage(self, message):

    if (message.severity == UserMessage.Info):
        self.setInfoMessage(message.contents)
    elif (message.severity == UserMessage.Warning):
        self.setWarningMessage(message.contents)
    elif (message.severity == UserMessage.Error):
        self.setErrorMessage(message.contents)
