Class AssociateTab
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.core.DetachablePanel
-
- adams.gui.tools.wekainvestigator.tab.AbstractInvestigatorTab
-
- adams.gui.tools.wekainvestigator.tab.AssociateTab
-
- All Implemented Interfaces:
adams.core.CleanUpHandler,adams.core.StatusMessageHandler,adams.gui.core.PopupMenuProvider,WekaInvestigatorDataListener,ImageObserver,MenuContainer,Serializable,Accessible
public class AssociateTab extends AbstractInvestigatorTab
Tab for associators.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAssociateTab.HistoryPanelCustomized history panel.-
Nested classes/interfaces inherited from class adams.gui.tools.wekainvestigator.tab.AbstractInvestigatorTab
AbstractInvestigatorTab.SerializationOption
-
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
Fields Modifier and Type Field Description static StringKEY_CLUSTERERstatic StringKEY_EVALUATIONstatic StringKEY_EVALUATION_PREFIXstatic StringKEY_HISTORYstatic StringKEY_LEFTPANELWIDTHstatic StringKEY_OUTPUTGENERATORSthe key for the output generators.protected adams.gui.core.BaseButtonm_ButtonOutputGeneratorsthe button for editing the output generators.protected adams.gui.core.BaseButtonm_ButtonOutputGeneratorsFavoritesthe button for the output generator favorites.protected adams.gui.core.BaseButtonm_ButtonStartthe start button.protected adams.gui.core.BaseButtonm_ButtonStopthe stop button.protected adams.gui.core.BaseComboBox<AbstractAssociatorEvaluation>m_ComboBoxEvaluationsthe combobox with the available evaluations.protected weka.associations.Associatorm_CurrentAssociatorthe current associator.protected AbstractAssociatorEvaluationm_CurrentEvaluationthe current evaluation.protected AssociateTab.HistoryPanelm_Historythe history.protected DefaultComboBoxModel<AbstractAssociatorEvaluation>m_ModelEvaluationsthe model with the available evaluations.protected AbstractOutputGenerator[]m_OutputGeneratorsthe output generators to use.protected JPanelm_PanelEvaluationthe panel with the evaluation.protected JPanelm_PanelEvaluationSetupthe panel for the evaluation setup to be embedded in.protected JPanelm_PanelExecutionButtonsthe panel with the buttons.protected adams.gui.goe.GenericObjectEditorPanelm_PanelGOEthe GOe with the associator.protected JPanelm_PanelLeftthe panel on the left-hand side.protected JPanelm_PanelRightthe panel on the right-hand side (displays results).protected adams.gui.core.BaseSplitPanem_SplitPanethe split pane for left/right panels.protected adams.gui.core.BaseStatusBarm_StatusBarthe status bar.-
Fields inherited from class adams.gui.tools.wekainvestigator.tab.AbstractInvestigatorTab
m_ActualTitle, m_FileChooserParameters, m_Owner, m_Worker
-
Fields inherited from class adams.gui.core.DetachablePanel
DETACH_ICON, m_ButtonReattach, m_ContentPanel, m_DetachedFrame, m_DetachListeners, m_FrameTitle, m_LastFramePosition, m_LastFrameSize, m_PanelReattach, m_PopupMenuCustomizer, m_ReattachListeners, REATTACH_ICON
-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description AssociateTab()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.voiddataChanged(WekaInvestigatorDataEvent e)Notifies the tab that the data changed.protected voiddoDeserialize(Map<String,Object> data, adams.core.MessageCollection errors)Restores the objects.protected Map<String,Object>doSerialize(Set<AbstractInvestigatorTab.SerializationOption> options)Returns the objects for serialization.protected voideditOutputGenerators()Allows the user to modify the output generators.protected voidfinishInit()Finishes up the initialization.voidgenerateOutput(ResultItem item)Generates the output from the item.AbstractOutputGenerator[]getOutputGenerators()Returns the current output generators.adams.gui.goe.GenericObjectEditorPanelgetPanelGOE()Returns the panel with the algorithm.JPanelgetPanelLeft()Returns the left panel.JPanelgetPanelRight()Returns the right panel.StringgetTabIcon()Returns the icon name for the tab icon.StringgetTitle()Returns the title of this table.protected voidinitGUI()Initializes the widgets.protected voidinitialize()Initializes the widgets.voidlogError(String msg, String title)Logs the error message and also displays an error dialog.voidlogError(String msg, Throwable t, String title)Logs the exception and also displays an error dialog.voidlogMessage(String msg)Logs the message.protected voidpostExecutionFinished()Hook method that gets called after finishing a job.protected voidpostStartExecution(InvestigatorTabJob job)Hook method that gets called after successfully starting a job.protected voidpostStopExecution()Hook method that gets called after stopping a job.voidsetOutputGenerators(AbstractOutputGenerator[] value)Sets the output generators to use.protected voidshowOutputGeneratorsFavorites()Shows the favorites popup menu for the output generators.voidshowStatus(String msg)Displays a message.protected voidstartExecution()Starts the evaluation.voidupdateButtons()Updates the buttons.-
Methods inherited from class adams.gui.tools.wekainvestigator.tab.AbstractInvestigatorTab
canStartExecution, createPopupMenu, deserialize, executionFinished, fireDataChange, getActualTitle, getData, getFileChooserParameters, getOwner, isBusy, loadParameters, saveParameters, serialize, setActualTitle, setOwner, startExecution, stopExecution, toParamsArray
-
Methods inherited from class adams.gui.core.DetachablePanel
addDetachListener, addReattachListener, clearDetachListeners, clearReattachListeners, detach, getContentPanel, getFrameTitle, getPopupMenu, getPopupMenuCustomizer, isDetached, notifyDetachListeners, notifyReattachListeners, reattach, removeDetachListener, removeReattachListener, setFrameTitle, setPopupMenuCustomizer
-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, main, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
KEY_HISTORY
public static final String KEY_HISTORY
- See Also:
- Constant Field Values
-
KEY_OUTPUTGENERATORS
public static final String KEY_OUTPUTGENERATORS
the key for the output generators.- See Also:
- Constant Field Values
-
KEY_LEFTPANELWIDTH
public static final String KEY_LEFTPANELWIDTH
- See Also:
- Constant Field Values
-
KEY_CLUSTERER
public static final String KEY_CLUSTERER
- See Also:
- Constant Field Values
-
KEY_EVALUATION
public static final String KEY_EVALUATION
- See Also:
- Constant Field Values
-
KEY_EVALUATION_PREFIX
public static final String KEY_EVALUATION_PREFIX
- See Also:
- Constant Field Values
-
m_PanelGOE
protected adams.gui.goe.GenericObjectEditorPanel m_PanelGOE
the GOe with the associator.
-
m_SplitPane
protected adams.gui.core.BaseSplitPane m_SplitPane
the split pane for left/right panels.
-
m_PanelLeft
protected JPanel m_PanelLeft
the panel on the left-hand side.
-
m_PanelRight
protected JPanel m_PanelRight
the panel on the right-hand side (displays results).
-
m_PanelEvaluation
protected JPanel m_PanelEvaluation
the panel with the evaluation.
-
m_ComboBoxEvaluations
protected adams.gui.core.BaseComboBox<AbstractAssociatorEvaluation> m_ComboBoxEvaluations
the combobox with the available evaluations.
-
m_ModelEvaluations
protected DefaultComboBoxModel<AbstractAssociatorEvaluation> m_ModelEvaluations
the model with the available evaluations.
-
m_PanelEvaluationSetup
protected JPanel m_PanelEvaluationSetup
the panel for the evaluation setup to be embedded in.
-
m_CurrentEvaluation
protected AbstractAssociatorEvaluation m_CurrentEvaluation
the current evaluation.
-
m_CurrentAssociator
protected weka.associations.Associator m_CurrentAssociator
the current associator.
-
m_ButtonOutputGenerators
protected adams.gui.core.BaseButton m_ButtonOutputGenerators
the button for editing the output generators.
-
m_ButtonOutputGeneratorsFavorites
protected adams.gui.core.BaseButton m_ButtonOutputGeneratorsFavorites
the button for the output generator favorites.
-
m_PanelExecutionButtons
protected JPanel m_PanelExecutionButtons
the panel with the buttons.
-
m_ButtonStart
protected adams.gui.core.BaseButton m_ButtonStart
the start button.
-
m_ButtonStop
protected adams.gui.core.BaseButton m_ButtonStop
the stop button.
-
m_History
protected AssociateTab.HistoryPanel m_History
the history.
-
m_StatusBar
protected adams.gui.core.BaseStatusBar m_StatusBar
the status bar.
-
m_OutputGenerators
protected AbstractOutputGenerator[] m_OutputGenerators
the output generators to use.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the widgets.- Overrides:
initializein classAbstractInvestigatorTab
-
initGUI
protected void initGUI()
Initializes the widgets.- Overrides:
initGUIin classadams.gui.core.DetachablePanel
-
finishInit
protected void finishInit()
Finishes up the initialization.- Overrides:
finishInitin classadams.gui.core.BasePanel
-
getTitle
public String getTitle()
Returns the title of this table.- Specified by:
getTitlein classAbstractInvestigatorTab- Returns:
- the title
-
getTabIcon
public String getTabIcon()
Returns the icon name for the tab icon.- Overrides:
getTabIconin classAbstractInvestigatorTab- Returns:
- the icon name, null if not available
-
dataChanged
public void dataChanged(WekaInvestigatorDataEvent e)
Notifies the tab that the data changed.- Specified by:
dataChangedin interfaceWekaInvestigatorDataListener- Specified by:
dataChangedin classAbstractInvestigatorTab- Parameters:
e- the event
-
editOutputGenerators
protected void editOutputGenerators()
Allows the user to modify the output generators.
-
showOutputGeneratorsFavorites
protected void showOutputGeneratorsFavorites()
Shows the favorites popup menu for the output generators.
-
startExecution
protected void startExecution()
Starts the evaluation.
-
postStartExecution
protected void postStartExecution(InvestigatorTabJob job)
Hook method that gets called after successfully starting a job.- Overrides:
postStartExecutionin classAbstractInvestigatorTab- Parameters:
job- the job that got started
-
postStopExecution
protected void postStopExecution()
Hook method that gets called after stopping a job.- Overrides:
postStopExecutionin classAbstractInvestigatorTab
-
postExecutionFinished
protected void postExecutionFinished()
Hook method that gets called after finishing a job.- Overrides:
postExecutionFinishedin classAbstractInvestigatorTab
-
generateOutput
public void generateOutput(ResultItem item)
Generates the output from the item.- Parameters:
item- the item to process
-
updateButtons
public void updateButtons()
Updates the buttons.
-
logMessage
public void logMessage(String msg)
Logs the message.- Overrides:
logMessagein classAbstractInvestigatorTab- Parameters:
msg- the log message
-
logError
public void logError(String msg, Throwable t, String title)
Logs the exception and also displays an error dialog.- Overrides:
logErrorin classAbstractInvestigatorTab- Parameters:
msg- the log messaget- the exceptiontitle- the title for the dialog
-
logError
public void logError(String msg, String title)
Logs the error message and also displays an error dialog.- Overrides:
logErrorin classAbstractInvestigatorTab- Parameters:
msg- the error messagetitle- the title for the dialog
-
showStatus
public void showStatus(String msg)
Displays a message.- Specified by:
showStatusin interfaceadams.core.StatusMessageHandler- Overrides:
showStatusin classAbstractInvestigatorTab- Parameters:
msg- the message to display
-
getPanelLeft
public JPanel getPanelLeft()
Returns the left panel.- Returns:
- the left panel
-
getPanelRight
public JPanel getPanelRight()
Returns the right panel.- Returns:
- the right panel
-
getPanelGOE
public adams.gui.goe.GenericObjectEditorPanel getPanelGOE()
Returns the panel with the algorithm.- Returns:
- the panel
-
getOutputGenerators
public AbstractOutputGenerator[] getOutputGenerators()
Returns the current output generators.- Returns:
- the generators
-
setOutputGenerators
public void setOutputGenerators(AbstractOutputGenerator[] value)
Sets the output generators to use.- Parameters:
value- the generators
-
doSerialize
protected Map<String,Object> doSerialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.- Overrides:
doSerializein classAbstractInvestigatorTab- Parameters:
options- what to serialize- Returns:
- the mapping of the objects to serialize
-
doDeserialize
protected void doDeserialize(Map<String,Object> data, adams.core.MessageCollection errors)
Restores the objects.- Overrides:
doDeserializein classAbstractInvestigatorTab- Parameters:
data- the data to restoreerrors- for storing errors
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUpin interfaceadams.core.CleanUpHandler- Overrides:
cleanUpin classadams.gui.core.DetachablePanel
-
-