adams.gui.visualization.stats.scatterplot
Class ScatterPlot

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 adams.gui.core.BasePanel
                      extended by adams.gui.visualization.core.PaintablePanel
                          extended by adams.gui.visualization.stats.scatterplot.AbstractScatterPlot
                              extended by adams.gui.visualization.stats.scatterplot.ScatterPlot
All Implemented Interfaces:
PaintListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class ScatterPlot
extends AbstractScatterPlot

create a paintable panel displaying a scatter plot panel as well as combo boxes for choosing attributes.

Version:
$Revision: 5340 $
Author:
msf8
See Also:
Serialized Form

Nested Class Summary
protected  class ScatterPlot.AttXListener
          Listener for when the x attribute JComboBox selection changes
protected  class ScatterPlot.AttYListener
          Listener for when the y attribute JComboBox selection changes
 
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  JComboBox m_AttX
          For choosing attribute to display on y axis
protected  JComboBox m_AttY
          For choosing attribute to display on x axis
protected  DefaultComboBoxModel m_ComboBoxX
          Model for the comboBox choosing the x attribute to display
protected  DefaultComboBoxModel m_ComboBoxY
          Model for the comboBox choosing the y attribute to display
protected  AbstractScatterPlotPaintlet m_Def
          default paintlet for GOEpanel
protected  AbstractScatterPlotOverlay[] m_Default
          default object for the GAE
protected  GenericArrayEditorPanel m_PanelOverlay
          for displaying a genericarrayEditor for choosing overlays
protected  GenericObjectEditorPanel m_PanelPaintlet
          for displaying a genericobjecteditor for choosing paintlet
protected  Index m_XInd
          Index object given as an option to choose x object
protected  BaseRegExp m_XIndexReg
          Regular expression given as an option to choose x attribute
protected  Index m_YInd
          Index given as an option to choose y attribute
protected  BaseRegExp m_YIndexReg
          regular expression given as an option to choose y attribute
 
Fields inherited from class adams.gui.visualization.stats.scatterplot.AbstractScatterPlot
m_Array, m_Instances, m_Plot, m_Val, m_XIndex, m_YIndex
 
Fields inherited from class adams.gui.visualization.core.PaintablePanel
m_Paintlets
 
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
ScatterPlot()
           
 
Method Summary
 void change()
          called when a field has changed, updates all paintlets etc
 AbstractScatterPlotOverlay[] getOverlays()
          Get the overlays array containing overlays to apply
 AbstractScatterPlotPaintlet getPaintlet()
          Get the paintlet used initially to plot the data
 PlotPanel getPlot()
           
 Index getX_Ind()
          Get the index object for choosing the attribute to display
 BaseRegExp getX_IndexReg()
          Gets the regular expression used when determining the x attribute
 Index getY_Ind()
          Get the index object for choosing the y attribute
 BaseRegExp getY_IndexReg()
          Gets the regular expression used when determining the y attribute
protected  void initGUI()
           
protected  void initialize()
           
 void prepareUpdate()
          Updates the overlays, calculates each
 void reset()
          Called by the class that creates this scatterplot called after fields have been set
 void setOverlays(AbstractScatterPlotOverlay[] val)
          Set the overlays array containing overlays to apply
 void setPaintlet(AbstractScatterPlotPaintlet val)
          Set the paintlet to use initially to plot the data
 void setX_Ind(Index val)
          Set the x attribute index
 void setX_IndexReg(BaseRegExp val)
          Set the regular expression to use when determining the x attribute
 void setY_Ind(Index val)
          Set the index for the y attribute
 void setY_IndexReg(BaseRegExp val)
          Set the regular expression to use when determining the y attribute
 
Methods inherited from class adams.gui.visualization.stats.scatterplot.AbstractScatterPlot
canPaint, getInstances, getX_Index, getY_Index, removeOverlays, setInstances, setX, setY
 
Methods inherited from class adams.gui.visualization.core.PaintablePanel
addPaintlet, paint, painted, paintlets, performUpdate, postUpdate, removePaintlet, update
 
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, finishInit, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, main, 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, 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, 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, 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, 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_XIndexReg

protected BaseRegExp m_XIndexReg
Regular expression given as an option to choose x attribute


m_XInd

protected Index m_XInd
Index object given as an option to choose x object


m_YIndexReg

protected BaseRegExp m_YIndexReg
regular expression given as an option to choose y attribute


m_YInd

protected Index m_YInd
Index given as an option to choose y attribute


m_AttY

protected JComboBox m_AttY
For choosing attribute to display on x axis


m_AttX

protected JComboBox m_AttX
For choosing attribute to display on y axis


m_ComboBoxX

protected DefaultComboBoxModel m_ComboBoxX
Model for the comboBox choosing the x attribute to display


m_ComboBoxY

protected DefaultComboBoxModel m_ComboBoxY
Model for the comboBox choosing the y attribute to display


m_PanelOverlay

protected GenericArrayEditorPanel m_PanelOverlay
for displaying a genericarrayEditor for choosing overlays


m_PanelPaintlet

protected GenericObjectEditorPanel m_PanelPaintlet
for displaying a genericobjecteditor for choosing paintlet


m_Default

protected AbstractScatterPlotOverlay[] m_Default
default object for the GAE


m_Def

protected AbstractScatterPlotPaintlet m_Def
default paintlet for GOEpanel

Constructor Detail

ScatterPlot

public ScatterPlot()
Method Detail

initialize

protected void initialize()
Overrides:
initialize in class PaintablePanel

getPlot

public PlotPanel getPlot()
Overrides:
getPlot in class AbstractScatterPlot

reset

public void reset()
Called by the class that creates this scatterplot called after fields have been set


initGUI

protected void initGUI()
Overrides:
initGUI in class BasePanel

getX_Ind

public Index getX_Ind()
Get the index object for choosing the attribute to display

Returns:
chosen index

setX_Ind

public void setX_Ind(Index val)
Set the x attribute index

Parameters:
val - chosen index

getY_Ind

public Index getY_Ind()
Get the index object for choosing the y attribute

Returns:
chosen index

setY_Ind

public void setY_Ind(Index val)
Set the index for the y attribute

Parameters:
val - chosen y index

setX_IndexReg

public void setX_IndexReg(BaseRegExp val)
Set the regular expression to use when determining the x attribute

Parameters:
val - regular expression for choosing x attribute

getX_IndexReg

public BaseRegExp getX_IndexReg()
Gets the regular expression used when determining the x attribute

Returns:
regular expression for choosing x attribute

setY_IndexReg

public void setY_IndexReg(BaseRegExp val)
Set the regular expression to use when determining the y attribute

Parameters:
val - regular expression for choosing y attribute

getY_IndexReg

public BaseRegExp getY_IndexReg()
Gets the regular expression used when determining the y attribute

Returns:
regular expression for choosing y attribute

setOverlays

public void setOverlays(AbstractScatterPlotOverlay[] val)
Set the overlays array containing overlays to apply

Parameters:
val - Array containing overlays to apply to the scatter plot

getOverlays

public AbstractScatterPlotOverlay[] getOverlays()
Get the overlays array containing overlays to apply

Parameters:
val - Array containing overlays to apply to the scatter plot

getPaintlet

public AbstractScatterPlotPaintlet getPaintlet()
Get the paintlet used initially to plot the data

Returns:
Paintlet used

setPaintlet

public void setPaintlet(AbstractScatterPlotPaintlet val)
Set the paintlet to use initially to plot the data

Overrides:
setPaintlet in class AbstractScatterPlot
Parameters:
val - Initial paintlet to use

change

public void change()
called when a field has changed, updates all paintlets etc


prepareUpdate

public void prepareUpdate()
Updates the overlays, calculates each

Specified by:
prepareUpdate in class PaintablePanel


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