Package fim

Class ARuleView

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

public class ARuleView extends JFrame implements Runnable
Class for a simple association rule viewer.
Since:
2004.07.06
See Also:
  • Field Details

    • VERSION

      public static final String VERSION
      the version string
      See Also:
    • PROGRAM

      public static final int PROGRAM
      mode flag: the viewer is a stand-alone program
      See Also:
    • LOAD_ITEMS

      public static final int LOAD_ITEMS
      mode flag: add menu items for loading files
      See Also:
    • SAVE_ITEMS

      public static final int SAVE_ITEMS
      mode flag: add menu items for saving files
      See Also:
    • FILE_ITEMS

      public static final int FILE_ITEMS
      mode flag: add menu items for loading and saving files
      See Also:
    • ALL_ITEMS

      public static final int ALL_ITEMS
      mode flag: add all menu items
      See Also:
  • Constructor Details

    • ARuleView

      public ARuleView(int mode)
      Create an association rule viewer.
      Parameters:
      mode - the mode flags
      Since:
      2004.07.06 (Christian Borgelt)
    • ARuleView

      public ARuleView(Component owner, int mode)
      Create an association rule viewer.
      Parameters:
      owner - the component that is to own this viewer
      mode - the mode flags
      Since:
      2004.07.06 (Christian Borgelt)
  • Method Details

    • run

      public void run()
      Create the user interface.

      Following the recommendations in the Java tutorial, the user interface is created in the "run" method, which is invoked from the event queue, in order to avoid problems with threads.

      Specified by:
      run in interface Runnable
      Since:
      2006.07.20 (Christian Borgelt)
    • setMessage

      public void setMessage(String msg)
      Set the message to display in the status line.
      Parameters:
      msg - the message to display
      Since:
      2007.03.12 (Christian Borgelt)
    • sortRules

      public void sortRules(int field)
      Sort the association rules.
      Parameters:
      field - the identifier of the field to compare first
      Since:
      2007.03.12 (Christian Borgelt)
    • setRules

      public void setRules(ARuleSet arset)
      Set the set of association rules to display.
      Parameters:
      arset - the rule set to display
      Since:
      2007.03.12 (Christian Borgelt)
    • getRules

      public ARuleSet getRules()
      Get the currently displayed set of association rules.
      Returns:
      the currently displayed set of association rules
      Since:
      2007.03.12 (Christian Borgelt)
    • loadRules

      public boolean loadRules(File file)
      Load a set of association rules.
      Parameters:
      file - the file to load the rule set from
      Returns:
      whether the file was successfully loaded
      Since:
      2004.07.06 (Christian Borgelt)
    • saveRules

      public boolean saveRules(File file)
      Save the displayed set of association rules.
      Parameters:
      file - the file to save the rule set to
      Returns:
      whether the file was successfully saved
      Since:
      2004.07.06 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for command line invocation.
      Parameters:
      args - the command line arguments
      Since:
      2004.07.06 (Christian Borgelt)