|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ccl.util.Init
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.
Constructor Summary | |
protected |
Init()
Used only by the Init.clone method. |
|
Init(Exitable pExitable_,
java.lang.String[] asArg_,
java.lang.String sInfoHeader_)
The ini file will be first looked for in package/exitable.ini and if not found in package/package.ini. |
|
Init(Exitable pExitable_,
java.lang.String[] asArg_,
java.lang.String sInfoHeader_,
java.lang.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. |
Method Summary | |
java.lang.Object |
clone()
Return a copy of this object. |
java.lang.String |
colorToString(java.awt.Color pColor_)
|
java.lang.String |
createBackupFile()
Create a backup of the ini file. |
java.lang.String |
getApplicationDocPath()
Return location of doc directory for this application. |
java.lang.String |
getApplicationName()
The first char is upper case (like "Project"). |
java.lang.String |
getApplicationPath()
|
static java.lang.String |
getApplicationPath(java.lang.String sApplicationName,
java.lang.String sPackageName,
java.lang.String sClassPath)
Get Application Path. |
java.util.Vector |
getArguments()
|
java.util.Enumeration |
getArgumentsElements()
|
java.lang.String |
getAuthor()
|
java.awt.Color |
getBackground()
|
java.lang.String |
getFileFullName()
|
java.lang.String |
getFileName()
First char is upper case, the rest lower case. |
java.lang.String |
getFilePath()
Deprecated. |
java.awt.Color |
getForeground()
|
java.lang.String |
getHelpBrokerURL()
Return location of the help set documentation file for this application. |
java.lang.String |
getHelpMessage()
|
java.lang.String |
getInfoHeader()
|
java.lang.String |
getKeyValue(java.lang.String sKey_)
|
java.lang.String |
getKeyValue(java.lang.String sSection_,
java.lang.String sKey_)
|
java.awt.Color |
getListBackground()
|
java.awt.Color |
getListForeground()
|
java.awt.Color |
getListHighlight()
|
java.lang.String |
getOldFileFullName(java.lang.String string)
|
java.util.Enumeration |
getOldFilesElements()
|
int |
getOldFilesSize()
|
java.util.Hashtable |
getOptions()
|
java.lang.String |
getProjectHome()
Returns the directory of the current projects file. |
static java.lang.String |
getProjectSuffixKey()
|
int |
getRelease()
|
int |
getVersion()
|
java.lang.String |
getVersionDate()
|
java.lang.String |
getVersionString()
|
java.lang.String |
getVersionTime()
|
void |
makeThisFileOld()
This method stores the actual file in the old file vector, no saving or anything else like removing double fils. |
void |
printHelpMessage()
|
void |
setApplicationName(java.lang.String sApplicationName_)
Set the application name explicitly. |
void |
setAuthor(java.lang.String sAuthor_)
|
void |
setBackground(java.awt.Color pColor_)
|
boolean |
setFileFullName(java.lang.String sFileFullName_)
For File->New use "" or null for sFileFullName_. |
boolean |
setKeyValue(java.lang.String sKey_,
int value_)
|
boolean |
setKeyValue(java.lang.String sKey_,
java.lang.String sValue_)
|
boolean |
setKeyValue(java.lang.String sSection_,
java.lang.String sKey_,
java.lang.String sValue_)
|
void |
setListBackground(java.awt.Color pColor_)
|
void |
setListForeground(java.awt.Color pColor_)
|
void |
setListHighlight(java.awt.Color pColor_)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Init(Exitable pExitable_, java.lang.String[] asArg_, java.lang.String sInfoHeader_, java.lang.String sIniFileContent_)
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.
pExitable_
- the controlling application object.asArg_
- the original command line arguments forwarded
from the main method.sInfoHeader_
- an RCS Header string from the application
Main class.sIniFileContent_
- default content for an ini file.public Init(Exitable pExitable_, java.lang.String[] asArg_, java.lang.String sInfoHeader_)
pExitable_
- the controlling application object.asArg_
- the original command line arguments forwarded
from the main method.sInfoHeader_
- an RCS Header string from the application
Main class.protected Init()
Method Detail |
public static java.lang.String getApplicationPath(java.lang.String sApplicationName, java.lang.String sPackageName, java.lang.String sClassPath)
public java.lang.String getHelpMessage()
public void printHelpMessage()
public boolean setKeyValue(java.lang.String sKey_, int value_)
public boolean setKeyValue(java.lang.String sKey_, java.lang.String sValue_)
public boolean setKeyValue(java.lang.String sSection_, java.lang.String sKey_, java.lang.String sValue_)
public java.util.Vector getArguments()
public java.util.Hashtable getOptions()
public java.util.Enumeration getArgumentsElements()
public java.lang.String getKeyValue(java.lang.String sSection_, java.lang.String sKey_)
public java.lang.String getKeyValue(java.lang.String sKey_)
public java.lang.String getInfoHeader()
getVersionString()
public java.awt.Color getBackground()
public java.awt.Color getForeground()
public java.awt.Color getListBackground()
public java.awt.Color getListForeground()
public java.awt.Color getListHighlight()
public java.lang.String colorToString(java.awt.Color pColor_)
public void setBackground(java.awt.Color pColor_)
public void setListBackground(java.awt.Color pColor_)
public void setListForeground(java.awt.Color pColor_)
public void setListHighlight(java.awt.Color pColor_)
public void setApplicationName(java.lang.String sApplicationName_)
public java.lang.String getApplicationName()
public java.lang.String getApplicationPath()
public java.lang.String getHelpBrokerURL()
public java.lang.String getApplicationDocPath()
public boolean setFileFullName(java.lang.String sFileFullName_)
public java.lang.String getFileName()
getFileFullName()
,
getFilePath()
public java.lang.String getFileFullName()
public java.lang.String getFilePath()
getProjectHome()
public java.lang.String getProjectHome()
public java.util.Enumeration getOldFilesElements()
public int getOldFilesSize()
public java.lang.String getOldFileFullName(java.lang.String string)
public void makeThisFileOld()
public java.lang.String getVersionString()
public int getVersion()
public int getRelease()
public java.lang.String getVersionDate()
public java.lang.String getVersionTime()
public static java.lang.String getProjectSuffixKey()
public java.lang.String getAuthor()
public void setAuthor(java.lang.String sAuthor_)
public java.lang.String createBackupFile()
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |