adams.gui.visualization.heatmap
Class HeatmapPanel

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.heatmap.HeatmapPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class HeatmapPanel
extends BasePanel

Panel for displaying a single heatmap.

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

Nested Class Summary
 
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  CentroidOverlay m_CentroidOverlay
          the centroid image overlay.
protected  AbstractColorGradientGenerator m_ColorGenerator
          the color generator to use.
protected  Heatmap m_Heatmap
          the heatmap on display.
protected  ImagePanel m_HeatmapImage
          the panel for displaying the heatmap as image.
protected  SpreadSheetTable m_HeatmapTable
          the table with the heatmap as spreadsheet.
protected  HeatmapViewerPanel m_Owner
          the owner.
protected static Properties m_Properties
          the setup for the panel.
protected  AbstractHeatmapReader m_Reader
          the reader that was used for reading in the heatmap.
protected  ReportFactory.Table m_ReportTable
          the report of the heatmap.
protected  SearchPanel m_SearchPanel
          the search panel for the heatmap report.
protected  BaseSplitPane m_SplitPane
          the split pane for image/spreadsheet and report.
protected  BaseTabbedPane m_TabbedPane
          the tabbed pane for the image and spreadsheet view.
 
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
HeatmapPanel(HeatmapViewerPanel owner)
          Initializes the panel.
 
Method Summary
 boolean canReload()
          Checks whether this panel can be reloaded.
 AbstractColorGradientGenerator getColorGenerator()
          Returns the generator for the color gradient.
 Heatmap getHeatmap()
          The current heatmap on display.
 ImagePanel getImagePanel()
          Returns the underlying image panel
 HeatmapViewerPanel getOwner()
          Returns the owner of this panel.
 Properties getProperties()
          Returns the properties for this panel.
 AbstractHeatmapReader getReader()
          Returns the heatmap reader that was used for loading this heatmap.
 boolean getShowCentroid()
          Returns whether the centroid overlay is painted as well.
 String getTitle()
          Returns the database ID or filename as title.
protected  void initGUI()
          Initializes the widgets.
protected  void initialize()
          Initializes the members.
 boolean isSearchPanelVisible()
          Returns whether the search panel is visible.
 boolean reload()
          Reloads the data, if possible.
 void search(String text, boolean isRegExp)
          Performs a search.
 void setColorGenerator(AbstractColorGradientGenerator value)
          Sets the generator for the color gradient.
 void setHeatmap(Heatmap value)
          Sets the heatmap to display.
 void setReader(AbstractHeatmapReader value)
          Sets the heatmap reader that was used for loading this heatmap.
 void setSearchPanelVisible(boolean value)
          Sets whether to display the search panel or not.
 void setShowCentroid(boolean value)
          Sets whether the centroid overlay is painted as well.
 void showNotes()
          Displays the notes of the heatmap.
 void showSpreadsheet()
          Displays the heatmap as spreadsheet.
 void showStatistics()
          Displays somes stats on the heatmap.
 
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_Properties

protected static Properties m_Properties
the setup for the panel.


m_Heatmap

protected Heatmap m_Heatmap
the heatmap on display.


m_HeatmapImage

protected ImagePanel m_HeatmapImage
the panel for displaying the heatmap as image.


m_HeatmapTable

protected SpreadSheetTable m_HeatmapTable
the table with the heatmap as spreadsheet.


m_ReportTable

protected ReportFactory.Table m_ReportTable
the report of the heatmap.


m_SearchPanel

protected SearchPanel m_SearchPanel
the search panel for the heatmap report.


m_SplitPane

protected BaseSplitPane m_SplitPane
the split pane for image/spreadsheet and report.


m_TabbedPane

protected BaseTabbedPane m_TabbedPane
the tabbed pane for the image and spreadsheet view.


m_Owner

protected HeatmapViewerPanel m_Owner
the owner.


m_Reader

protected AbstractHeatmapReader m_Reader
the reader that was used for reading in the heatmap.


m_CentroidOverlay

protected CentroidOverlay m_CentroidOverlay
the centroid image overlay.


m_ColorGenerator

protected AbstractColorGradientGenerator m_ColorGenerator
the color generator to use.

Constructor Detail

HeatmapPanel

public HeatmapPanel(HeatmapViewerPanel owner)
Initializes the panel.

Parameters:
owner - the owner of this panel
Method Detail

initialize

protected void initialize()
Initializes the members.

Overrides:
initialize in class BasePanel

initGUI

protected void initGUI()
Initializes the widgets.

Overrides:
initGUI in class BasePanel

getOwner

public HeatmapViewerPanel getOwner()
Returns the owner of this panel.

Returns:
the owner, null if none set

setHeatmap

public void setHeatmap(Heatmap value)
Sets the heatmap to display.

Parameters:
value - the heatmap to display

getHeatmap

public Heatmap getHeatmap()
The current heatmap on display.

Returns:
the heatmap on display

setReader

public void setReader(AbstractHeatmapReader value)
Sets the heatmap reader that was used for loading this heatmap. Used for reloading.

Parameters:
value - the reader

getReader

public AbstractHeatmapReader getReader()
Returns the heatmap reader that was used for loading this heatmap.

Returns:
the reader, null if loaded from database

setColorGenerator

public void setColorGenerator(AbstractColorGradientGenerator value)
Sets the generator for the color gradient.

Parameters:
value - the generator

getColorGenerator

public AbstractColorGradientGenerator getColorGenerator()
Returns the generator for the color gradient.

Returns:
the generator

getTitle

public String getTitle()
Returns the database ID or filename as title.

Returns:
the title

getImagePanel

public ImagePanel getImagePanel()
Returns the underlying image panel

Returns:
the panel

canReload

public boolean canReload()
Checks whether this panel can be reloaded.

Returns:
true if reload is possible

reload

public boolean reload()
Reloads the data, if possible.

Returns:
true if successfully reloaded

showSpreadsheet

public void showSpreadsheet()
Displays the heatmap as spreadsheet.


showStatistics

public void showStatistics()
Displays somes stats on the heatmap.


showNotes

public void showNotes()
Displays the notes of the heatmap.


search

public void search(String text,
                   boolean isRegExp)
Performs a search.

Parameters:
text - the search text
isRegExp - whether the search text is a regular expression

setSearchPanelVisible

public void setSearchPanelVisible(boolean value)
Sets whether to display the search panel or not.

Parameters:
value - if true then the search panel is displayed

isSearchPanelVisible

public boolean isSearchPanelVisible()
Returns whether the search panel is visible.

Returns:
true if the search panel is visible

setShowCentroid

public void setShowCentroid(boolean value)
Sets whether the centroid overlay is painted as well.

Parameters:
value - if true the centroid is painted

getShowCentroid

public boolean getShowCentroid()
Returns whether the centroid overlay is painted as well.

Returns:
true if the centroid is painted

getProperties

public Properties getProperties()
Returns the properties for this panel.

Returns:
the properties file for this panel


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