Package weka.gui

Class AbstractGUIApplication

    • Constructor Detail

      • AbstractGUIApplication

        public AbstractGUIApplication()
        Default constructor
      • AbstractGUIApplication

        public AbstractGUIApplication​(boolean layoutComponent,
                                      String[] allowedPerspectiveClassPrefixes,
                                      String[] disallowedPerspectiveClassPrefixes)
        Constructor
        Parameters:
        layoutComponent - true if the application should layout the component with the "default" layout - i.e. the perspectives toolbar at the north of a BorderLayout and the PerspectiveManager at the center
        allowedPerspectiveClassPrefixes - Perspectives (loaded via the PluginManager) whose fully qualified class names start with these prefixes will be displayed in this application
        disallowedPerspectiveClassPrefixes - Perspectives (loaded via the PluginManager) whose fully qualified class names start with these prefixes will not be displayed in this application. Note that disallowedPerspectiveClassPrefixes override allowedPerspectivePrefixes
      • AbstractGUIApplication

        public AbstractGUIApplication​(boolean layoutComponent,
                                      String... allowedPerspectiveClassPrefixes)
        Constructor
        Parameters:
        layoutComponent - true if the application should layout the component with the "default" layout - i.e. the perspectives toolbar at the north of a BorderLayout and the PerspectiveManager at the center
        allowedPerspectiveClassPrefixes - Perspectives (loaded via the PluginManager) whose fully qualified class names start with these prefixes will be displayed in this application
    • Method Detail

      • terminate

        public void terminate()
        Method to be called when GUI application is no longer needed, to free up resources so that they can be garbage collected. Just calls the corresponding method of the the PerspectiveManager.
      • getApplicationSettings

        public Settings getApplicationSettings()
        Get the current settings for this application
        Specified by:
        getApplicationSettings in interface GUIApplication
        Returns:
        the current settings for this application
      • isPerspectivesToolBarVisible

        public boolean isPerspectivesToolBarVisible()
        Returns true if the perspectives toolbar is visible at the current time
        Specified by:
        isPerspectivesToolBarVisible in interface GUIApplication
        Returns:
        true if the perspectives toolbar is visible
      • settingsChanged

        public void settingsChanged()
        Called when settings are changed by the user
        Specified by:
        settingsChanged in interface GUIApplication
      • showMenuBar

        public void showMenuBar​(JFrame topLevelAncestor)
        Show the menu bar for the application
        Specified by:
        showMenuBar in interface GUIApplication
        Parameters:
        topLevelAncestor - the JFrame that contains the application
      • showErrorDialog

        public void showErrorDialog​(Exception cause)
        Popup a dialog displaying the supplied Exception
        Specified by:
        showErrorDialog in interface GUIApplication
        Parameters:
        cause - the exception to show
      • showInfoDialog

        public void showInfoDialog​(Object information,
                                   String title,
                                   boolean isWarning)
        Popup an information dialog
        Specified by:
        showInfoDialog in interface GUIApplication
        Parameters:
        information - the "information" (typically some text) to display
        title - the title for the dialog
        isWarning - true if this is a warning rather than just information