Package com.compomics.util.messages
Class FeedBack
java.lang.Object
com.compomics.util.messages.FeedBack
public class FeedBack extends Object
This class is used to report a message to the user.
- Author:
- Marc Vaudel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FeedBack.FeedBackType
The supported report types. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description static FeedBack
getFeed(String title, String message)
Creates a general feed with no key word.static FeedBack
getFeed(String title, String message, ArrayList<String> keywords)
Creates a feed object.ArrayList<String>
getKeyWords()
Returns the key words for this report.String
getMessage()
Returns the message.static FeedBack
getTip(String title, String message)
Creates a general tip with no key word.static FeedBack
getTip(String title, String message, ArrayList<String> keywords)
Creates a tip object.String
getTitle()
Returns the title.FeedBack.FeedBackType
getType()
Returns the feedback type.static FeedBack
getWarning(String title, String message)
Creates a warning object.void
setKeyWords(ArrayList<String> keyWords)
Sets the the key words for this report.void
setMessage(String message)
Sets the message.void
setTitle(String title)
Sets the title.void
setType(FeedBack.FeedBackType type)
Sets the feedback type.
-
Constructor Details
-
FeedBack
public FeedBack()Empty default constructor -
FeedBack
public FeedBack(FeedBack.FeedBackType type, String title, ArrayList<String> keyWords, String message)Creates a new report for the user.- Parameters:
type
- the type of reporttitle
- the title of the reportkeyWords
- the key words for this reportmessage
- the message of the report
-
-
Method Details
-
getWarning
Creates a warning object.- Parameters:
title
- the title of the warningmessage
- the message of the warning- Returns:
- the corresponding warning
-
getTip
Creates a tip object.- Parameters:
title
- the title of the tipmessage
- the message of the tipkeywords
- the keywords- Returns:
- the corresponding tip
-
getTip
Creates a general tip with no key word.- Parameters:
title
- the title of the tipmessage
- the message- Returns:
- the corresponding tip
-
getFeed
Creates a feed object.- Parameters:
title
- the title of the feedmessage
- the message of the feedkeywords
- the keywords- Returns:
- the corresponding feed
-
getFeed
Creates a general feed with no key word.- Parameters:
title
- the title of the feedmessage
- the message- Returns:
- the corresponding feed
-
getKeyWords
Returns the key words for this report.- Returns:
- the key words for this report
-
setKeyWords
Sets the the key words for this report.- Parameters:
keyWords
- the key words for this report
-
getMessage
Returns the message.- Returns:
- the message
-
setMessage
Sets the message.- Parameters:
message
- the message
-
getTitle
Returns the title.- Returns:
- the title
-
setTitle
Sets the title.- Parameters:
title
- the title
-
getType
Returns the feedback type.- Returns:
- the feedback type
-
setType
Sets the feedback type.- Parameters:
type
- the feedback type
-