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
>
-
_bSurpressInifileOption
-
-
_clrBackground
-
-
_clrForeground
-
-
_clrListBackground
-
-
_clrListForeground
-
-
_clrListHighlight
-
-
_clrTextBackground
-
-
_clrTextForeground
-
-
_hshKeyValues
-
-
_htOptions
-
-
_max_projects
-
-
_sApplicationName
-
-
_sApplicationPath
-
-
_sAuthor
-
-
_sFileFullName
-
-
_sFullIniFileName
-
-
_sInfoHeader
-
-
_sIniFileContent
-
-
_vArguments
-
-
_vOldFiles
- Reihenfolge der alten Files: ältestes File an Position 0
-
S_FILE_SEPARATOR
-
-
S_INI_SUFFIX
-
-
S_INIFILE_COLORS
-
-
S_INIFILE_COLORS_BACK
-
-
S_INIFILE_COLORS_LISTBACK
-
-
S_INIFILE_COLORS_LISTFORE
-
-
S_INIFILE_COLORS_LISTHIGHLIGHT
-
-
S_INIFILE_HELP
-
-
S_INIFILE_HELP_USAGE
-
-
S_INIFILE_INIT
-
-
S_INIFILE_INIT_AUTHOR
-
-
S_INIFILE_INIT_DEBUG
-
-
S_INIFILE_INIT_FILE
-
-
S_INIFILE_INIT_OLDFILES
-
-
S_INIFILE_SYSTEM_COLORS
-
-
S_OPTION_STRING
-
-
S_PATH_SEPARATOR
-
-
S_PROJECTSUFFIX_KEY
-
-
Init(Exitable, String[], String)
- The ini file will be first looked for in package/exitable.ini
and if not found in package/package.ini.
-
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.
-
_getArchivePath(String)
- If no archive with the same name as the application
was found, "." is returned.
-
_init()
- This was the former Constructor.
-
_saveOldFiles()
-
-
_setClassPath()
- in Classpath relative Pfade durch absolute ersetzen
Deprecated.
-
colorToString(Color)
-
-
getApplicationName()
- The first char is upper case (like "Project").
-
getApplicationPath()
-
-
getArguments()
-
-
getArgumentsElements()
-
-
getAuthor()
-
-
getBackground()
-
-
getFileFullName()
-
-
getFileName()
- First char is upper case, the rest lower case.
-
getFilePath()
-
-
getForeground()
-
-
getInfoHeader()
-
-
getKeyValue(String)
-
-
getKeyValue(String, String)
-
-
getListBackground()
-
-
getListForeground()
-
-
getListHighlight()
-
-
getOldFileFullName(String)
-
-
getOldFilesElements()
-
-
getOldFilesSize()
-
-
getOptions()
-
-
getProjectSuffixKey()
-
-
getRelease()
-
-
getVersion()
-
-
getVersionDate()
-
-
getVersionString()
-
-
getVersionTime()
-
-
makeThisFileOld()
- This method stores the actual file in the old file vector,
no saving or anything else like removing double fils.
-
printHelpMessage()
-
-
setAuthor(String)
-
-
setBackground(Color)
-
-
setFileFullName(String)
- For File->New use "" or null for sFileFullName_.
-
setKeyValue(String, int)
-
-
setKeyValue(String, String)
-
-
setKeyValue(String, String, String)
-
-
setListBackground(Color)
-
-
setListForeground(Color)
-
-
setListHighlight(Color)
-
S_PROJECTSUFFIX_KEY
private static final String S_PROJECTSUFFIX_KEY
S_INI_SUFFIX
private String S_INI_SUFFIX
S_INIFILE_INIT
private String S_INIFILE_INIT
S_INIFILE_INIT_FILE
private String S_INIFILE_INIT_FILE
S_INIFILE_INIT_OLDFILES
private String S_INIFILE_INIT_OLDFILES
S_INIFILE_INIT_DEBUG
private String S_INIFILE_INIT_DEBUG
S_INIFILE_INIT_AUTHOR
private String S_INIFILE_INIT_AUTHOR
S_INIFILE_HELP
private String S_INIFILE_HELP
S_INIFILE_HELP_USAGE
private String S_INIFILE_HELP_USAGE
S_INIFILE_COLORS
private String S_INIFILE_COLORS
S_INIFILE_SYSTEM_COLORS
private String S_INIFILE_SYSTEM_COLORS
S_INIFILE_COLORS_BACK
private String S_INIFILE_COLORS_BACK
S_INIFILE_COLORS_LISTBACK
private String S_INIFILE_COLORS_LISTBACK
S_INIFILE_COLORS_LISTFORE
private String S_INIFILE_COLORS_LISTFORE
S_INIFILE_COLORS_LISTHIGHLIGHT
private String S_INIFILE_COLORS_LISTHIGHLIGHT
S_OPTION_STRING
private String S_OPTION_STRING
_max_projects
private int _max_projects
_sInfoHeader
private String _sInfoHeader
_clrBackground
private Color _clrBackground
_clrForeground
private Color _clrForeground
_clrListBackground
private Color _clrListBackground
_clrListForeground
private Color _clrListForeground
_clrListHighlight
private Color _clrListHighlight
_clrTextBackground
private Color _clrTextBackground
_clrTextForeground
private Color _clrTextForeground
_sAuthor
private String _sAuthor
_sFileFullName
private String _sFileFullName
_sApplicationName
private String _sApplicationName
_sApplicationPath
private String _sApplicationPath
_sFullIniFileName
private String _sFullIniFileName
S_FILE_SEPARATOR
public static final String S_FILE_SEPARATOR
S_PATH_SEPARATOR
private static final String S_PATH_SEPARATOR
_hshKeyValues
private Hashtable _hshKeyValues
_htOptions
private Hashtable _htOptions
_vArguments
private Vector _vArguments
_vOldFiles
private Vector _vOldFiles
- Reihenfolge der alten Files: ältestes File an Position 0
_bSurpressInifileOption
private boolean _bSurpressInifileOption
_sIniFileContent
private String _sIniFileContent
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.
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.
_getArchivePath
private String _getArchivePath(String sApplicationName_)
- If no archive with the same name as the application
was found, "." is returned.
_setClassPath
private void _setClassPath()
- Note: _setClassPath() is deprecated.
Use FileUtil.getAbsolutePathList(String) instead.
- in Classpath relative Pfade durch absolute ersetzen
_init
private void _init()
- This was the former Constructor.
Init colors and stuff.
- See Also:
-
printHelpMessage
public void printHelpMessage()
setKeyValue
public synchronized boolean setKeyValue(String sKey_,
int value_)
- Returns:
- true on error.
setKeyValue
public synchronized boolean setKeyValue(String sKey_,
String sValue_)
- Returns:
- true on error.
setKeyValue
public synchronized boolean setKeyValue(String sSection_,
String sKey_,
String sValue_)
- Returns:
- true on error.
getArguments
public Vector getArguments()
getOptions
public Hashtable getOptions()
getArgumentsElements
public Enumeration getArgumentsElements()
getKeyValue
public synchronized String getKeyValue(String sSection_,
String sKey_)
getKeyValue
public synchronized String getKeyValue(String sKey_)
getInfoHeader
public String getInfoHeader()
- See Also:
- getVersionString
getBackground
public Color getBackground()
getForeground
public Color getForeground()
getListBackground
public Color getListBackground()
getListForeground
public Color getListForeground()
getListHighlight
public Color getListHighlight()
colorToString
public String colorToString(Color pColor_)
setBackground
public void setBackground(Color pColor_)
setListBackground
public void setListBackground(Color pColor_)
setListForeground
public void setListForeground(Color pColor_)
setListHighlight
public void setListHighlight(Color pColor_)
getApplicationName
public String getApplicationName()
- The first char is upper case (like "Project").
getApplicationPath
public String getApplicationPath()
- Returns:
- for example: "/home/clemens/src/java/jacob"
_saveOldFiles
private void _saveOldFiles()
setFileFullName
public boolean setFileFullName(String sFileFullName_)
- For File->New use "" or null for sFileFullName_.
- Returns:
- IniFile status.
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
getFileFullName
public String getFileFullName()
getFilePath
public String getFilePath()
- Returns:
- File separator is '/' and the path ends with a file
separator char.
getOldFilesElements
public Enumeration getOldFilesElements()
getOldFilesSize
public int getOldFilesSize()
getOldFileFullName
public String getOldFileFullName(String string)
makeThisFileOld
public void makeThisFileOld()
- This method stores the actual file in the old file vector,
no saving or anything else like removing double fils.
getVersionString
public String getVersionString()
getVersion
public int getVersion()
getRelease
public int getRelease()
getVersionDate
public String getVersionDate()
- Returns:
- The right language is automaticly used.
getVersionTime
public String getVersionTime()
getProjectSuffixKey
public static String getProjectSuffixKey()
getAuthor
public String getAuthor()
setAuthor
public void setAuthor(String sAuthor_)
All Packages Class Hierarchy This Package Previous Next Index