Class Matrix
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.visualization.stats.scatterplot.Matrix
-
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
public class Matrix extends BasePanel
Displays a grid of scatter plots with each attribute plotted against each of the other attributes, also can choose overlays etc.- Version:
- $Revision$
- Author:
- msf8
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMatrix.actionListener for when the update button is pressedclassMatrix.propUpdates the progress bar using the "progress" of the swing worker-
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 protected ArrayList<AbstractScatterPlotOverlay>m_ArrayOverlays to be displayedprotected JProgressBarm_BarProgress bar for displaying update progressprotected JPanelm_CentrePanel for displaying the scatter plotsprotected AbstractScatterPlotPaintletm_DefDefault paintlet for GOEpanelprotected AbstractScatterPlotOverlay[]m_Defaultfor default value for overlaysprotected HashSet<String>m_DeleteOverlayCommandline strings of overlays to be deletedprotected booleanm_NeedUpdateWhether an update is required, if an option has been changedprotected HashSet<String>m_NewOverlayCommandline strings of new overlays to be addedprotected HashSet<String>m_OldHashCommandline strings of overlays before new overlays chosenprotected ParameterPanelm_OptionPanelPanel containing the matrix optionsprotected GenericArrayEditorPanelm_PanelOverlayDisplays a GAE for choosing overlays for the scatter plotsprotected GenericObjectEditorPanelm_PanelPaintletDisplas a GOE for choosing the paintlet for the scatterplotsprotected ArrayList<JPanel>m_Panelspanels displaying names of attributesprotected intm_PercentPercentage of sample to use for sum-sampleprotected JPanelm_ProgressPanel for displaying the progress barprotected ArrayList<ScatterPlotSimple>m_ScatterPlotsarray list contatining all of the scatter plots displayed in this matrix plotprotected JSpinnerm_Spinfor choosing the size of each scatter plotprotected JSpinnerm_SpinPercentSpinner for choosing percent of data to sampleprotected BaseButtonm_StopButton to stop the thread updating the overlaysprotected AbstractScatterPlotPaintletm_ValPaintlet for plotting, chosen using GOEprotected adams.gui.visualization.stats.scatterplot.Matrix.progressWorkerm_WorkSwing worker for displaying gui during update-
Fields inherited from class adams.gui.core.BasePanel
m_FileChooser
-
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 Matrix()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitGUI()For initializing the GUI.protected voidinitialize()For initializing members.voidpaint(Graphics g)voidredoPaintlets()Change the paintlet for each scatterplotvoidreset()Called by the class that creates this matrix panel once all he fields have been setvoidsetData(SpreadSheet inst)Set the instances to be displayedvoidsetOverlays(AbstractScatterPlotOverlay[] val)Set the overlays to be applied to each of the scatter plotsvoidsetPaintlet(AbstractScatterPlotPaintlet val)Set the paintlet used for plotting the data on each scatter plotvoidsetPercent(int val)Set the value to use for the percent subsamplevoidsetPlotSize(int val)Set the size of each of the scatter plotsvoidupdateOverlays()Updates the display.-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, finishInit, 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, 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
-
m_Centre
protected JPanel m_Centre
Panel for displaying the scatter plots
-
m_Spin
protected JSpinner m_Spin
for choosing the size of each scatter plot
-
m_Default
protected AbstractScatterPlotOverlay[] m_Default
for default value for overlays
-
m_PanelOverlay
protected GenericArrayEditorPanel m_PanelOverlay
Displays a GAE for choosing overlays for the scatter plots
-
m_PanelPaintlet
protected GenericObjectEditorPanel m_PanelPaintlet
Displas a GOE for choosing the paintlet for the scatterplots
-
m_Val
protected AbstractScatterPlotPaintlet m_Val
Paintlet for plotting, chosen using GOE
-
m_ScatterPlots
protected ArrayList<ScatterPlotSimple> m_ScatterPlots
array list contatining all of the scatter plots displayed in this matrix plot
-
m_Array
protected ArrayList<AbstractScatterPlotOverlay> m_Array
Overlays to be displayed
-
m_OldHash
protected HashSet<String> m_OldHash
Commandline strings of overlays before new overlays chosen
-
m_Def
protected AbstractScatterPlotPaintlet m_Def
Default paintlet for GOEpanel
-
m_Percent
protected int m_Percent
Percentage of sample to use for sum-sample
-
m_SpinPercent
protected JSpinner m_SpinPercent
Spinner for choosing percent of data to sample
-
m_DeleteOverlay
protected HashSet<String> m_DeleteOverlay
Commandline strings of overlays to be deleted
-
m_Bar
protected JProgressBar m_Bar
Progress bar for displaying update progress
-
m_Work
protected adams.gui.visualization.stats.scatterplot.Matrix.progressWorker m_Work
Swing worker for displaying gui during update
-
m_Progress
protected JPanel m_Progress
Panel for displaying the progress bar
-
m_NeedUpdate
protected boolean m_NeedUpdate
Whether an update is required, if an option has been changed
-
m_Stop
protected BaseButton m_Stop
Button to stop the thread updating the overlays
-
m_OptionPanel
protected ParameterPanel m_OptionPanel
Panel containing the matrix options
-
-
Method Detail
-
initialize
protected void initialize()
Description copied from class:BasePanelFor initializing members.- Overrides:
initializein classBasePanel
-
setData
public void setData(SpreadSheet inst)
Set the instances to be displayed- Parameters:
inst- Instances containing the data
-
updateOverlays
public void updateOverlays()
Updates the display. Uses the swing worker and shows a progress bar during updating
-
redoPaintlets
public void redoPaintlets()
Change the paintlet for each scatterplot
-
initGUI
public void initGUI()
Description copied from class:BasePanelFor initializing the GUI.
-
reset
public void reset()
Called by the class that creates this matrix panel once all he fields have been set
-
setPaintlet
public void setPaintlet(AbstractScatterPlotPaintlet val)
Set the paintlet used for plotting the data on each scatter plot- Parameters:
val- Paintlet used
-
setOverlays
public void setOverlays(AbstractScatterPlotOverlay[] val)
Set the overlays to be applied to each of the scatter plots- Parameters:
val- Array of overlays to be applied
-
setPlotSize
public void setPlotSize(int val)
Set the size of each of the scatter plots- Parameters:
val- Size in pixels
-
paint
public void paint(Graphics g)
- Overrides:
paintin classJComponent
-
setPercent
public void setPercent(int val)
Set the value to use for the percent subsample- Parameters:
val- Percent of original sample
-
-