adams.gui.visualization.stats.zscore
Class ZScore

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.zscore.ZScore
All Implemented Interfaces:
PopupMenuCustomizer<MouseEvent>, PaintListener, TipTextCustomizer, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class ZScore
extends PaintablePanel
implements TipTextCustomizer, PopupMenuCustomizer

Create a paintable panel displaying a z score plot panel as well being able to choose attribute, paintlet and overlays.

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

Nested Class Summary
protected  class ZScore.AttListener
          Listener for when the attribute combobox selection changes
 class ZScore.gridListener
          Listener for the grid check box
 class ZScore.pushButton
          Listener for when the user clicks on an overlay in the key
 
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  ArrayList<DisplayExplorer> dialogs
          Current displayexplorers containing instance explorers being displayed
protected  JComboBox m_Att
          combo box for attribute selection
protected  BaseRegExp m_AttReg
          String for regular expression
protected  DefaultComboBoxModel m_ComboBox
          Model for the attribute combo box
protected  AbstractZScorePaintlet m_Def
          Default paintlet for the GOE panel
protected  AbstractZScoreOverlay[] m_Default
          default overlays for the GAE
protected  ZScoreHitDetector m_Detect
          Hit detector for tip text and pop up menu
protected  int m_Index
          Index of the attribute to be plotted
protected  Index m_Indx
          Index for choosing attribute
protected  Instances m_Instances
          Instances to be displayed
protected  JPanel m_Key
          Panel for displaying the key
protected  int m_NumDialogs
          number of instance explorer panels displayed
protected  AbstractZScoreOverlay[] m_Over
          overlays to be displayed
protected  GenericArrayEditorPanel m_PanelOverlay
          For displaying a generic array editor for choosing overlays
protected  GenericObjectEditorPanel m_PanelPaintlet
          For displaying a generic object editor for choosing the paintlet
protected  ZScorePanel m_Plot
          z score plot to be displayed
protected  BaseSplitPane m_SplitPane
          the split pane.
protected  AbstractZScorePaintlet m_Val
          Paintlet used for drawing the data
 
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
ZScore()
           
 
Method Summary
protected  boolean canPaint(Graphics g)
           
 void change()
          prepare for displaying
protected  void changePaintlet()
          called when the paintlet used is changed
 void customizePopupMenu(MouseEvent e, JPopupMenu menu)
           
 int getIndex()
          get the index of the attribute being displayed
 Instances getInstances()
          Get the instances being used by the z score plot
 boolean getOptionsVisible()
          Returns whether to hide/show the options panel.
 PlotPanel getPlot()
           
protected  void initGUI()
           
protected  void initialize()
           
 void prepareUpdate()
           
 String processTipText(PlotPanel panel, Point mouse, String tiptext)
           
 void removeOverlays()
          remove existing overlays and their paintlets
 void reset()
          called by the class that creates this z score plot called after the fields have all been set
 void setAttindex(Index val)
          Set the index to use when setting the attribute using an index
 void setAttReg(BaseRegExp val)
          Set the regular expression used when choosing the attribute
 void setInstances(Instances inst)
          set the instances to be used when drawing the z score graph
 void setOptionsVisible(boolean value)
          Sets whether to hide/show the options panel.
 void setOverlays(AbstractZScoreOverlay[] val)
          set the overlays to be displayed on the z score
 void setPaintlet(AbstractZScorePaintlet val)
          Set the paintlet to be used when plotting the data
 
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_Plot

protected ZScorePanel m_Plot
z score plot to be displayed


m_Instances

protected Instances m_Instances
Instances to be displayed


m_Val

protected AbstractZScorePaintlet m_Val
Paintlet used for drawing the data


m_Def

protected AbstractZScorePaintlet m_Def
Default paintlet for the GOE panel


m_Over

protected AbstractZScoreOverlay[] m_Over
overlays to be displayed


m_Default

protected AbstractZScoreOverlay[] m_Default
default overlays for the GAE


m_Index

protected int m_Index
Index of the attribute to be plotted


m_ComboBox

protected DefaultComboBoxModel m_ComboBox
Model for the attribute combo box


m_Att

protected JComboBox m_Att
combo box for attribute selection


m_PanelPaintlet

protected GenericObjectEditorPanel m_PanelPaintlet
For displaying a generic object editor for choosing the paintlet


m_PanelOverlay

protected GenericArrayEditorPanel m_PanelOverlay
For displaying a generic array editor for choosing overlays


m_Key

protected JPanel m_Key
Panel for displaying the key


m_AttReg

protected BaseRegExp m_AttReg
String for regular expression


m_Indx

protected Index m_Indx
Index for choosing attribute


m_Detect

protected ZScoreHitDetector m_Detect
Hit detector for tip text and pop up menu


dialogs

protected ArrayList<DisplayExplorer> dialogs
Current displayexplorers containing instance explorers being displayed


m_NumDialogs

protected int m_NumDialogs
number of instance explorer panels displayed


m_SplitPane

protected BaseSplitPane m_SplitPane
the split pane.

Constructor Detail

ZScore

public ZScore()
Method Detail

initialize

protected void initialize()
Overrides:
initialize in class PaintablePanel

setInstances

public void setInstances(Instances inst)
set the instances to be used when drawing the z score graph

Parameters:
inst -

getInstances

public Instances getInstances()
Get the instances being used by the z score plot

Returns:
instances used

getPlot

public PlotPanel getPlot()
Specified by:
getPlot in class PaintablePanel

prepareUpdate

public void prepareUpdate()
Specified by:
prepareUpdate in class PaintablePanel

canPaint

protected boolean canPaint(Graphics g)
Specified by:
canPaint in class PaintablePanel

reset

public void reset()
called by the class that creates this z score plot called after the fields have all been set


removeOverlays

public void removeOverlays()
remove existing overlays and their paintlets


changePaintlet

protected void changePaintlet()
called when the paintlet used is changed


initGUI

protected void initGUI()
Overrides:
initGUI in class BasePanel

change

public void change()
prepare for displaying


getIndex

public int getIndex()
get the index of the attribute being displayed

Returns:
index of attribute

setOverlays

public void setOverlays(AbstractZScoreOverlay[] val)
set the overlays to be displayed on the z score

Parameters:
val - Array of overlays

setPaintlet

public void setPaintlet(AbstractZScorePaintlet val)
Set the paintlet to be used when plotting the data

Parameters:
val - Paintlet for plotting

setAttReg

public void setAttReg(BaseRegExp val)
Set the regular expression used when choosing the attribute

Parameters:
val - String for regular expression

setAttindex

public void setAttindex(Index val)
Set the index to use when setting the attribute using an index

Parameters:
val - index for choosing attribute

processTipText

public String processTipText(PlotPanel panel,
                             Point mouse,
                             String tiptext)
Specified by:
processTipText in interface TipTextCustomizer

customizePopupMenu

public void customizePopupMenu(MouseEvent e,
                               JPopupMenu menu)
Specified by:
customizePopupMenu in interface PopupMenuCustomizer<MouseEvent>

setOptionsVisible

public void setOptionsVisible(boolean value)
Sets whether to hide/show the options panel.

Parameters:
value - if true then the options are visible

getOptionsVisible

public boolean getOptionsVisible()
Returns whether to hide/show the options panel.

Parameters:
value - true if the options are visible


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