Package weka.gui

Class GUIChooserApp

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class GUIChooserApp extends JFrame
The main class for the Weka GUIChooser. Lets the user choose which GUI they want to run.
Version:
$Revision: 15894 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz), Mark Hall (mhall@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Constructor Details

    • GUIChooserApp

      public GUIChooserApp()
      Creates the experiment environment gui with no initial experiment
  • Method Details

    • createSingleton

      public static void createSingleton()
      Create a singleton instance of the GUIChooser
    • checkWindowShouldBeClosed

      public boolean checkWindowShouldBeClosed(WindowEvent e)
      Asks the user whether the window that generated the window evident given as the argument should really be closed. Popping up the option pane also gets rid of some references that Swing keeps to the window, which is useful for garbage collection when the user does choose to close the window.
      Parameters:
      e - the event that the window generated
      Returns:
      whether the user has agreed to close the window
    • disposeWindow

      public void disposeWindow(JFrame frame, WindowAdapter adapter)
      Disposes the given JFrame and removes it from the list of frames maintained by the GUIChooserApp. Removes the given window listener first, which seems to be necessary for garbage collection on macOS. Also overwrites the content panel with an empty JPanel, also for garbage collection. Finally, it calls the garbage collector and calls checkExit().
      Parameters:
      frame - the frame to dispose of
      adapter - the window apapter used for dealing with the closing of the window
    • showKnowledgeFlow

      public void showKnowledgeFlow(String fileToLoad)
    • showExplorer

      public void showExplorer(String fileToLoad)
    • addChildFrame

      public void addChildFrame(Container c)
      adds the given child frame to the list of frames.
      Parameters:
      c - the child frame to add
    • removeChildFrame

      public boolean removeChildFrame(Container c)
      tries to remove the child frame, it returns true if it could do such.
      Parameters:
      c - the child frame to remove
      Returns:
      true if the child frame could be removed
    • main

      public static void main(String[] args)
      Tests out the GUIChooser environment.
      Parameters:
      args - ignored.