com.compomics.util.messages
Class FeedBack

java.lang.Object
  extended by 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
static class FeedBack.FeedBackType
          The supported report types.
 
Constructor Summary
FeedBack(FeedBack.FeedBackType type, String title, ArrayList<String> keyWords, String message)
          Creates a new report for the user.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 report
title - the title of the report
keyWords - the key words for this report
message - the message of the report
Method Detail

getWarning

public static FeedBack getWarning(String title,
                                  String message)
Creates a warning object.

Parameters:
title - the title of the warning
message - the message of the warning
Returns:
the corresponding warning

getTip

public static FeedBack getTip(String title,
                              String message,
                              ArrayList<String> keywords)
Creates a tip object.

Parameters:
title - the title of the tip
message - the message of the tip
keywords - the keywords
Returns:
the corresponding tip

getTip

public static FeedBack getTip(String title,
                              String message)
Creates a general tip with no key word.

Parameters:
title - the title of the tip
message - the message
Returns:
the corresponding tip

getFeed

public static FeedBack getFeed(String title,
                               String message,
                               ArrayList<String> keywords)
Creates a feed object.

Parameters:
title - the title of the feed
message - the message of the feed
keywords - the keywords
Returns:
the corresponding feed

getFeed

public static FeedBack getFeed(String title,
                               String message)
Creates a general feed with no key word.

Parameters:
title - the title of the feed
message - the message
Returns:
the corresponding feed

getKeyWords

public ArrayList<String> getKeyWords()
Returns the key words for this report.

Returns:
the key words for this report

setKeyWords

public void setKeyWords(ArrayList<String> keyWords)
Sets the the key words for this report.

Parameters:
keyWords - the key words for this report

getMessage

public String getMessage()
Returns the message.

Returns:
the message

setMessage

public void setMessage(String message)
Sets the message.

Parameters:
message - the message

getTitle

public String getTitle()
Returns the title.

Returns:
the title

setTitle

public void setTitle(String title)
Sets the title.

Parameters:
title - the title

getType

public FeedBack.FeedBackType getType()
Returns the feedback type.

Returns:
the feedback type

setType

public void setType(FeedBack.FeedBackType type)
Sets the feedback type.

Parameters:
type - the feedback type


Copyright © 2012. All Rights Reserved.