weka.gui.experiment
Class HadoopGuiSetupPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by weka.gui.experiment.HadoopGuiSetupPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class HadoopGuiSetupPanel
extends JPanel

This panel controls the configuration of an experiment.

If KOML is in the classpath the experiments can also be serialized to XML instead of a binary format.

Version:
$Revision: 5928 $
Author:
Richard kirkby (rkirkby@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected static String DEST_ARFF_TEXT
           
protected static String DEST_CSV_TEXT
           
protected static String DEST_DATABASE_TEXT
          The strings used to identify the combo box choices
protected  weka.gui.experiment.AlgorithmListPanel m_AlgorithmListPanel
          The panel for configuring selected algorithms
protected  weka.gui.ExtensionFileFilter m_csvFileFilter
          Filter for choosing CSV files
protected  weka.gui.experiment.DatasetListPanel m_DatasetListPanel
          The panel for configuring selected datasets
protected  JFileChooser m_DestFileChooser
          The file chooser for selecting result destinations
protected  String m_destinationDatabaseURL
          The database destination URL to store results into
protected  String m_destinationFilename
          The filename to store results into
protected  Experiment m_Exp
          The experiment being configured
protected  JRadioButton m_ExpClassificationRBut
          Radio button for choosing classification experiment
protected  JLabel m_ExperimentParameterLabel
          Label for parameter field
protected  JTextField m_ExperimentParameterTField
          Input field for experiment parameter
protected  FileFilter m_ExpFilter
          A filter to ensure only experiment files get shown in the chooser
protected  JRadioButton m_ExpRegressionRBut
          Radio button for choosing regression experiment
protected  String m_expType
           
protected  JFileChooser m_FileChooser
          The file chooser for selecting experiments
protected  String m_hadoopConf
           
protected  JButton m_HadoopConfButton
          Button for browsing destination files
protected  DirectoryChooserPanel m_InputHadoopConf
           
protected  JLabel m_inputHadoopConfFolder
           
protected  DirectoryChooserPanel m_InputHadoopHome
           
protected  JLabel m_InputHadoopHomeLabel
           
protected  String m_jarPath
           
protected  FileFilter m_KOMLFilter
          A filter to ensure only experiment (in KOML format) files get shown in the chooser
protected  weka.gui.experiment.SetupModePanel m_modePanel
          The panel which switched between simple and advanced setup modes
protected  JButton m_NewBut
          Click to create a new experiment with default settings
protected  JButton m_NotesButton
          A button for bringing up the notes
protected  JFrame m_NotesFrame
          Frame for the notes
protected  JTextArea m_NotesText
          Area for user notes Default of 10 rows
protected  JTextField m_NumberOfRepetitionsTField
          Input field for number of repetitions
protected  int m_numFolds
          The number of folds for a cross-validation experiment
protected  int m_numRepetitions
          The number of times to repeat the sub-experiment
protected  JButton m_OpenBut
          Click to load an experiment
protected  FileChooserPanel m_ResultDestinationPath
          Input field for result destination path
protected  JLabel m_ResultsDestinationPathLabel
          Label for destination field
protected  JButton m_SaveBut
          Click to save an experiment
protected  PropertyChangeSupport m_Support
          Manages sending notifications to people when we change the experiment, at this stage, only the resultlistener so the resultpanel can update.
protected  double m_trainPercent
          The training percentage for a train/test split experiment
protected  boolean m_userHasBeenAskedAboutConversion
          Whether or not the user has consented for the experiment to be simplified
protected  FileFilter m_XMLFilter
          A filter to ensure only experiment (in XML format) files get shown in the chooser
protected static String TYPE_CROSSVALIDATION_TEXT
           
protected static String TYPE_FIXEDSPLIT_TEXT
           
protected static String TYPE_RANDOMSPLIT_TEXT
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HadoopGuiSetupPanel()
          Creates the setup panel with no initial experiment.
HadoopGuiSetupPanel(Experiment exp)
          Creates the setup panel with the supplied initial experiment.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds a PropertyChangeListener who will be notified of value changes.
 Experiment getExperiment()
          Gets the currently configured experiment.
 String getExpType()
           
 String getHadoopConfPath()
           
 String getHadoopHomePath()
          Let user browse for the Jar file
protected  void removeNotesFrame()
          Deletes the notes frame.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a PropertyChangeListener.
 boolean setExperiment(Experiment exp)
          Sets the experiment to configure.
 void setModePanel(weka.gui.experiment.SetupModePanel modePanel)
          Sets the panel used to switch between simple and advanced modes.
protected  void setSelectedItem(JComboBox cb, String item)
          Sets the selected item of an combobox, since using setSelectedItem(...) doesn't work, if one checks object references!
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Exp

protected Experiment m_Exp
The experiment being configured


m_modePanel

protected weka.gui.experiment.SetupModePanel m_modePanel
The panel which switched between simple and advanced setup modes


m_destinationDatabaseURL

protected String m_destinationDatabaseURL
The database destination URL to store results into


m_destinationFilename

protected String m_destinationFilename
The filename to store results into


m_numFolds

protected int m_numFolds
The number of folds for a cross-validation experiment


m_trainPercent

protected double m_trainPercent
The training percentage for a train/test split experiment


m_numRepetitions

protected int m_numRepetitions
The number of times to repeat the sub-experiment


m_userHasBeenAskedAboutConversion

protected boolean m_userHasBeenAskedAboutConversion
Whether or not the user has consented for the experiment to be simplified


m_csvFileFilter

protected weka.gui.ExtensionFileFilter m_csvFileFilter
Filter for choosing CSV files


m_OpenBut

protected JButton m_OpenBut
Click to load an experiment


m_SaveBut

protected JButton m_SaveBut
Click to save an experiment


m_NewBut

protected JButton m_NewBut
Click to create a new experiment with default settings


m_ExpFilter

protected FileFilter m_ExpFilter
A filter to ensure only experiment files get shown in the chooser


m_KOMLFilter

protected FileFilter m_KOMLFilter
A filter to ensure only experiment (in KOML format) files get shown in the chooser


m_XMLFilter

protected FileFilter m_XMLFilter
A filter to ensure only experiment (in XML format) files get shown in the chooser


m_FileChooser

protected JFileChooser m_FileChooser
The file chooser for selecting experiments


m_DestFileChooser

protected JFileChooser m_DestFileChooser
The file chooser for selecting result destinations


m_ResultsDestinationPathLabel

protected JLabel m_ResultsDestinationPathLabel
Label for destination field


m_ResultDestinationPath

protected FileChooserPanel m_ResultDestinationPath
Input field for result destination path


m_InputHadoopHome

protected DirectoryChooserPanel m_InputHadoopHome

m_InputHadoopHomeLabel

protected JLabel m_InputHadoopHomeLabel

m_inputHadoopConfFolder

protected JLabel m_inputHadoopConfFolder

m_InputHadoopConf

protected DirectoryChooserPanel m_InputHadoopConf

m_HadoopConfButton

protected JButton m_HadoopConfButton
Button for browsing destination files


m_ExperimentParameterLabel

protected JLabel m_ExperimentParameterLabel
Label for parameter field


m_ExperimentParameterTField

protected JTextField m_ExperimentParameterTField
Input field for experiment parameter


m_ExpClassificationRBut

protected JRadioButton m_ExpClassificationRBut
Radio button for choosing classification experiment


m_ExpRegressionRBut

protected JRadioButton m_ExpRegressionRBut
Radio button for choosing regression experiment


m_NumberOfRepetitionsTField

protected JTextField m_NumberOfRepetitionsTField
Input field for number of repetitions


DEST_DATABASE_TEXT

protected static String DEST_DATABASE_TEXT
The strings used to identify the combo box choices


DEST_ARFF_TEXT

protected static String DEST_ARFF_TEXT

DEST_CSV_TEXT

protected static String DEST_CSV_TEXT

TYPE_CROSSVALIDATION_TEXT

protected static String TYPE_CROSSVALIDATION_TEXT

TYPE_RANDOMSPLIT_TEXT

protected static String TYPE_RANDOMSPLIT_TEXT

TYPE_FIXEDSPLIT_TEXT

protected static String TYPE_FIXEDSPLIT_TEXT

m_DatasetListPanel

protected weka.gui.experiment.DatasetListPanel m_DatasetListPanel
The panel for configuring selected datasets


m_AlgorithmListPanel

protected weka.gui.experiment.AlgorithmListPanel m_AlgorithmListPanel
The panel for configuring selected algorithms


m_NotesButton

protected JButton m_NotesButton
A button for bringing up the notes


m_NotesFrame

protected JFrame m_NotesFrame
Frame for the notes


m_NotesText

protected JTextArea m_NotesText
Area for user notes Default of 10 rows


m_Support

protected PropertyChangeSupport m_Support
Manages sending notifications to people when we change the experiment, at this stage, only the resultlistener so the resultpanel can update.


m_hadoopConf

protected String m_hadoopConf

m_jarPath

protected String m_jarPath

m_expType

protected String m_expType
Constructor Detail

HadoopGuiSetupPanel

public HadoopGuiSetupPanel(Experiment exp)
Creates the setup panel with the supplied initial experiment.

Parameters:
exp - a value of type 'Experiment'

HadoopGuiSetupPanel

public HadoopGuiSetupPanel()
Creates the setup panel with no initial experiment.

Method Detail

setSelectedItem

protected void setSelectedItem(JComboBox cb,
                               String item)
Sets the selected item of an combobox, since using setSelectedItem(...) doesn't work, if one checks object references!

Parameters:
cb - the combobox to set the item for
item - the item to set active

removeNotesFrame

protected void removeNotesFrame()
Deletes the notes frame.


setModePanel

public void setModePanel(weka.gui.experiment.SetupModePanel modePanel)
Sets the panel used to switch between simple and advanced modes.

Parameters:
modePanel - the panel

setExperiment

public boolean setExperiment(Experiment exp)
Sets the experiment to configure.

Parameters:
exp - a value of type 'Experiment'
Returns:
true if experiment could be configured, false otherwise

getExperiment

public Experiment getExperiment()
Gets the currently configured experiment.

Returns:
the currently configured experiment.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener who will be notified of value changes.

Overrides:
addPropertyChangeListener in class Container
Parameters:
l - a value of type 'PropertyChangeListener'

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener.

Overrides:
removePropertyChangeListener in class Component
Parameters:
l - a value of type 'PropertyChangeListener'

getHadoopHomePath

public String getHadoopHomePath()
Let user browse for the Jar file


getHadoopConfPath

public String getHadoopConfPath()

getExpType

public String getExpType()


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.