jigcell.compare.ui
Class SeriesEditorDialog

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
                              extended by jigcell.compare.ui.SeriesEditorDialog
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, IRowEditorTab, IRowSelectionTab
Direct Known Subclasses:
WeightEditorDialog

public class SeriesEditorDialog
extends SeriesDialog
implements IRowEditorTab

A dialog-based cell editor 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 SeriesEditorDialog.SeriesEditorModel
          Model for a list editor dialog.
 
Nested classes/interfaces inherited from class jigcell.compare.ui.SeriesDialog
SeriesDialog.SeriesModel
 
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  IEditableDataElement element
          DataElement being edited
protected  IEditableDataGenerator generator
          Generator for the element being edited
protected static java.lang.String MESSAGE_VALUEERROR
          Error message for unapplyable value
protected  SeriesEditorDialog.SeriesEditorModel newModel
          Model of current table
 
Fields inherited from class jigcell.compare.ui.SeriesDialog
BUTTON_CLOSE, checker, menuManager, popup, POPUP_DEFAULT, popupPoint, 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 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
  SeriesEditorDialog(Compare compare, IEditableDataElement element, java.lang.String name, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for editing list based data.
protected SeriesEditorDialog(Compare compare, IEditableDataGenerator generator, IEditableDataElement element, ITypeChecker checker, java.lang.String name, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for editing list based data.
  SeriesEditorDialog(Compare compare, IEditableDataGenerator generator, int row, int column, BasicTable.BasicTableModel model)
          Creates a new dialog for editing list based data.
 
Method Summary
 void addRow()
          Adds a new row to the view.
 void addRows(int count)
          Adds several new rows to the view.
 void clear()
           
protected  javax.swing.JPanel createControl()
          The contents to be displayed in the dialog.
protected  javax.swing.JPanel createControl(SeriesEditorDialog.SeriesEditorModel model)
          The contents to be displayed in the dialog.
 void deleteRow(int row)
          Deletes a row from the table.
 void deleteRows(int[] rows)
          Deletes rows from the table.
 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.
 int getRowCount()
          The number of rows in the table.
 java.lang.Object getRowData(int row)
          The data for a row in the table or null if the row is not valid.
protected  java.lang.Object getValue()
          The value being edited.
 void insertRow(int row)
          Inserts a row at a specified location.
 void insertRows(int row, int count)
          Inserts a number of new rows at a specified location.
 void moveRowsDown(int[] rows)
          Moves selected rows down.
 void moveRowsUp(int[] rows)
          Moves selected rows up.
 
Methods inherited from class jigcell.compare.ui.SeriesDialog
actionPerformed, createAboutDialog, createButtons, createConfigEditor, createControl, createUI, getName, getSelectedRows, initialize, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, readConfiguration, selectAll, selectInvert, selectInvertRows, selectNone, setSelectedRows, setVisible, viewCell
 
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
 
Methods inherited from interface jigcell.compare.ITab
createAboutDialog, createConfigEditor, getName, readConfiguration
 

Field Detail

MESSAGE_VALUEERROR

protected static final java.lang.String MESSAGE_VALUEERROR
Error message for unapplyable value

See Also:
Constant Field Values

element

protected IEditableDataElement element
DataElement being edited


generator

protected IEditableDataGenerator generator
Generator for the element being edited


newModel

protected SeriesEditorDialog.SeriesEditorModel newModel
Model of current table

Constructor Detail

SeriesEditorDialog

public SeriesEditorDialog(Compare compare,
                          IEditableDataElement element,
                          java.lang.String name,
                          int row,
                          int column,
                          BasicTable.BasicTableModel model)
Creates a new dialog for editing 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

SeriesEditorDialog

public SeriesEditorDialog(Compare compare,
                          IEditableDataGenerator generator,
                          int row,
                          int column,
                          BasicTable.BasicTableModel model)
Creates a new dialog for editing list based data.

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

SeriesEditorDialog

protected SeriesEditorDialog(Compare compare,
                             IEditableDataGenerator generator,
                             IEditableDataElement element,
                             ITypeChecker checker,
                             java.lang.String name,
                             int row,
                             int column,
                             BasicTable.BasicTableModel model)
Creates a new dialog for editing list based data.

Parameters:
compare - Comparator to attach to
generator - Generator supporting editing
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

addRow

public void addRow()
Adds a new row to the view.

Specified by:
addRow in interface IRowEditorTab

addRows

public void addRows(int count)
Adds several new rows to the view.

Specified by:
addRows in interface IRowEditorTab
Parameters:
count - Number of rows

clear

public void clear()
See Also:
IDataEditorTab.clear()

deleteRow

public void deleteRow(int row)
Deletes a row from the table.

Specified by:
deleteRow in interface IRowEditorTab
Parameters:
row - Row

deleteRows

public void deleteRows(int[] rows)
Deletes rows from the table.

Specified by:
deleteRows in interface IRowEditorTab
Parameters:
rows - Rows

editCell

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

Specified by:
editCell in interface ICellEditorTab
Overrides:
editCell in class SeriesDialog
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
Overrides:
fillDown in class SeriesDialog
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
Overrides:
fillSelected in class SeriesDialog
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
Overrides:
fillUp in class SeriesDialog
Parameters:
row - Starting row
column - Column

getRowCount

public int getRowCount()
Description copied from interface: IRowEditorTab
The number of rows in the table.

Specified by:
getRowCount in interface IRowEditorTab
See Also:
IRowEditorTab.getRowCount()

getRowData

public java.lang.Object getRowData(int row)
Description copied from interface: IRowEditorTab
The data for a row in the table or null if the row is not valid.

Specified by:
getRowData in interface IRowEditorTab
Parameters:
row - Row
See Also:
IRowEditorTab.getRowData(int)

insertRow

public void insertRow(int row)
Inserts a row at a specified location.

Specified by:
insertRow in interface IRowEditorTab
Parameters:
row - Row to insert at

insertRows

public void insertRows(int row,
                       int count)
Inserts a number of new rows at a specified location.

Specified by:
insertRows in interface IRowEditorTab
Parameters:
row - Row to insert at
count - Number of rows to insert

moveRowsDown

public void moveRowsDown(int[] rows)
Moves selected rows down.

Specified by:
moveRowsDown in interface IRowEditorTab
Parameters:
rows - Rows

moveRowsUp

public void moveRowsUp(int[] rows)
Moves selected rows up.

Specified by:
moveRowsUp in interface IRowEditorTab
Parameters:
rows - Rows

createControl

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

Overrides:
createControl in class SeriesDialog

createControl

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

Parameters:
model - Source of display data

getValue

protected java.lang.Object getValue()
The value being edited.