Class LaunchModel

  • All Implemented Interfaces:
    xal.tools.data.DataListener

    public class LaunchModel
    extends Object
    implements xal.tools.data.DataListener
    LaunchModel is the main model. It manages the collections of groups and applications.
    Author:
    tap
    • Constructor Detail

      • LaunchModel

        public LaunchModel()
        Constructor
    • Method Detail

      • postModifications

        public void postModifications()
        post modification notice
      • getApplications

        public List<App> getApplications()
        get the applications
      • getRules

        public List<Rule> getRules()
        get rules
      • addNewRuleAt

        public void addNewRuleAt​(int index)
        add a new rule at the specified index or at the end if the index is invalid
      • updateRulePatternAt

        public void updateRulePatternAt​(int index,
                                        String pattern)
        update the rule pattern at the specified location
      • updateRuleExclusionAt

        public void updateRuleExclusionAt​(int index,
                                          boolean exclude)
        update the rule kind at the specified location
      • updateRuleKindAt

        public void updateRuleKindAt​(int index,
                                     String kind)
        update the rule kind at the specified location
      • deleteRuleAt

        public void deleteRuleAt​(int index)
        delete the rule at the specified index
      • refreshApplications

        public void refreshApplications()
        refresh the list of applications
      • launchApplication

        public void launchApplication​(App application)
                               throws Exception
        launch the specified application using the first matching rule
        Throws:
        Exception
      • preConfigure

        public void preConfigure()
        preconfigure the model when initializing without a document file
      • dataLabel

        public String dataLabel()
        provides the name used to identify the class in an external data source.
        Specified by:
        dataLabel in interface xal.tools.data.DataListener
        Returns:
        The tag for this data node.
      • update

        public void update​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to update its data based on the given adaptor.
        Specified by:
        update in interface xal.tools.data.DataListener
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • write

        public void write​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to write its data to the adaptor for external storage.
        Specified by:
        write in interface xal.tools.data.DataListener
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • addLaunchModelListener

        public void addLaunchModelListener​(LaunchModelListener listener)
        Add a listener of LaunchModel events from this instance
        Parameters:
        listener - The listener to add
      • removeLaunchModelListener

        public void removeLaunchModelListener​(LaunchModelListener listener)
        Remove a listener of LaunchModel events from this instance
        Parameters:
        listener - The listener to remove
      • getLauncher

        public Launcher getLauncher()
        Get the launcher
        Returns:
        launcher