Class MiniGUI


  • @Alias({"mini","minigui"})
    public class MiniGUI
    extends AbstractApplication
    Minimal GUI built around a table-based parameter editor.
    Since:
    0.3
    Author:
    Erich Schubert
    • Field Detail

      • SAVED_SETTINGS_FILENAME

        public static final java.lang.String SAVED_SETTINGS_FILENAME
        Filename for saved settings.
        See Also:
        Constant Field Values
      • NEWLINE

        private static final java.lang.String NEWLINE
        Newline used in output.
      • LOG

        private static final Logging LOG
        ELKI logger for the GUI.
      • ACTION_QUIT

        private static final java.lang.String ACTION_QUIT
        Quit action, for mnemonics.
        See Also:
        Constant Field Values
      • frame

        javax.swing.JFrame frame
        The frame
      • panel

        javax.swing.JPanel panel
        The main panel.
      • outputArea

        protected LogPanel outputArea
        Logging output area.
      • parameterTable

        protected ParameterTable parameterTable
        The parameter table.
      • appCombo

        protected javax.swing.JComboBox<java.lang.String> appCombo
        Combo box for choosing the application to run.
      • savedCombo

        protected javax.swing.JComboBox<java.lang.String> savedCombo
        Combo box for saved settings.
      • runButton

        protected javax.swing.JButton runButton
        The "run" button.
      • maincls

        private java.lang.Class<? extends AbstractApplication> maincls
        Application to configure / run.
      • commandLine

        private javax.swing.JTextField commandLine
        Command line output field.
      • APP_PREFIX

        private java.lang.String APP_PREFIX
        Prefix for application package.
    • Constructor Detail

      • MiniGUI

        public MiniGUI()
        Constructor.
    • Method Detail

      • setupAppChooser

        private void setupAppChooser()
        Setup the application chooser.
      • setupParameterTable

        private void setupParameterTable()
        Setup the parameter table
      • setupLoadSaveButtons

        private void setupLoadSaveButtons()
        Create the load and save buttons.
      • setupCommandLine

        private void setupCommandLine()
        Setup command line field
      • setupLoggingArea

        private void setupLoggingArea()
        Setup logging area
      • updateParameterTable

        protected void updateParameterTable()
        Serialize the parameter table and run setParameters().
      • doSetParameters

        protected void doSetParameters​(java.util.List<java.lang.String> params)
        Do the actual setParameters invocation.
        Parameters:
        params - Parameters
      • strip_prefix

        private java.lang.String strip_prefix​(java.lang.String nam)
        Strip the APP_PREFIX prefix.
        Parameters:
        nam - class name to strip the prefix from
        Returns:
        Stripped name
      • format

        private java.lang.String format​(java.lang.Object... params)
        Format objects to a command line.
        Parameters:
        params - Parameters to format (Strings, or list of strings)
        Returns:
        Formatted string
      • formatTo

        private void formatTo​(java.lang.StringBuilder buf,
                              java.util.List<?> params)
        Format a list of strings to a buffer.
        Parameters:
        buf - Output buffer
        params - List of strings
      • formatTo

        private void formatTo​(java.lang.StringBuilder buf,
                              java.lang.String s)
        Format a single string for the command line.
        Parameters:
        buf - Output buffer
        s - String
      • loadLatest

        protected void loadLatest()
        Auto-load the last task from the history file.
      • startTask

        protected void startTask()
        Do a full run of the KDDTask with the specified parameters.
      • reportErrors

        protected void reportErrors​(SerializedParameterization config)
        Report errors in a single error log record.
        Parameters:
        config - Parameterization
      • main

        public static void main​(java.lang.String[] args)
        Main method that just spawns the UI.
        Parameters:
        args - command line parameters