org.opensubsystems.core.application
Class ThickClientModuleImpl

java.lang.Object
  extended by org.opensubsystems.core.application.ThickClientModuleImpl
All Implemented Interfaces:
ThickClientModule
Direct Known Subclasses:
ExitModule, SeparatorModule

public abstract class ThickClientModuleImpl
extends java.lang.Object
implements ThickClientModule

Base class for all thick client modules providing basic implementation of common tasks.

Version:
$Id: ThickClientModuleImpl.java,v 1.7 2007/01/07 06:14:39 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/03/13 15:41:59 bastafidli

Field Summary
protected  boolean m_bInitialized
          Flag telling us if the module was already initialized.
protected  ThickClient m_client
          Client using this module.
 
Constructor Summary
ThickClientModuleImpl()
          Constructor
 
Method Summary
 boolean activate(boolean bReactivate)
          Activate the module so that user can interact with it.
 void destroy()
          Destroy the module since the application is shutting down.
 java.lang.Object displayMessage(java.lang.String strTitle, java.lang.String strMessage, java.lang.Object additionalInfo)
          Display message to the user.
 ThickClient getClient()
          Get client displaing this module.
 void init(ThickClient client)
          Initialize the module for a specified client.
 void pasivate()
          Pasivate the module since user no longer interacts with it.
 void refresh()
          Refresh the currently displayed screen of this module with the latest data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensubsystems.core.application.ThickClientModule
getName
 

Field Detail

m_client

protected ThickClient m_client
Client using this module.


m_bInitialized

protected boolean m_bInitialized
Flag telling us if the module was already initialized.

Constructor Detail

ThickClientModuleImpl

public ThickClientModuleImpl()
Constructor

Method Detail

getClient

public ThickClient getClient()
Get client displaing this module.

Specified by:
getClient in interface ThickClientModule
Returns:
ThickClient

init

public void init(ThickClient client)
          throws OSSException
Initialize the module for a specified client. This method may not need to be called immediately after the module is constructed. It may be delayed until the module is actually accesed to speed up start up of application. It must be called before any other lifecycle method in this interface is invoked.

Specified by:
init in interface ThickClientModule
Parameters:
client - - client using this module
Throws:
OSSException - - an error has occured

activate

public boolean activate(boolean bReactivate)
Activate the module so that user can interact with it.

Specified by:
activate in interface ThickClientModule
Parameters:
bReactivate - - this is true if the module was pasivated but it is being immediately activated again because the other module which caused it's pasivation coun't be activated again. This is false if some other module was active and now this module is being activated.
Returns:
boolean - true if sucessfully activated false if cannot be activated and either the previously active module should remain active or no module should be active

pasivate

public void pasivate()
Pasivate the module since user no longer interacts with it.

Specified by:
pasivate in interface ThickClientModule

refresh

public void refresh()
Refresh the currently displayed screen of this module with the latest data. This method will be called for example when user switches between two modules.

Specified by:
refresh in interface ThickClientModule

destroy

public void destroy()
Destroy the module since the application is shutting down.

Specified by:
destroy in interface ThickClientModule

displayMessage

public java.lang.Object displayMessage(java.lang.String strTitle,
                                       java.lang.String strMessage,
                                       java.lang.Object additionalInfo)
Display message to the user.

Specified by:
displayMessage in interface ThickClientModule
Parameters:
strTitle - - title of the message, look at MESSAGE_TITLE_XXX constants in ThickClienGui interface
strMessage - - message to display
additionalInfo - - additional information to pass in, this may be implementation specific, look at MESSAGE_STYLE_XXX constants in ThickClienGui interface
Returns:
Object - result of the message, this may be implementation specific


Copyright © 2003 - 2006 OpenSubsystems s.r.o.