public class TLcyMain extends ALcyActiveSettable
ALcyActiveSettable
, and can therefore be used as a menu
item of another application, that activates/deactivates Lucy by using
setActive(boolean)
.main(String[])
,
Serialized FormDEFAULT, LONG_DESCRIPTION, NAME, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, SMALL_SELECTED_ICON, VISIBLE
Modifier and Type | Method and Description |
---|---|
ILcyLucyEnv |
getLucyEnv()
Returns the
ILcyLucyEnv that was created by this main class. |
boolean |
isActive()
Returns true if the state of this object is active, false if the state is inactive.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
static void |
main(String[] args)
Creates a new TLcyMain instance and invokes setActive( true ).
|
static void |
main(String[] aArgs,
String... aAdditionalArgs)
Convenience method to make it easy to programmatically append additional arguments to the main method.
|
void |
setActive(boolean aActive)
Sets the active state of this object.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, putValue, removePropertyChangeListener, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription
public TLcyMain(String[] args)
@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.@Deprecated public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.@Deprecated public boolean isTraceOn()
true
if tracing is enabled for this class.public boolean isActive()
ILcyActiveSettable
ILcyActiveSettable.setActive(boolean)
).ILcyActiveSettable.setActive(boolean)
public void setActive(boolean aActive)
ILcyActiveSettable
aActive
- True if the new state is active, false if the new state is inactive.ILcyActiveSettable.isActive()
public ILcyLucyEnv getLucyEnv()
ILcyLucyEnv
that was created by this main class.ILcyLucyEnv
that was created by this main class.public static void main(String[] args)
Creates a new TLcyMain instance and invokes setActive( true ).
The main class recognizes command line arguments, and the same arguments can also be specified in a java properties file. The name of this properties file is by default lucy/lucy.cfg (relative to the classpath). The name of this properties file can be specified using
-properties propertiesFileName
If a property is specified in both the properties
file and command line, the command line value of the property will be used.
The format for command line parameters is like this:
Lucy.* -option1 [value1] -option2 [value2] File1 File2 ...
For example, to specify the addons file to load, type:
Lucy.* -addons my_addons.xml
The specified files are loaded after application startup, using the
TLcyDataFormatManager
. The available options are
documented in the lucy/lucy.cfg properties file that comes with Lucy.
args
- The command line arguments.
See config/lucy/lucy.cfg
for the available arguments.public static void main(String[] aArgs, String... aAdditionalArgs)
public class MyMain {
public static void main(String[] aArgs) {
TLcyMain.main(aArgs, "-addons", "myapp/my_addons.xml");
}
}
aArgs
- The original arguments (the command line arguments).aAdditionalArgs
- The additional arguments, to be appended to the aArgs
.