|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.visualize.MatrixPanel
This panel displays a plot matrix of the user selected attributes of a given data set. The datapoints are coloured using a discrete colouring set if the user has selected a nominal attribute for colouring. If the user has selected a numeric attribute then the datapoints are coloured using a colour spectrum ranging from blue to red (low values to high). Datapoints missing a class value are displayed in black.
Nested Class Summary | |
private class |
MatrixPanel.Plot
Internal class responsible for displaying the actual matrix Requires the internal data fields of the parent class to be properly initialized before being created |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private int |
datapointSize
This stores the size of the datapoint |
private javax.swing.ButtonGroup |
distGroup
Button group for subsampling radio buttons |
private java.awt.Font |
f
font used in column and row names |
private java.awt.Color |
fontColor
color for the font used in column and row names |
private int[][] |
jitterVals
Array containing precalculated jitter values |
protected javax.swing.JSplitPane |
jp
Split pane for splitting the matrix and the buttons and bars |
protected javax.swing.JList |
m_attribList
The list for selecting the attributes to display the plot matrix |
protected javax.swing.JComboBox |
m_classAttrib
The combo box to allow user to select the colouring attribute |
private int |
m_classIndex
This contains the index of the currently selected colouring attribute |
private FastVector |
m_colorList
Contains discrete colours for colouring for nominal attributes |
protected ClassPanel |
m_cp
The panel that displays the legend of the colouring attribute |
protected Instances |
m_data
The dataset for which this panel will display the plot matrix for |
private static java.awt.Color[] |
m_defaultColors
default colour list |
protected javax.swing.JSlider |
m_jitter
The slider to add jitter to the plots |
protected javax.swing.JScrollPane |
m_js
The scroll pane to scrolling the matrix |
private boolean[][] |
m_missing
Contains true for each value that is missing, for each instance |
private java.awt.Dimension |
m_plotLBSizeD
Stores the maximum size for PlotSize label to keep it's size constant |
protected javax.swing.JSlider |
m_plotSize
The slider to adjust the size of the cells in the matrix |
private javax.swing.JLabel |
m_plotSizeLb
Displays the current size beside the slider bar for cell size |
private MatrixPanel.Plot |
m_plotsPanel
The that panel contains the actual matrix |
private int[] |
m_pointColors
This is an array cache for the colour of each of the instances depending on the colouring attribute. |
private java.awt.Dimension |
m_pointLBSizeD
Stores the maximum size for PointSize label to keep it's size constant |
private int[][] |
m_points
This is a local array cache for all the instance values for faster rendering |
protected javax.swing.JSlider |
m_pointSize
The slider to adjust the size of the datapoints |
private javax.swing.JLabel |
m_pointSizeLb
Displays the current size beside the slider bar for point size |
protected javax.swing.JButton |
m_resampleBt
The label for resample percentage |
protected javax.swing.JTextField |
m_resamplePercent
The text area for percentage to resample data |
protected javax.swing.JTextField |
m_rseed
Random seed for random subsample |
protected javax.swing.JButton |
m_selAttrib
The button to display a window to select attributes |
private int[] |
m_selectedAttribs
This array contains the indices of the attributes currently selected |
private int[][] |
m_type
This array contains: m_type[0][i] = [type of attribute, nominal, string or numeric] m_type[1][i] = [number of discrete values of nominal or string attribute or same as m_type[0][i] for numeric attribute] |
protected javax.swing.JButton |
m_updateBt
The button that updates the display to reflect the changes made by the user. |
protected javax.swing.JPanel |
optionsPanel
The panel that contains all the buttons and tools, i.e. resize, jitter bars and sub-sampling buttons etc on the bottom of the panel |
protected javax.swing.JRadioButton |
origDist
For selecting same class distribution in the subsample as in the input |
private java.util.Random |
rnd
For adding random jitter |
protected javax.swing.JRadioButton |
unifDist
For selecting uniform class distribution in the subsample |
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
MatrixPanel()
Constructor |
Method Summary | |
void |
initInternalFields()
Initializes internal data fields, i.e. data values, type, missing and color cache arrays |
static void |
main(java.lang.String[] args)
Main method for testing this class |
void |
setInstances(Instances newInst)
This method changes the Instances object of this class to a new one. |
void |
setPercent()
Calculates the percentage to resample |
void |
setupAttribLists()
Sets up the UI's attributes lists |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
private final MatrixPanel.Plot m_plotsPanel
protected final ClassPanel m_cp
protected javax.swing.JPanel optionsPanel
protected javax.swing.JSplitPane jp
protected javax.swing.JButton m_updateBt
protected javax.swing.JButton m_selAttrib
protected Instances m_data
protected javax.swing.JList m_attribList
protected final javax.swing.JScrollPane m_js
protected javax.swing.JComboBox m_classAttrib
protected javax.swing.JSlider m_plotSize
protected javax.swing.JSlider m_pointSize
protected javax.swing.JSlider m_jitter
private java.util.Random rnd
private int[][] jitterVals
private int datapointSize
protected javax.swing.JTextField m_resamplePercent
protected javax.swing.JButton m_resampleBt
protected javax.swing.JTextField m_rseed
protected javax.swing.JRadioButton origDist
protected javax.swing.JRadioButton unifDist
private javax.swing.ButtonGroup distGroup
private final javax.swing.JLabel m_plotSizeLb
private final javax.swing.JLabel m_pointSizeLb
private int[] m_selectedAttribs
private int m_classIndex
private int[][] m_points
private int[] m_pointColors
private boolean[][] m_missing
private int[][] m_type
private java.awt.Dimension m_plotLBSizeD
private java.awt.Dimension m_pointLBSizeD
private FastVector m_colorList
private static final java.awt.Color[] m_defaultColors
private final java.awt.Color fontColor
private final java.awt.Font f
Constructor Detail |
public MatrixPanel()
Method Detail |
public void initInternalFields()
public void setupAttribLists()
public void setPercent()
public void setInstances(Instances newInst)
newInst
- The new set of Instancespublic static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |