All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ccl.util.Init

java.lang.Object
   |
   +----ccl.util.Init

public class Init
extends Object
Manages the ini file and configuration stuff for an application. Right now localisation of ini file does not work with src and classes directory separation. When the ini file is inside an archive, user can't change the ini file values. In the future there should be one application ini file that can be located like a resource and a user ini file located in the user's home directory.

Version:
$Id: Init.java,v 1.41 2000/05/14 14:30:35 clemens Exp clemens $
Author:
Chr. Clemens Lee < clemens@kclee.com >

Variable Index

 o _bSurpressInifileOption
 o _clrBackground
 o _clrForeground
 o _clrListBackground
 o _clrListForeground
 o _clrListHighlight
 o _clrTextBackground
 o _clrTextForeground
 o _hshKeyValues
 o _htOptions
 o _max_projects
 o _sApplicationName
 o _sApplicationPath
 o _sAuthor
 o _sFileFullName
 o _sFullIniFileName
 o _sInfoHeader
 o _sIniFileContent
 o _vArguments
 o _vOldFiles
Reihenfolge der alten Files: ältestes File an Position 0
 o S_FILE_SEPARATOR
 o S_INI_SUFFIX
 o S_INIFILE_COLORS
 o S_INIFILE_COLORS_BACK
 o S_INIFILE_COLORS_LISTBACK
 o S_INIFILE_COLORS_LISTFORE
 o S_INIFILE_COLORS_LISTHIGHLIGHT
 o S_INIFILE_HELP
 o S_INIFILE_HELP_USAGE
 o S_INIFILE_INIT
 o S_INIFILE_INIT_AUTHOR
 o S_INIFILE_INIT_DEBUG
 o S_INIFILE_INIT_FILE
 o S_INIFILE_INIT_OLDFILES
 o S_INIFILE_SYSTEM_COLORS
 o S_OPTION_STRING
 o S_PATH_SEPARATOR
 o S_PROJECTSUFFIX_KEY

Constructor Index

 o Init(Exitable, String[], String)
The ini file will be first looked for in package/exitable.ini and if not found in package/package.ini.
 o Init(Exitable, String[], String, String)
If sIniFileContent_ is null for the ini file will be first looked for in package/exitable.ini and if not found in package/package.ini.

Method Index

 o _getArchivePath(String)
If no archive with the same name as the application was found, "." is returned.
 o _init()
This was the former Constructor.
 o _saveOldFiles()
 o _setClassPath()
in Classpath relative Pfade durch absolute ersetzen Deprecated.
 o colorToString(Color)
 o getApplicationName()
The first char is upper case (like "Project").
 o getApplicationPath()
 o getArguments()
 o getArgumentsElements()
 o getAuthor()
 o getBackground()
 o getFileFullName()
 o getFileName()
First char is upper case, the rest lower case.
 o getFilePath()
 o getForeground()
 o getInfoHeader()
 o getKeyValue(String)
 o getKeyValue(String, String)
 o getListBackground()
 o getListForeground()
 o getListHighlight()
 o getOldFileFullName(String)
 o getOldFilesElements()
 o getOldFilesSize()
 o getOptions()
 o getProjectSuffixKey()
 o getRelease()
 o getVersion()
 o getVersionDate()
 o getVersionString()
 o getVersionTime()
 o makeThisFileOld()
This method stores the actual file in the old file vector, no saving or anything else like removing double fils.
 o printHelpMessage()
 o setAuthor(String)
 o setBackground(Color)
 o setFileFullName(String)
For File->New use "" or null for sFileFullName_.
 o setKeyValue(String, int)
 o setKeyValue(String, String)
 o setKeyValue(String, String, String)
 o setListBackground(Color)
 o setListForeground(Color)
 o setListHighlight(Color)

Variables

 o S_PROJECTSUFFIX_KEY
 private static final String S_PROJECTSUFFIX_KEY
 o S_INI_SUFFIX
 private String S_INI_SUFFIX
 o S_INIFILE_INIT
 private String S_INIFILE_INIT
 o S_INIFILE_INIT_FILE
 private String S_INIFILE_INIT_FILE
 o S_INIFILE_INIT_OLDFILES
 private String S_INIFILE_INIT_OLDFILES
 o S_INIFILE_INIT_DEBUG
 private String S_INIFILE_INIT_DEBUG
 o S_INIFILE_INIT_AUTHOR
 private String S_INIFILE_INIT_AUTHOR
 o S_INIFILE_HELP
 private String S_INIFILE_HELP
 o S_INIFILE_HELP_USAGE
 private String S_INIFILE_HELP_USAGE
 o S_INIFILE_COLORS
 private String S_INIFILE_COLORS
 o S_INIFILE_SYSTEM_COLORS
 private String S_INIFILE_SYSTEM_COLORS
 o S_INIFILE_COLORS_BACK
 private String S_INIFILE_COLORS_BACK
 o S_INIFILE_COLORS_LISTBACK
 private String S_INIFILE_COLORS_LISTBACK
 o S_INIFILE_COLORS_LISTFORE
 private String S_INIFILE_COLORS_LISTFORE
 o S_INIFILE_COLORS_LISTHIGHLIGHT
 private String S_INIFILE_COLORS_LISTHIGHLIGHT
 o S_OPTION_STRING
 private String S_OPTION_STRING
 o _max_projects
 private int _max_projects
 o _sInfoHeader
 private String _sInfoHeader
 o _clrBackground
 private Color _clrBackground
 o _clrForeground
 private Color _clrForeground
 o _clrListBackground
 private Color _clrListBackground
 o _clrListForeground
 private Color _clrListForeground
 o _clrListHighlight
 private Color _clrListHighlight
 o _clrTextBackground
 private Color _clrTextBackground
 o _clrTextForeground
 private Color _clrTextForeground
 o _sAuthor
 private String _sAuthor
 o _sFileFullName
 private String _sFileFullName
 o _sApplicationName
 private String _sApplicationName
 o _sApplicationPath
 private String _sApplicationPath
 o _sFullIniFileName
 private String _sFullIniFileName
 o S_FILE_SEPARATOR
 public static final String S_FILE_SEPARATOR
 o S_PATH_SEPARATOR
 private static final String S_PATH_SEPARATOR
 o _hshKeyValues
 private Hashtable _hshKeyValues
 o _htOptions
 private Hashtable _htOptions
 o _vArguments
 private Vector _vArguments
 o _vOldFiles
 private Vector _vOldFiles
Reihenfolge der alten Files: ältestes File an Position 0

 o _bSurpressInifileOption
 private boolean _bSurpressInifileOption
 o _sIniFileContent
 private String _sIniFileContent

Constructors

 o Init
 public Init(Exitable pExitable_,
             String asArg_[],
             String sInfoHeader_,
             String sIniFileContent_)
If sIniFileContent_ is null for the ini file will be first looked for in package/exitable.ini and if not found in package/package.ini. Following some implementation details: If the sIniFileContent_ parameter is set, this will be used when reading ini content. All relative elements in the classpath will be exchanged with their absolute counter parts. Ini file location: 1. Set by user as option.

 o Init
 public Init(Exitable pExitable_,
             String asArg_[],
             String sInfoHeader_)
The ini file will be first looked for in package/exitable.ini and if not found in package/package.ini.

Methods

 o _getArchivePath
 private String _getArchivePath(String sApplicationName_)
If no archive with the same name as the application was found, "." is returned.

 o _setClassPath
 private void _setClassPath()
Note: _setClassPath() is deprecated. Use FileUtil.getAbsolutePathList(String) instead.

in Classpath relative Pfade durch absolute ersetzen

 o _init
 private void _init()
This was the former Constructor. Init colors and stuff.

See Also:
 o printHelpMessage
 public void printHelpMessage()
 o setKeyValue
 public synchronized boolean setKeyValue(String sKey_,
                                         int value_)
Returns:
true on error.
 o setKeyValue
 public synchronized boolean setKeyValue(String sKey_,
                                         String sValue_)
Returns:
true on error.
 o setKeyValue
 public synchronized boolean setKeyValue(String sSection_,
                                         String sKey_,
                                         String sValue_)
Returns:
true on error.
 o getArguments
 public Vector getArguments()
 o getOptions
 public Hashtable getOptions()
 o getArgumentsElements
 public Enumeration getArgumentsElements()
 o getKeyValue
 public synchronized String getKeyValue(String sSection_,
                                        String sKey_)
 o getKeyValue
 public synchronized String getKeyValue(String sKey_)
 o getInfoHeader
 public String getInfoHeader()
See Also:
getVersionString
 o getBackground
 public Color getBackground()
 o getForeground
 public Color getForeground()
 o getListBackground
 public Color getListBackground()
 o getListForeground
 public Color getListForeground()
 o getListHighlight
 public Color getListHighlight()
 o colorToString
 public String colorToString(Color pColor_)
 o setBackground
 public void setBackground(Color pColor_)
 o setListBackground
 public void setListBackground(Color pColor_)
 o setListForeground
 public void setListForeground(Color pColor_)
 o setListHighlight
 public void setListHighlight(Color pColor_)
 o getApplicationName
 public String getApplicationName()
The first char is upper case (like "Project").

 o getApplicationPath
 public String getApplicationPath()
Returns:
for example: "/home/clemens/src/java/jacob"
 o _saveOldFiles
 private void _saveOldFiles()
 o setFileFullName
 public boolean setFileFullName(String sFileFullName_)
For File->New use "" or null for sFileFullName_.

Returns:
IniFile status.
 o getFileName
 public String getFileName()
First char is upper case, the rest lower case. Only the name is returned, no path or file postfix information is given.

See Also:
getFileFullName, getFilePath
 o getFileFullName
 public String getFileFullName()
 o getFilePath
 public String getFilePath()
Returns:
File separator is '/' and the path ends with a file separator char.
 o getOldFilesElements
 public Enumeration getOldFilesElements()
 o getOldFilesSize
 public int getOldFilesSize()
 o getOldFileFullName
 public String getOldFileFullName(String string)
 o makeThisFileOld
 public void makeThisFileOld()
This method stores the actual file in the old file vector, no saving or anything else like removing double fils.

 o getVersionString
 public String getVersionString()
 o getVersion
 public int getVersion()
 o getRelease
 public int getRelease()
 o getVersionDate
 public String getVersionDate()
Returns:
The right language is automaticly used.
 o getVersionTime
 public String getVersionTime()
 o getProjectSuffixKey
 public static String getProjectSuffixKey()
 o getAuthor
 public String getAuthor()
 o setAuthor
 public void setAuthor(String sAuthor_)

All Packages  Class Hierarchy  This Package  Previous  Next  Index