Package esmska.integration
Class IntegrationAdapter
- java.lang.Object
-
- esmska.integration.IntegrationAdapter
-
- Direct Known Subclasses:
MacIntegration,WindowsIntegration
public class IntegrationAdapter extends java.lang.ObjectIntegration adapter. Used to integrate program more closely to specific operating system.
-
-
Field Summary
Fields Modifier and Type Field Description protected ActionBeanbean
-
Constructor Summary
Constructors Modifier Constructor Description protectedIntegrationAdapter()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateGUI()Inicialize stuff to handle GUI stuff, adjust GUI for the current envirnonmentjava.io.FilegetConfigDir(java.io.File defaultConfigDir)Get the location of system config directory (not program config directory)java.io.FilegetDataDir(java.io.File defaultDataDir)Get the location of system data directory (not program data directory)java.io.FilegetGatewayDir(java.io.File defaultDir)static IntegrationAdaptergetInstance()Return instance of singleton.java.io.FilegetLogFile(java.io.File defaultLogFile)Get the location of a program log filejava.lang.StringgetProgramDirName(java.lang.String defaultProgramDirName)Returns how the program directory in system directories should be namedprotected voidinitialize()Initializes adapter.booleanisModalSheetVisible()Is some modal sheet of main window visible?voidregisterModalSheet(javax.swing.JDialog dialog)Register modal sheet for proper handling.voidsetActionBean(ActionBean bean)Set action bean.voidsetSMSCount(java.lang.Integer count)Set SMS count.
-
-
-
Field Detail
-
bean
protected ActionBean bean
-
-
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)
-
getGatewayDir
public java.io.File getGatewayDir(java.io.File defaultDir)
-
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
-
-