Package weka.gui

Class AbstractGUIApplication

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, GUIApplication
Direct Known Subclasses:
KnowledgeFlowApp, WorkbenchApp

public abstract class AbstractGUIApplication extends JPanel implements GUIApplication
Base class for GUI applications in Weka
Version:
$Revision: $
Author:
Mark Hall (mhall{[at]}pentaho{[dot]}com)
See Also:
  • Constructor Details

    • 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 Details

    • 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.
    • getPerspectiveManager

      public PerspectiveManager getPerspectiveManager()
      Get the PerspectiveManager in use by this application
      Specified by:
      getPerspectiveManager in interface GUIApplication
      Returns:
      the Perspective Manager
    • 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
    • hidePerspectivesToolBar

      public void hidePerspectivesToolBar()
      Hide the perspectives toolbar
      Specified by:
      hidePerspectivesToolBar in interface GUIApplication
    • showPerspectivesToolBar

      public void showPerspectivesToolBar()
      Show the perspectives toolbar
      Specified by:
      showPerspectivesToolBar in interface GUIApplication
    • 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
    • revalidate

      public void revalidate()
      Force a re-validation and repaint() of the application
      Specified by:
      revalidate in interface GUIApplication
      Overrides:
      revalidate in class JComponent