adams.gui.visualization.weka
Class AbstractInstanceInfoFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by weka.gui.visualize.InstanceInfoFrame
                          extended by adams.gui.visualization.weka.AbstractInstanceInfoFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, weka.gui.visualize.InstanceInfo

public abstract class AbstractInstanceInfoFrame
extends weka.gui.visualize.InstanceInfoFrame

Ancestor for frames for displaying information on the displayed data, with some more domain-specific functionality.

Methods to implement:

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
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  JButton m_ButtonDataGo
          the button for displaying the instances.
protected  JButton m_ButtonTextGo
          the button for displaying the instances.
protected  JComboBox m_ComboBoxData
          the combobox with all the datasets.
protected  JComboBox m_ComboBoxDataActions
          the combobox with all the actions.
protected  JComboBox m_ComboBoxTextActions
          the combobox with all the actions.
protected  JComboBox m_ComboBoxTextInstances
          the combobox with all the instances.
protected  JLabel m_LabelTextNumPoints
          the number of data points.
protected  BasePanel m_PanelComboBoxData
          the panel for the combobox listing the datasets.
protected  BasePanel m_PanelData
          the panel holding the table and buttons for the dataset.
protected  JPanel m_PanelDataAction
          the panel with buttons etc.
protected  JPanel m_PanelTextAction
          the panel with buttons etc.
protected  BasePanel m_PanelTextAll
          the panel for the text tab.
protected  BaseTabbedPane m_TabbedPane
          the tabbed pane for displaying the data.
protected  SortableAndSearchableTable m_TableData
          the table with the dataset.
 
Fields inherited from class weka.gui.visualize.InstanceInfoFrame
m_Data, m_TextInfo
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractInstanceInfoFrame()
           
 
Method Summary
protected  int extractDatabaseID(String idStr)
          Extracts the database ID from a string in the comboxbox.
protected abstract  String generateNumPointsLabel(int numPoints)
          Generates the string for the label displaying the number of points that are currently selected.
protected abstract  Method getActionMethod(String action)
          Returns the method associated with the specified action.
protected abstract  String[] getActions()
          Returns the available actions to list.
protected  int[] getAllDatabaseIDs(int tabIndex)
          Returns all database IDs.
protected  int getDatabaseIDColumnIndex()
          Returns the index of the column with the database ID.
protected  String getDialogTitle()
          Returns the title for the dialog.
protected  int getSelectedDatabaseID(int tabIndex)
          Returns the database ID of the currently selected item.
protected  int[] getSelectedDatabaseIDs(int tabIndex)
          Returns the database IDs of the currently selected items.
protected  void initGUI()
          Sets up the GUI components.
protected  Method locateMethod(String name)
          Locates the method with the specified name (method is expected to take no parameters).
 void setInfoData(Vector<weka.core.Instances> data)
          Sets the underlying data.
protected  void updateDataTable()
          Updates the data in the data table.
 
Methods inherited from class weka.gui.visualize.InstanceInfoFrame
getInfoData, getInfoText, initFinished, initialize, setInfoText
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

m_TabbedPane

protected BaseTabbedPane m_TabbedPane
the tabbed pane for displaying the data.


m_PanelTextAll

protected BasePanel m_PanelTextAll
the panel for the text tab.


m_LabelTextNumPoints

protected JLabel m_LabelTextNumPoints
the number of data points.


m_ComboBoxTextInstances

protected JComboBox m_ComboBoxTextInstances
the combobox with all the instances.


m_ComboBoxTextActions

protected JComboBox m_ComboBoxTextActions
the combobox with all the actions.


m_ButtonTextGo

protected JButton m_ButtonTextGo
the button for displaying the instances.


m_PanelTextAction

protected JPanel m_PanelTextAction
the panel with buttons etc.


m_TableData

protected SortableAndSearchableTable m_TableData
the table with the dataset.


m_PanelData

protected BasePanel m_PanelData
the panel holding the table and buttons for the dataset.


m_ComboBoxData

protected JComboBox m_ComboBoxData
the combobox with all the datasets.


m_PanelComboBoxData

protected BasePanel m_PanelComboBoxData
the panel for the combobox listing the datasets.


m_ComboBoxDataActions

protected JComboBox m_ComboBoxDataActions
the combobox with all the actions.


m_ButtonDataGo

protected JButton m_ButtonDataGo
the button for displaying the instances.


m_PanelDataAction

protected JPanel m_PanelDataAction
the panel with buttons etc.

Constructor Detail

AbstractInstanceInfoFrame

public AbstractInstanceInfoFrame()
Method Detail

initGUI

protected void initGUI()
Sets up the GUI components.

Overrides:
initGUI in class weka.gui.visualize.InstanceInfoFrame

getDialogTitle

protected String getDialogTitle()
Returns the title for the dialog.

Returns:
the dialog

generateNumPointsLabel

protected abstract String generateNumPointsLabel(int numPoints)
Generates the string for the label displaying the number of points that are currently selected.

Parameters:
numPoints - the number of points currently being displayed
Returns:
the generated string

getActions

protected abstract String[] getActions()
Returns the available actions to list.

Returns:
the names of the actions
See Also:
m_ComboBoxTextActions

getActionMethod

protected abstract Method getActionMethod(String action)
Returns the method associated with the specified action.

Parameters:
action - the action to retrieve the method for
Returns:
the associated method, null if not available
See Also:
locateMethod(String)

locateMethod

protected Method locateMethod(String name)
Locates the method with the specified name (method is expected to take no parameters).

Parameters:
name - the name of the method
Returns:
the method, null if none found

extractDatabaseID

protected int extractDatabaseID(String idStr)
Extracts the database ID from a string in the comboxbox.

Parameters:
idStr - the string from the combobox
Returns:
the ID

getDatabaseIDColumnIndex

protected int getDatabaseIDColumnIndex()
Returns the index of the column with the database ID.

Returns:
the column index, -1 if not found

getSelectedDatabaseID

protected int getSelectedDatabaseID(int tabIndex)
Returns the database ID of the currently selected item.

Parameters:
tabIndex - the currently selected tab
Returns:
the database ID, NO_ID if none selected
See Also:
Constants.NO_ID

getSelectedDatabaseIDs

protected int[] getSelectedDatabaseIDs(int tabIndex)
Returns the database IDs of the currently selected items.

Parameters:
tabIndex - the currently selected tab
Returns:
array of database IDs, length 0 if none selected

getAllDatabaseIDs

protected int[] getAllDatabaseIDs(int tabIndex)
Returns all database IDs.

Parameters:
tabIndex - the currently selected tab
Returns:
array of database IDs, length 0 if none available

setInfoData

public void setInfoData(Vector<weka.core.Instances> data)
Sets the underlying data.

Specified by:
setInfoData in interface weka.gui.visualize.InstanceInfo
Overrides:
setInfoData in class weka.gui.visualize.InstanceInfoFrame
Parameters:
data - the data of the info text

updateDataTable

protected void updateDataTable()
Updates the data in the data table.



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