Package weka.gui

Class Main

    • Field Detail

      • TAGS_GUI

        public static final Tag[] TAGS_GUI
        GUI tags.
    • Constructor Detail

      • Main

        public Main()
        default constructor.
    • Method Detail

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

        public boolean showWindow​(Container c)
        brings child frame to the top.
        Parameters:
        c - the frame to activate
        Returns:
        true if frame was activated
      • showWindow

        public boolean showWindow​(Class<?> windowClass)
        brings the first frame to the top that is of the specified window class.
        Parameters:
        windowClass - the class to display the first child for
        Returns:
        true, if a child was found and brought to front
      • getWindowList

        public Iterator<Container> getWindowList()
        returns all currently open frames.
        Returns:
        an iterator over all currently open frame
      • getWindow

        public Container getWindow​(Class<?> windowClass)
        returns the first instance of the given window class, null if none can be found.
        Parameters:
        windowClass - the class to retrieve the first instance for
        Returns:
        null, if no instance can be found
      • getWindow

        public Container getWindow​(String title)
        returns the first window with the given title, null if none can be found.
        Parameters:
        title - the title to look for
        Returns:
        null, if no instance can be found
      • containsWindow

        public boolean containsWindow​(Class<?> windowClass)
        checks, whether an instance of the given window class is already in the Window list.
        Parameters:
        windowClass - the class to check for an instance in the current window list
        Returns:
        true if the class is already listed in the Window list
      • containsWindow

        public boolean containsWindow​(String title)
        checks, whether a window with the given title is already in the Window list.
        Parameters:
        title - the title to check for in the current window list
        Returns:
        true if a window with the given title is already listed in the Window list
      • minimizeWindows

        public void minimizeWindows()
        minimizes all windows.
      • restoreWindows

        public void restoreWindows()
        restores all windows.
      • windowListChanged

        public void windowListChanged()
        is called when window list changed somehow (add or remove).
      • setVisible

        public void setVisible​(boolean b)
        Shows or hides this component depending on the value of parameter b.
        Overrides:
        setVisible in class Window
        Parameters:
        b - if true, shows this component; otherwise, hides this component
      • createSingleton

        public static void createSingleton​(String[] args)
        Create the singleton instance of the Main GUI.
        Parameters:
        args - commandline options
      • getSingleton

        public static Main getSingleton()
        Return the singleton instance of the Main GUI.
        Returns:
        the singleton instance
      • addStartupListener

        public static void addStartupListener​(StartUpListener s)
        Add a listener to be notified when startup is complete.
        Parameters:
        s - a listener to add
      • listOptions

        public Enumeration<Option> listOptions()
        Gets an enumeration describing the available options.
        Specified by:
        listOptions in interface OptionHandler
        Returns:
        an enumeration of all the available options.
      • getOptions

        public String[] getOptions()
        returns the options of the current setup.
        Specified by:
        getOptions in interface OptionHandler
        Returns:
        the current options
      • setOptions

        public void setOptions​(String[] options)
                        throws Exception
        Parses the options for this object.

        Valid options are:

         -gui <MDI|SDI>
          Determines the layout of the GUI:
          MDI = MDI Layout
          SDI = SDI Layout
          (default: MDI)
         
        Specified by:
        setOptions in interface OptionHandler
        Parameters:
        options - the options to use
        Throws:
        Exception - if setting of options fails
      • setGUIType

        public void setGUIType​(SelectedTag value)
        Sets the type of GUI to use.
        Parameters:
        value - .the GUI type
      • getGUIType

        public SelectedTag getGUIType()
        Gets the currently set type of GUI to display.
        Returns:
        the current GUI Type.
      • main

        public static void main​(String[] args)
        starts the application.
        Parameters:
        args - the commandline arguments - ignored