net.sf.genuine.organizer.internal
Class DefaultHelperService

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.DefaultHelperService
All Implemented Interfaces:
HelperService, InternalHelperService

public class DefaultHelperService
extends java.lang.Object
implements InternalHelperService

Default implementation of helper service.

Author:
Tim Wellhausen

Constructor Summary
DefaultHelperService()
           
 
Method Summary
 void setDesktopComponents(java.awt.Frame mainFrame, javax.swing.JLabel infoLabel)
          Takes the info label
 void showException(java.lang.Exception e)
          Shows the error message of an exception in a dialog.
 java.lang.String showMessage(ResourceItem resourceItem)
          Creates a message and shows it.
 java.lang.String showMessage(ResourceItem resourceItem, java.lang.Object[] parameters)
          Creates a message including the given parameters and shows the message.
 java.lang.String showMessage(java.lang.String resourceItemName)
          Fetches the resource item, creates a message and shows it.
 java.lang.String showMessage(java.lang.String resourceItemName, java.lang.Object[] parameters)
          Fetches the resource item, creates a message including the given parameters and shows the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHelperService

public DefaultHelperService()
Method Detail

setDesktopComponents

public void setDesktopComponents(java.awt.Frame mainFrame,
                                 javax.swing.JLabel infoLabel)
Takes the info label

Specified by:
setDesktopComponents in interface InternalHelperService

showException

public void showException(java.lang.Exception e)
Shows the error message of an exception in a dialog.

Specified by:
showException in interface HelperService
Parameters:
e - The exception to be shown.

showMessage

public java.lang.String showMessage(java.lang.String resourceItemName)
Fetches the resource item, creates a message and shows it.

Specified by:
showMessage in interface HelperService
Parameters:
resourceItemName - The name of a resource item that is fetched using the ResourceManager. The resource item has to contain the properties of the message to be shown
Returns:
If a status message was shown, null is returned. If a message box was shown, the name of the resource item that is associated with the button the user has pressed is returned.

showMessage

public java.lang.String showMessage(ResourceItem resourceItem)
Creates a message and shows it.

Specified by:
showMessage in interface HelperService
Parameters:
resourceItem - A resource item that contains the properties of the message to be shown
Returns:
If a status message was shown, null is returned. If a message box was shown, the name of the resource item that is associated with the button the user has pressed is returned.

showMessage

public java.lang.String showMessage(java.lang.String resourceItemName,
                                    java.lang.Object[] parameters)
Fetches the resource item, creates a message including the given parameters and shows the message.

Specified by:
showMessage in interface HelperService
Parameters:
resourceItemName - The name of a resource item that is fetched using the ResourceManager. The resource item has to contain the properties of the message to be shown
parameters - An array of objects that is inserted into the message as parameters as defined by MessageFormat.
Returns:
If a status message was shown, null is returned. If a message box was shown, the name of the resource item that is associated with the button the user has pressed is returned.

showMessage

public java.lang.String showMessage(ResourceItem resourceItem,
                                    java.lang.Object[] parameters)
Creates a message including the given parameters and shows the message.

Specified by:
showMessage in interface HelperService
Parameters:
resourceItem - A resource item that contains the properties of the message to be shown
parameters - An array of objects that is inserted into the message as parameters as defined by MessageFormat.
Returns:
If a status message was shown, null is returned. If a message box was shown, the name of the resource item that is associated with the button the user has pressed is returned.