display
Class Display

java.lang.Object
  extended by display.Display

public class Display
extends java.lang.Object

This class provides a proxy to the JOptionPane class so if a different notification method is developed they can be changed centrally within the Display class. The class also contains methods for opening various web pages.


Field Summary
static java.lang.String DEVELOPER_EMAIL
          The developer's email address to contact with.
static java.lang.String DONATE_URL
          The iTunesDSM donate url.
static java.lang.String HOMEPAGE_URL
          The iTunesDSM homepage url.
static java.lang.String SUPPORT_FORUM_URL
          The iTunesDSM support forum url.
 
Constructor Summary
Display()
          Used for testing purposes in classes that require a Display object
 
Method Summary
 void displayMessage(java.lang.String message)
          Writes a message to a printWriter object.
static void main(java.lang.String[] args)
           
static void newInfoMessage(java.lang.String title, java.lang.String message)
          Displays a new information message to the user.
static void newWarningMessage(java.lang.String warningTitle, java.lang.String message)
          Displays a new warning message to the user with an ok button.
static int newYesNoCancelOptionMessage(java.lang.String title, java.lang.String message)
          Displays a new yes/no/cancel option message to the user and returns the value of the user's selected option.
static int newYesNoOptionMessage(java.lang.String title, java.lang.String message)
          Displays a new yes/no option message to the user and returns the value of the user's selected option.
static void openAddedFilesDocument()
          This method provides an easy way to open the document containing all new tracks that have been added to iTunes.
static void openWebPage(java.lang.String url)
          Opens a web page in the user's browser given the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOMEPAGE_URL

public static final java.lang.String HOMEPAGE_URL
The iTunesDSM homepage url.

See Also:
Constant Field Values

DONATE_URL

public static final java.lang.String DONATE_URL
The iTunesDSM donate url.

See Also:
Constant Field Values

SUPPORT_FORUM_URL

public static final java.lang.String SUPPORT_FORUM_URL
The iTunesDSM support forum url.

See Also:
Constant Field Values

DEVELOPER_EMAIL

public static final java.lang.String DEVELOPER_EMAIL
The developer's email address to contact with.

See Also:
Constant Field Values
Constructor Detail

Display

public Display()
Used for testing purposes in classes that require a Display object

Method Detail

displayMessage

public void displayMessage(java.lang.String message)
Writes a message to a printWriter object.

Parameters:
message - The message to be written to the printwriter object.

newWarningMessage

public static void newWarningMessage(java.lang.String warningTitle,
                                     java.lang.String message)
Displays a new warning message to the user with an ok button.

Parameters:
warningTitle - the title of the warning message.
message - the message to display to the user.

newInfoMessage

public static void newInfoMessage(java.lang.String title,
                                  java.lang.String message)
Displays a new information message to the user.

Parameters:
title - The title of the information message.
message - The message to display to the user.

newYesNoCancelOptionMessage

public static int newYesNoCancelOptionMessage(java.lang.String title,
                                              java.lang.String message)
Displays a new yes/no/cancel option message to the user and returns the value of the user's selected option.

Parameters:
title - the title of the information message.
message - the message to display to the user.
Returns:
The value of the user's selected option. As JOptionPane's are currently used, the value will be of JOptionPane integer.

newYesNoOptionMessage

public static int newYesNoOptionMessage(java.lang.String title,
                                        java.lang.String message)
Displays a new yes/no option message to the user and returns the value of the user's selected option.

Parameters:
title - The title of the information message.
message - The message to display to the user.
Returns:
The value of the user's selected option. As JOptionPane's are currently used, the value will be of JOptionPane integer.

openWebPage

public static void openWebPage(java.lang.String url)
Opens a web page in the user's browser given the URL.

Parameters:
url - The URL to open in the user's browser.

openAddedFilesDocument

public static void openAddedFilesDocument()
This method provides an easy way to open the document containing all new tracks that have been added to iTunes.


main

public static void main(java.lang.String[] args)