com.jstatcom.table
Class JSCNArrayTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by com.jstatcom.table.BorderTable
                      extended by com.jstatcom.table.JSCAbstractDataTable
                          extended by com.jstatcom.table.JSCNArrayTable
All Implemented Interfaces:
NumberDisplayTable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.event.RowSorterListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, javax.swing.Scrollable
Direct Known Subclasses:
CoeffTable

public class JSCNArrayTable
extends JSCAbstractDataTable
implements NumberDisplayTable

JSCAbstractDataTable implementation for JSCNArray data objects.

Author:
Markus Kraetzig
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTable
javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
JSCNArrayTable()
          Default constructor initializes this with a default model, renderer and editor.
 
Method Summary
 JSCNArray getJSCNArray()
          Gets a reference of the underlying data object with the correct type.
 NumberRange getNumberRange()
          Gets the number range to verify number input.
 int getPrecision()
          Gets the precision for the number display.
 void setModelForJSCData(JSCData data)
          Sets the table model for a data object.
 void setModelForSymbolName(SymbolTable table, java.lang.String name)
          Sets the table model according to the symbol defined by table and name.
 void setNumberRange(NumberRange range)
          Sets the number range to verify number input when cells are edited with the default editor set for this table.
 void setPrecision(int precision)
          Sets the precision for the number display.
 
Methods inherited from class com.jstatcom.table.JSCAbstractDataTable
addNotify, createDefaultColumnsFromModel, getCellRenderer, getIntSelectionIndex, getJSCData, getMouseListener, getRowSelectionMode, getSymbolName, getSymbolNameSelRows, getSymbolScope, getSymbolTable, getTablePopup, isEditable, setCellRenderer, setColEditable, setEditable, setJSCData, setModel, setMouseListener, setRowEditable, setRowSelectionMode, setSymbolName, setSymbolNameSelRows, setSymbolScope, setSymbolTable, setTablePopup, tableChanged, updateUI, valueChanged
 
Methods inherited from class com.jstatcom.table.BorderTable
columnAtPoint, getCellRect, getColumnWidth, getMaximumColumnWidth, getMaximumSize, getMinimumColumnWidth, getMinimumSize, getPreferredSize, isDynamicColumnWidth, maxCellLength, rowAtPoint, setBorder, setColumnWidth, setDynamicColumnWidth, setIntercellSpacing, setMaximumColumnWidth, setMinimumColumnWidth, sizeColumnsToFit
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sorterChanged
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jstatcom.table.NumberDisplayTable
getCellRenderer, setCellRenderer
 

Constructor Detail

JSCNArrayTable

public JSCNArrayTable()
Default constructor initializes this with a default model, renderer and editor.

Method Detail

setModelForJSCData

public void setModelForJSCData(JSCData data)
Description copied from class: JSCAbstractDataTable
Sets the table model for a data object. Implementations should throw an IllegalArgumentException if data is not of the correct type for the table. A null argument should be allowed for to make it possible to clear the table model. The method is called by setJSCData.

Specified by:
setModelForJSCData in class JSCAbstractDataTable
Parameters:
data - the new data for this table

setModelForSymbolName

public void setModelForSymbolName(SymbolTable table,
                                  java.lang.String name)
Description copied from class: JSCAbstractDataTable
Sets the table model according to the symbol defined by table and name. The type of the symbol to retrieve must be set by the implementing table. The method is called by setSymbolTable and setSymbolName.

The implementation should also handle null aguments. In this case, an empty model should be set.

Specified by:
setModelForSymbolName in class JSCAbstractDataTable
Parameters:
table - the data table to retrieve the symbol from
name - the name of the symbol to get

getNumberRange

public NumberRange getNumberRange()
Gets the number range to verify number input.

Returns:
number range

setNumberRange

public void setNumberRange(NumberRange range)
Sets the number range to verify number input when cells are edited with the default editor set for this table. It has no effect if the data is set differently.

Parameters:
range - the bounds to verify numbers against

getPrecision

public int getPrecision()
Gets the precision for the number display.

Specified by:
getPrecision in interface NumberDisplayTable
Returns:
precision for numbers

setPrecision

public void setPrecision(int precision)
Sets the precision for the number display. How numbers are rendered is handled by the cell renderer.

Specified by:
setPrecision in interface NumberDisplayTable
Parameters:
precision -

getJSCNArray

public JSCNArray getJSCNArray()
Gets a reference of the underlying data object with the correct type.

Usage note:
The returned data is a reference to the underlying JSCData object only until a new data object has been set. It should be used read only. Changes that should not affect this table must be made on a copy of the returned object.

Returns:
reference to data