com.jbbres.lib.actions.workflow
Class WorkflowDefinitionMessageNotification

java.lang.Object
  extended by com.jbbres.lib.actions.workflow.AbstractWorkflowDefinitionNotification
      extended by com.jbbres.lib.actions.workflow.WorkflowDefinitionMessageNotification
All Implemented Interfaces:
WorkflowDefinitionNotification

public class WorkflowDefinitionMessageNotification
extends AbstractWorkflowDefinitionNotification

A default implementation of WorkflowDefinitionNotification.

Notifications based on this class do not have an operation associated.

Since:
1.1.0
Version:
1.1.0
Author:
Jean-Baptiste Bres

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jbbres.lib.actions.workflow.AbstractWorkflowDefinitionNotification
AbstractWorkflowDefinitionNotification.MessageType
 
Constructor Summary
WorkflowDefinitionMessageNotification(java.lang.String message)
          Instantiates a new notification.
WorkflowDefinitionMessageNotification(java.lang.String message, AbstractWorkflowDefinitionNotification.MessageType messageType)
          Instantiates a new notification.
WorkflowDefinitionMessageNotification(java.lang.String message, javax.swing.Icon icon)
          Instantiates a new notification.
 
Method Summary
 void dismiss()
          This method is called when the message is dismissed by the user.
 boolean hasAssociatedOperation()
          Returns true if an operation is associated to the notification.
 boolean runAssociatedOperation()
          Executes the operation associated to the notification.
 
Methods inherited from class com.jbbres.lib.actions.workflow.AbstractWorkflowDefinitionNotification
getIcon, getMessage, getMessageType, setIcon, setMessage, setMessageType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowDefinitionMessageNotification

public WorkflowDefinitionMessageNotification(java.lang.String message)
Instantiates a new notification.

Parameters:
message - the message

WorkflowDefinitionMessageNotification

public WorkflowDefinitionMessageNotification(java.lang.String message,
                                             javax.swing.Icon icon)
Instantiates a new notification.

Parameters:
message - the message
icon - the icon

WorkflowDefinitionMessageNotification

public WorkflowDefinitionMessageNotification(java.lang.String message,
                                             AbstractWorkflowDefinitionNotification.MessageType messageType)
Instantiates a new notification.

Parameters:
message - the message
messageType - the message type
Method Detail

hasAssociatedOperation

public boolean hasAssociatedOperation()
Description copied from interface: WorkflowDefinitionNotification
Returns true if an operation is associated to the notification. An operation is a piece of code that is executed when the user click on the notification panel. The code can be defined in the WorkflowDefinitionNotification.runAssociatedOperation() method.

Returns:
true if an operation is associated to the notification.

runAssociatedOperation

public boolean runAssociatedOperation()
Description copied from interface: WorkflowDefinitionNotification
Executes the operation associated to the notification. An operation is a piece of code that is executed when the user click on the notification panel.

Returns:
true if the operation has been successfully performed. In this case the notification will disappear. If the result of this method is false the notification stays visible.

dismiss

public void dismiss()
Description copied from interface: WorkflowDefinitionNotification
This method is called when the message is dismissed by the user. If the message is removed for another reason (call of WorkflowDefinitionNotification.runAssociatedOperation(), change in the workflow definition...), this method is not called.



To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.