esmska.integration
Class IntegrationAdapter

java.lang.Object
  extended by esmska.integration.IntegrationAdapter
Direct Known Subclasses:
MacIntegration, WindowsIntegration

public class IntegrationAdapter
extends java.lang.Object

Integration adapter. Used to integrate program more closely to specific operating system.


Field Summary
protected  ActionBean bean
           
 
Constructor Summary
protected IntegrationAdapter()
          Constructor.
 
Method Summary
 void activateGUI()
          Inicialize stuff to handle GUI stuff, adjust GUI for the current envirnonment
 java.io.File getConfigDir(java.io.File defaultConfigDir)
          Get the location of system config directory (not program config directory)
 java.io.File getDataDir(java.io.File defaultDataDir)
          Get the location of system data directory (not program data directory)
static IntegrationAdapter getInstance()
          Return instance of singleton.
 java.io.File getLogFile(java.io.File defaultLogFile)
          Get the location of a program log file
 java.lang.String getProgramDirName(java.lang.String defaultProgramDirName)
          Returns how the program directory in system directories should be named
protected  void initialize()
          Initializes adapter.
 boolean isModalSheetVisible()
          Is some modal sheet of main window visible?
 void registerModalSheet(javax.swing.JDialog dialog)
          Register modal sheet for proper handling.
 void setActionBean(ActionBean bean)
          Set action bean.
 void setSMSCount(java.lang.Integer count)
          Set SMS count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bean

protected ActionBean bean
Constructor Detail

IntegrationAdapter

protected IntegrationAdapter()
Constructor.

Method Detail

getInstance

public static IntegrationAdapter getInstance()
Return instance of singleton.

Returns:
instance

initialize

protected void initialize()
Initializes adapter.


setActionBean

public void setActionBean(ActionBean bean)
Set action bean.

Parameters:
bean - action bean

setSMSCount

public void setSMSCount(java.lang.Integer count)
Set SMS count. Location where to display is platform specific.

Parameters:
count - new sms count. Use null to clear text.

getProgramDirName

public java.lang.String getProgramDirName(java.lang.String defaultProgramDirName)
Returns how the program directory in system directories should be named


getConfigDir

public java.io.File getConfigDir(java.io.File defaultConfigDir)
Get the location of system config directory (not program config directory)


getDataDir

public java.io.File getDataDir(java.io.File defaultDataDir)
Get the location of system data directory (not program data directory)


getLogFile

public java.io.File getLogFile(java.io.File defaultLogFile)
Get the location of a program log file


activateGUI

public void activateGUI()
Inicialize stuff to handle GUI stuff, adjust GUI for the current envirnonment


registerModalSheet

public void registerModalSheet(javax.swing.JDialog dialog)

Register modal sheet for proper handling. Probably usable only on Mac, other OS doesnt have concept of sheet window.

Default implementation does nothing.

Parameters:
dialog - registered dialog

isModalSheetVisible

public boolean isModalSheetVisible()
Is some modal sheet of main window visible?

Returns:
in default implementation, it always return false