Class TLcyMain

All Implemented Interfaces:
ILcyActiveSettable, ILcdPropertyChangeSource, Serializable

public class TLcyMain extends ALcyActiveSettable
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:
  • Constructor Details

    • TLcyMain

      public TLcyMain(String[] args)
  • Method Details

    • setClassTraceOn

      @Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
      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 is true 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 public void setTraceOn(boolean aTraceOn)
      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 either 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.
      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 public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true 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 (see ILcyActiveSettable.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

      public ILcyLucyEnv getLucyEnv()
      Returns the ILcyLucyEnv that was created by this main class.
      Returns:
      the ILcyLucyEnv that was created by this main class.
    • main

      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.

      Parameters:
      args - The command line arguments. See config/lucy/lucy.cfg for the available arguments.
    • main

      public static void main(String[] aArgs, String... aAdditionalArgs)
      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 the aArgs.
      Since:
      2016.1