Package com.luciad.lucy
Class TLcyMain
java.lang.Object
com.luciad.lucy.gui.ALcyActiveSettable
com.luciad.lucy.TLcyMain
- All Implemented Interfaces:
ILcyActiveSettable
,ILcdPropertyChangeSource
,Serializable
Lucy's default frontend. This is the main class to start Lucy.
It extends
ALcyActiveSettable
, and can therefore be used as a menu
item of another application, that activates/deactivates Lucy by using
setActive(boolean)
.- See Also:
-
Field Summary
Fields inherited from interface com.luciad.lucy.gui.ILcyActiveSettable
DEFAULT, LONG_DESCRIPTION, NAME, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, SMALL_SELECTED_ICON, VISIBLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns theILcyLucyEnv
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
Deprecated.This method has been deprecated.static void
Creates a new TLcyMain instance and invokes setActive( true ).static void
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.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.Methods inherited from class com.luciad.lucy.gui.ALcyActiveSettable
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, putValue, removePropertyChangeListener, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription
-
Constructor Details
-
TLcyMain
-
-
Method Details
-
setClassTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Parameters:
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.
-
isTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
isActive
public boolean isActive()Description copied from interface:ILcyActiveSettable
Returns true if the state of this object is active, false if the state is inactive. As for every property: whenever the return value of this method changes, a property change event must be fired (seeILcyActiveSettable.setActive(boolean)
).- Returns:
- true if the state of this object is active, false if the state is inactive.
- See Also:
-
setActive
public void setActive(boolean aActive) Description copied from interface:ILcyActiveSettable
Sets the active state of this object. When the new state is different from the previous state, a certain action will need to be performed. Also a property change event will be fired in such a case. If no property change event is fired, synchronization between this ILcyActiveSettable and the GUI widget representing it will probably fail (e.g. the checkbox will not change state). Note: refer to Implementing Bound Property Support Within a Bean for an example about firing a property change.- Parameters:
aActive
- True if the new state is active, false if the new state is inactive.- See Also:
-
getLucyEnv
Returns theILcyLucyEnv
that was created by this main class.- Returns:
- the
ILcyLucyEnv
that was created by this main class.
-
main
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
If a property is specified in both the properties file and command line, the command line value of the property will be used.-properties propertiesFileName
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.- Parameters:
args
- The command line arguments. Seeconfig/lucy/lucy.cfg
for the available arguments.
-
main
Convenience method to make it easy to programmatically append additional arguments to the main method. A typical use case is to start with a custom add-ons file:public class MyMain { public static void main(String[] aArgs) { TLcyMain.main(aArgs, "-addons", "myapp/my_addons.xml"); } }
- Parameters:
aArgs
- The original arguments (the command line arguments).aAdditionalArgs
- The additional arguments, to be appended to theaArgs
.- Since:
- 2016.1
-