jigcell.compare.ui
Class SeriesDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by jigcell.compare.ui.ViewerDialog
                          extended by jigcell.compare.ui.SeriesDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, ITab, ICellEditorTab, IRowSelectionTab
Direct Known Subclasses:
CellCycleDataDialog, SeriesEditorDialog

public class SeriesDialog
extends ViewerDialog
implements java.awt.event.ActionListener, ICellEditorTab, IRowSelectionTab, java.awt.event.MouseListener

A dialog-based cell viewer for multi-dimensional data.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen
See Also:
Serialized Form

Nested Class Summary
protected  class SeriesDialog.SeriesModel
          Model for a list viewer dialog.
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected static java.lang.String BUTTON_CLOSE
          Close button label
protected  ITypeChecker checker
          Type checker for the element
protected  IDataElement element
          DataElement being viewed
protected  IDataGenerator generator
          Generator for the element being viewed
protected  MenuBuilder menuManager
          Menu manager
protected  SeriesDialog.SeriesModel newModel
          Model of current table
protected  javax.swing.JPopupMenu popup
          Context menu
protected static java.lang.String POPUP_DEFAULT
          Default name for a popup
protected  java.awt.Point popupPoint
          Location of last popup invocation
protected  BasicTable table
          Current table
 
Fields inherited from class jigcell.compare.ui.ViewerDialog
area, column, compare, DEFAULT_HEIGHT, DEFAULT_WIDTH, initialHeight, initialWidth, model, row
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface jigcell.compare.ITab
CONFIG_TABNAME, STATE_ENDINITIALIZE, STATE_ENDUI, STATE_INITIALIZE, STATE_RUNNING, STATES
 
Fields inherited from interface jigcell.compare.ITab
CONFIG_TABNAME, STATE_ENDINITIALIZE, STATE_ENDUI, STATE_INITIALIZE, STATE_RUNNING, STATES
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
  SeriesDialog(Compare compare, IDataElement element, java.lang.String name, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for viewing list based data.
protected SeriesDialog(Compare compare, IDataGenerator generator, IDataElement element, ITypeChecker checker, java.lang.String name, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for viewing list based data.
  SeriesDialog(Compare compare, IDataGenerator generator, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for viewing list based data.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 javax.swing.JDialog createAboutDialog()
          Creates an about dialog for this tab or null if this tab does not describe itself.
protected  javax.swing.JPanel createButtons()
          The buttons to be displayed in the dialog.
 IConfigEditor createConfigEditor()
          Creates a configuration editor for this tab or null if this tab does not support graphical configuration.
protected  javax.swing.JPanel createControl()
          The contents to be displayed in the dialog.
protected  javax.swing.JPanel createControl(SeriesDialog.SeriesModel model)
          The contents to be displayed in the dialog.
protected  void createUI()
          Lays out the dialog.
 void editCell(int row, int column)
          Starts editing a cell.
 void fillDown(int row, int column)
          Fills a column down with a value.
 void fillSelected(int row, int column, int[] rows)
          Fills a column at selected spots with a value.
 void fillUp(int row, int column)
          Fills a column up with a value.
 java.lang.String getName()
          The name of this tab.
 int[] getSelectedRows()
          The selected rows of the table.
protected  void initialize()
          Performs initialization work for the view.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void readConfiguration(java.lang.String state)
          Reads the view configuration from the Comparator.
 void selectAll()
          Selects all cells in the table.
 void selectInvert()
          Inverts the table selection along the default direction.
 void selectInvertRows()
          Inverts the table selection along the rows.
 void selectNone()
          Unselects all cells in the table.
 void setSelectedRows(int[] rows)
          Sets the table row selection.
 void setVisible(boolean show)
           
 void viewCell(int row, int column)
          Starts viewing a cell.
 
Methods inherited from class jigcell.compare.ui.ViewerDialog
getInitialHeight, getInitialWidth, setInitialHeight, setInitialWidth
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUTTON_CLOSE

protected static final java.lang.String BUTTON_CLOSE
Close button label

See Also:
Constant Field Values

POPUP_DEFAULT

protected static final java.lang.String POPUP_DEFAULT
Default name for a popup

See Also:
Constant Field Values

table

protected BasicTable table
Current table


element

protected IDataElement element
DataElement being viewed


generator

protected IDataGenerator generator
Generator for the element being viewed


checker

protected ITypeChecker checker
Type checker for the element


popup

protected javax.swing.JPopupMenu popup
Context menu


menuManager

protected MenuBuilder menuManager
Menu manager


popupPoint

protected java.awt.Point popupPoint
Location of last popup invocation


newModel

protected SeriesDialog.SeriesModel newModel
Model of current table

Constructor Detail

SeriesDialog

public SeriesDialog(Compare compare,
                    IDataElement element,
                    java.lang.String name,
                    int row,
                    int column,
                    BasicTable.BasicTableModel model)
Creates a new dialog for viewing list based data.

Parameters:
compare - Comparator to attach to
element - Data element
name - Name to display
row - Row in original model to base on
column - Column in original model to base on
model - Original model to base on

SeriesDialog

public SeriesDialog(Compare compare,
                    IDataGenerator generator,
                    int row,
                    int column,
                    BasicTable.BasicTableModel model)
Creates a new dialog for viewing list based data.

Parameters:
compare - Comparator to attach to
generator - Generator
row - Row in original model to base on
column - Column in original model to base on
model - Original model to base on

SeriesDialog

protected SeriesDialog(Compare compare,
                       IDataGenerator generator,
                       IDataElement element,
                       ITypeChecker checker,
                       java.lang.String name,
                       int row,
                       int column,
                       BasicTable.BasicTableModel model)
Creates a new dialog for viewing list based data.

Parameters:
compare - Comparator to attach to
generator - Generator
element - Data element
checker - Type checker
name - Name to display
row - Row in original model to base on
column - Column in original model to base on
model - Original model to base on
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

createAboutDialog

public javax.swing.JDialog createAboutDialog()
Creates an about dialog for this tab or null if this tab does not describe itself.

Specified by:
createAboutDialog in interface ITab

createConfigEditor

public IConfigEditor createConfigEditor()
Creates a configuration editor for this tab or null if this tab does not support graphical configuration.

Specified by:
createConfigEditor in interface ITab

editCell

public void editCell(int row,
                     int column)
Starts editing a cell.

Specified by:
editCell in interface ICellEditorTab
Parameters:
row - Row
column - Column

fillDown

public void fillDown(int row,
                     int column)
Fills a column down with a value.

Specified by:
fillDown in interface ICellEditorTab
Parameters:
row - Starting row
column - Column

fillSelected

public void fillSelected(int row,
                         int column,
                         int[] rows)
Fills a column at selected spots with a value.

Specified by:
fillSelected in interface ICellEditorTab
Parameters:
row - Starting row
column - Column
rows - Selected rows

fillUp

public void fillUp(int row,
                   int column)
Fills a column up with a value.

Specified by:
fillUp in interface ICellEditorTab
Parameters:
row - Starting row
column - Column

getName

public java.lang.String getName()
The name of this tab.

Specified by:
getName in interface ITab
Overrides:
getName in class java.awt.Component

getSelectedRows

public int[] getSelectedRows()
The selected rows of the table.

Specified by:
getSelectedRows in interface IRowSelectionTab

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

readConfiguration

public void readConfiguration(java.lang.String state)
Reads the view configuration from the Comparator.

Specified by:
readConfiguration in interface ITab
Parameters:
state - Current state of the view

selectAll

public void selectAll()
Selects all cells in the table.

Specified by:
selectAll in interface IRowSelectionTab

selectInvert

public void selectInvert()
Inverts the table selection along the default direction.

Specified by:
selectInvert in interface IRowSelectionTab

selectInvertRows

public void selectInvertRows()
Inverts the table selection along the rows.

Specified by:
selectInvertRows in interface IRowSelectionTab

selectNone

public void selectNone()
Unselects all cells in the table.

Specified by:
selectNone in interface IRowSelectionTab

setSelectedRows

public void setSelectedRows(int[] rows)
Sets the table row selection.

Specified by:
setSelectedRows in interface IRowSelectionTab
Parameters:
rows - Rows

setVisible

public void setVisible(boolean show)
Overrides:
setVisible in class ViewerDialog

viewCell

public void viewCell(int row,
                     int column)
Starts viewing a cell.

Specified by:
viewCell in interface ICellEditorTab
Parameters:
row - Row
column - Column

createButtons

protected javax.swing.JPanel createButtons()
The buttons to be displayed in the dialog.


createControl

protected javax.swing.JPanel createControl()
The contents to be displayed in the dialog.

Overrides:
createControl in class ViewerDialog

createControl

protected javax.swing.JPanel createControl(SeriesDialog.SeriesModel model)
The contents to be displayed in the dialog.

Parameters:
model - Source of display data

createUI

protected void createUI()
Lays out the dialog.

Overrides:
createUI in class ViewerDialog

initialize

protected void initialize()
Performs initialization work for the view.