jigcell.compare.views
Class EditableSeriesView

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 jigcell.compare.ui.PanelTab
                      extended by jigcell.compare.ui.DataEditorPanelTab
                          extended by jigcell.compare.views.BasicTableView
                              extended by jigcell.compare.views.SeriesView
                                  extended by jigcell.compare.views.EditableSeriesView
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListSelectionListener, ITab, IBasicTableHost, ICellEditorTab, IClipboardTab, IDataEditorTab, INameFinderTab, IRowEditorTab, IRowSelectionTab
Direct Known Subclasses:
CellCycleExperimentView, CellCycleTransformView, ObjectiveSeriesView

public class EditableSeriesView
extends SeriesView
implements ICellEditorTab, IClipboardTab, IDataEditorTab, IRowEditorTab

An editable display for presenting a two-dimensional set of data organized by generators.

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 EditableSeriesView.EditableSeriesModel
          Table model for an EditableDataSeriesView.
 
Nested classes/interfaces inherited from class jigcell.compare.views.SeriesView
SeriesView.SeriesModel, SeriesView.SeriesViewTransferer
 
Nested classes/interfaces inherited from class jigcell.compare.ui.DataEditorPanelTab
DataEditorPanelTab.ReadHelper
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
static java.lang.String CONFIG_PLOTTER
          Property key for the plotter class
protected static SuffixFileFilter FILTER_EXPERIMENT
          File filter for experimental data files
protected  EditableSeriesView.EditableSeriesModel model
          Data model of the generators
protected  IPlotter plotter
          Plotter
protected static java.lang.String POPUP_PLOTTER
          Name of popup with plotter options
 
Fields inherited from class jigcell.compare.views.SeriesView
CONFIG_TEXTCUTOFF, generators, textCutoff, VALUE_NOTAVAILABLE
 
Fields inherited from class jigcell.compare.views.BasicTableView
clipboard, lastSearchName, popup, POPUP_DEFAULT, popupPoint, printer, RESOURCE_LASTTABLESELECTION, RESOURCE_TABLESELECTION, selectionGroup, table
 
Fields inherited from class jigcell.compare.ui.DataEditorPanelTab
CONFIG_RECENTSOURCE, CONFIG_RECENTSOURCECOUNT, exception, manager, MENU_OPENRECENT, MENUBAR_DEFAULT, menuManager, menus, MESSAGE_LOADERROR, MESSAGE_LOADING, MESSAGE_SAVEERROR, OPTION_CHOOSEROPEN, OPTION_CHOOSERSAVE, PROPERTY_RECENTSOURCETARGET, READ_LOCK, recentReadablesMenu, TOOLBAR_DEFAULT
 
Fields inherited from class jigcell.compare.ui.PanelTab
compare, configMarkers, PATH_ABOUT, PATH_DESCRIPTION_ABOUT, tabName
 
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 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 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
EditableSeriesView(Compare compare, java.lang.String configMarker)
          Creates a new table view with the ability to edit 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()
          Clears all data for this view.
 void clearAndNew()
          Create a new data set for editing.
 void clipboardCut()
          Cuts all rows to the clipboard.
 void clipboardCut(int[] rows)
          Cuts selected rows to the clipboard.
 void clipboardPaste()
          Pastes from the clipboard.
 IConfigEditor createConfigEditor()
          Creates a configuration editor for this tab or null if this tab does not support graphical configuration.
protected  javax.swing.JFileChooser createFileChooser()
          A file chooser specialized for the view.
protected  IDataGeneratorList createGenerators()
          A list of generators for the view.
protected  javax.swing.JPopupMenu createPopup()
          Creates a context menu for the view.
protected  void createUI()
          Creates an interface for the view.
protected  void createUI(EditableSeriesView.EditableSeriesModel model)
           
 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.
protected  void initialize()
          Performs any initialization work for the view.
 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.
 void plotCell(int row, int column)
          Plots the data contained in a table cell.
protected  void preparePopup(int row, int column)
          Prepares the popup for display.
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void readConfiguration(java.lang.String state)
          Reads the view configuration from the Comparator.
protected  void readInternal(java.lang.Object readResult)
          Processes data that has been read from some external source.
protected  void readNotify()
          Notifies listeners after a read operation has completed.
 void setCurrentSource(IWriteableDataSource source)
          Sets the current data source to work from.
 void viewCell(int row, int column)
          Starts viewing a cell.
protected  void write(IWriteableDataSource source)
          Writes data to some external source.
 
Methods inherited from class jigcell.compare.views.SeriesView
clipboardCopy, clipboardCopy, copyGenerator, createUI, findByName, getRowCount, getRowData, initializeData, print
 
Methods inherited from class jigcell.compare.views.BasicTableView
clipboardWrite, createUI, findByName, findByName, findByName, findByName, getColumnCount, getColumnData, getLastSearchName, getSelectedColumns, getSelectedRows, getSelectionGroup, getTable, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, selectAll, selectInvert, selectInvertColumns, selectInvertRows, selectNone, setSelectedColumns, setSelectedRows, setSelectionGroup, valueChanged
 
Methods inherited from class jigcell.compare.ui.DataEditorPanelTab
addRecentSource, createMenus, createReadableRecentSourceMenuItems, createTools, getCurrentSource, getRecentSource, getRecentSourceCount, load, loadDirect, loadRecentSource, save, saveDirect
 
Methods inherited from class jigcell.compare.ui.PanelTab
createAboutDialog, createAboutDialogForTab, getCompare, getConfigForView, getConfigMarkers, getHostIdentifier, getName
 
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, 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, 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, setVisible, 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, 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
 
Methods inherited from interface jigcell.compare.ITab
createAboutDialog, getName
 
Methods inherited from interface jigcell.compare.ui.IClipboardTab
clipboardCopy, clipboardCopy
 
Methods inherited from interface jigcell.compare.ITab
createAboutDialog, getName
 
Methods inherited from interface jigcell.compare.ui.IDataEditorTab
getCurrentSource, load, loadDirect, save, saveDirect
 
Methods inherited from interface jigcell.compare.ITab
createAboutDialog, getName
 
Methods inherited from interface jigcell.compare.ui.IRowEditorTab
getRowCount, getRowData
 
Methods inherited from interface jigcell.compare.ITab
createAboutDialog, getName
 
Methods inherited from interface jigcell.compare.ui.IRowSelectionTab
getSelectedRows, selectAll, selectInvert, selectInvertRows, selectNone, setSelectedRows
 
Methods inherited from interface jigcell.compare.ui.IBasicTableHost
getCompare, getConfigMarkers, getHostIdentifier
 

Field Detail

CONFIG_PLOTTER

public static final java.lang.String CONFIG_PLOTTER
Property key for the plotter class

See Also:
Constant Field Values

POPUP_PLOTTER

protected static final java.lang.String POPUP_PLOTTER
Name of popup with plotter options

See Also:
Constant Field Values

FILTER_EXPERIMENT

protected static final SuffixFileFilter FILTER_EXPERIMENT
File filter for experimental data files


model

protected EditableSeriesView.EditableSeriesModel model
Data model of the generators


plotter

protected IPlotter plotter
Plotter

Constructor Detail

EditableSeriesView

public EditableSeriesView(Compare compare,
                          java.lang.String configMarker)
Creates a new table view with the ability to edit data.

Parameters:
compare - Comparator backend to interface with
configMarker - Marker for retrieving configuration information from Comparator backend
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()
Clears all data for this view.

Specified by:
clear in interface IDataEditorTab

clearAndNew

public void clearAndNew()
Create a new data set for editing.

Specified by:
clearAndNew in interface IDataEditorTab

clipboardCut

public void clipboardCut()
Cuts all rows to the clipboard.

Specified by:
clipboardCut in interface IClipboardTab
Overrides:
clipboardCut in class SeriesView

clipboardCut

public void clipboardCut(int[] rows)
Cuts selected rows to the clipboard.

Specified by:
clipboardCut in interface IClipboardTab
Overrides:
clipboardCut in class SeriesView
Parameters:
rows - Rows

clipboardPaste

public void clipboardPaste()
Pastes from the clipboard.

Specified by:
clipboardPaste in interface IClipboardTab
Overrides:
clipboardPaste in class SeriesView

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
Overrides:
createConfigEditor in class PanelTab

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
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

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

plotCell

public void plotCell(int row,
                     int column)
Plots the data contained in a table cell.

Parameters:
row - Row
column - Column

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class PanelTab

readConfiguration

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

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

setCurrentSource

public void setCurrentSource(IWriteableDataSource source)
Sets the current data source to work from.

Specified by:
setCurrentSource in interface IDataEditorTab
Overrides:
setCurrentSource in class DataEditorPanelTab
Parameters:
source - Data source

viewCell

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

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

createFileChooser

protected javax.swing.JFileChooser createFileChooser()
A file chooser specialized for the view.

Overrides:
createFileChooser in class DataEditorPanelTab

createGenerators

protected IDataGeneratorList createGenerators()
A list of generators for the view.

Overrides:
createGenerators in class SeriesView

createPopup

protected javax.swing.JPopupMenu createPopup()
Creates a context menu for the view.

Overrides:
createPopup in class BasicTableView

createUI

protected void createUI()
Creates an interface for the view.

Overrides:
createUI in class SeriesView

createUI

protected void createUI(EditableSeriesView.EditableSeriesModel model)
See Also:
BasicTableView.createUI(jigcell.compare.ui.BasicTable.BasicTableModel)

initialize

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

Overrides:
initialize in class SeriesView

preparePopup

protected void preparePopup(int row,
                            int column)
Prepares the popup for display.

Overrides:
preparePopup in class BasicTableView
Parameters:
row - Model row of the popup point
column - Model column of the popup point

readInternal

protected void readInternal(java.lang.Object readResult)
                     throws java.lang.Exception
Processes data that has been read from some external source.

Overrides:
readInternal in class DataEditorPanelTab
Parameters:
readResult - Data
Throws:
java.lang.Exception

readNotify

protected void readNotify()
Notifies listeners after a read operation has completed.

Overrides:
readNotify in class DataEditorPanelTab

write

protected void write(IWriteableDataSource source)
              throws java.lang.Exception
Writes data to some external source.

Overrides:
write in class DataEditorPanelTab
Parameters:
source - Data source to write to
Throws:
java.lang.Exception