public class SimbrainJTable
extends org.jdesktop.swingx.JXTable
SimbrainDataTable
,
Serialized FormModifier and Type | Class and Description |
---|---|
(package private) class |
SimbrainJTable.CellIndex
Holds reference to row / column index.
|
org.jdesktop.swingx.JXTable.BooleanRenderer, org.jdesktop.swingx.JXTable.DateRenderer, org.jdesktop.swingx.JXTable.DoubleRenderer, org.jdesktop.swingx.JXTable.IconRenderer, org.jdesktop.swingx.JXTable.LinkController, org.jdesktop.swingx.JXTable.NumberRenderer, org.jdesktop.swingx.JXTable.TableAdapter, org.jdesktop.swingx.JXTable.TableSearchable
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
javax.swing.JComponent.AccessibleJComponent
dataAdapter, EXECUTE_BUTTON_ACTIONCOMMAND, filters, highlighters, HORIZONTALSCROLL_ACTION_COMMAND, isXTableRowHeightSet, MATCH_HIGHLIGHTER, PACKALL_ACTION_COMMAND, PACKSELECTED_ACTION_COMMAND, searchable, UIPREFIX
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
protected |
SimbrainJTable(SimbrainDataTable dataModel)
Construct the jtable.
|
Modifier and Type | Method and Description |
---|---|
protected javax.swing.JPopupMenu |
buildPopupMenu()
Build the context menu for the table.
|
static SimbrainJTable |
createTable(SimbrainDataTable dataModel)
Creates a new simbrain gui jtable.
|
void |
disableTableModificationMenus()
Disable popup menus that allow table structure to changed.
|
void |
fill(double value)
Fills the table with the given value.
|
SimbrainDataTable<?> |
getData() |
javax.swing.JMenu |
getMenuCSV(boolean allowRowChanges,
boolean allowColumnChanges)
Return a menu with items for opening from and saving to .csv files.
|
javax.swing.JMenu |
getMenuEdit()
Return a menu with items for changing the table structure.
|
javax.swing.JMenu |
getMenuFill()
Return a menu with items for filling table values.
|
javax.swing.JMenu |
getMenuNormalize()
Return a menu with items for normalizing the data in a table.
|
javax.swing.JMenu |
getMenuRandomize()
Return a menu with items for randomizing table values.
|
java.util.List<java.lang.String> |
getRowHeadings() |
int |
getSelectedColumn()
Returns the currently selected column.
|
java.awt.Point |
getSelectedPoint() |
int |
getSelectedRow()
Returns the currently selected row.
|
javax.swing.JToolBar |
getToolbarCSV(boolean allowRowChanges,
boolean allowColumnChanges)
Return a toolbar with buttons for opening from and saving to .csv files.
|
javax.swing.JToolBar |
getToolbarEditRows()
Return a toolbar with buttons for editing the rows of a table.
|
javax.swing.JToolBar |
getToolbarEditTable()
Return a toolbar with buttons for editing the table cells.
|
javax.swing.JToolBar |
getToolbarNormalize() |
javax.swing.JToolBar |
getToolbarRandomize() |
boolean |
hasChanged() |
protected void |
initJTable()
Initialize the table.
|
boolean |
isCellEditable(int row,
int column) |
boolean |
isDisplayPopUpMenu() |
void |
normalize()
Normalize selected columns of selected cells.
|
void |
randomize()
Randomize selected cells.
|
void |
setColumnHeadings(java.util.List<java.lang.String> columnHeadings) |
void |
setDisplayColumnHeadings(boolean displayColumnHeadings)
Forward setting to table model.
|
void |
setDisplayPopUpMenu(boolean displayPopUpMenu) |
void |
setFirstColumnWidth()
Special width for first column.
|
void |
setHasChangedSinceLastSave(boolean hasChanged) |
void |
setRowHeadings(java.util.List<java.lang.String> rowHeadings) |
void |
setSelectedPoint(java.awt.Point selectedPoint)
Sets the selected point.
|
void |
setShowCSVInPopupMenu(boolean showCSVInPopupMenu) |
void |
setShowDeleteColumnPopupMenu(boolean showDeleteColumnPopupMenu) |
void |
setShowDeleteRowPopupMenu(boolean showDeleteRowPopupMenu) |
void |
setShowEditInPopupMenu(boolean showEditInPopupMenu) |
void |
setShowFillInPopupMenu(boolean showFillInPopupMenu) |
void |
setShowInsertColumnPopupMenu(boolean showInsertColumnPopupMenu) |
void |
setShowInsertRowPopupMenu(boolean showInsertRowPopupMenu) |
void |
setShowNormalizeInPopupMenu(boolean showNormalizeInPopupMenu) |
void |
setShowRandomizeInPopupMenu(boolean showRandomizeInPopupMenu) |
void |
updateRowSelection()
Select current row.
|
adjustComponentOrientation, adminSetRowHeight, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, configureViewportBackground, convertRowIndexToModel, convertRowIndexToView, createAndConfigureColumn, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultEditors, createDefaultRenderers, createDefaultTableHeader, createLinkController, createPipelineListener, createRolloverProducer, getColumnControl, getColumnCount, getColumnExt, getColumnExt, getColumnFactory, getColumnMargin, getColumns, getColumns, getComponentAdapter, getFilterPipelineListener, getFilters, getHighlighters, getLinkController, getNewDefaultRenderer, getPreferredScrollableViewportSize, getRowCount, getRowModelMapper, getSearchable, getSelectionMode, getSorter, getValueAt, getVisibleRowCount, init, initializeColumnPreferredWidth, isColumnControlVisible, isHierarchical, isRolloverEnabled, isRowHeightEnabled, isSortable, packAll, packColumn, packColumn, packSelected, packTable, prepareEditor, prepareRenderer, removeColumns, resetSorter, rowAtPoint, setAutoResizeMode, setColumnControlVisible, setColumnMargin, setColumnSequence, setComponentOrientation, setDefaultLinkVisitor, setFilters, setHighlighters, setHorizontalScrollEnabled, setModel, setRolloverEnabled, setRowHeight, setRowHeight, setRowHeightEnabled, setSearchable, setSortable, setSorter, setValueAt, setVisibleRowCount, tableChanged, updateHighlighters, updateOnFilterContentChanged, updateUI, updateViewSizeSequence
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, convertColumnIndexToModel, convertColumnIndexToView, createDefaultDataModel, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumnCount, getSelectedColumns, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, initializeLocalVars, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane, valueChanged
addAncestorListener, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected SimbrainJTable(SimbrainDataTable dataModel)
dataModel
- the datapublic static SimbrainJTable createTable(SimbrainDataTable dataModel)
dataModel
- the initial dataprotected void initJTable()
public void setFirstColumnWidth()
public void disableTableModificationMenus()
public int getSelectedColumn()
getSelectedColumn
in class javax.swing.JTable
public int getSelectedRow()
getSelectedRow
in class javax.swing.JTable
public SimbrainDataTable<?> getData()
protected javax.swing.JPopupMenu buildPopupMenu()
public javax.swing.JToolBar getToolbarCSV(boolean allowRowChanges, boolean allowColumnChanges)
allowRowChanges
- whether to allow number of rows to changeallowColumnChanges
- whether to allow number of columns to changepublic javax.swing.JToolBar getToolbarEditTable()
public javax.swing.JToolBar getToolbarEditRows()
public javax.swing.JToolBar getToolbarRandomize()
public javax.swing.JToolBar getToolbarNormalize()
public javax.swing.JMenu getMenuCSV(boolean allowRowChanges, boolean allowColumnChanges)
allowRowChanges
- whether to allow number of rows to changeallowColumnChanges
- whether to allow number of columns to changepublic javax.swing.JMenu getMenuRandomize()
public javax.swing.JMenu getMenuNormalize()
public javax.swing.JMenu getMenuFill()
public javax.swing.JMenu getMenuEdit()
public void updateRowSelection()
public java.awt.Point getSelectedPoint()
public void setSelectedPoint(java.awt.Point selectedPoint)
selectedPoint
- the selected pointpublic java.util.List<java.lang.String> getRowHeadings()
public void setRowHeadings(java.util.List<java.lang.String> rowHeadings)
rowHeadings
- the rowHeadings to setpublic void setColumnHeadings(java.util.List<java.lang.String> columnHeadings)
columnHeadings
- the columnHeadings to setpublic boolean isCellEditable(int row, int column)
isCellEditable
in class org.jdesktop.swingx.JXTable
public void setDisplayColumnHeadings(boolean displayColumnHeadings)
displayColumnHeadings
- the displayColumnHeadings to setpublic boolean isDisplayPopUpMenu()
public void setDisplayPopUpMenu(boolean displayPopUpMenu)
displayPopUpMenu
- the displayPopUpMenu to setpublic boolean hasChanged()
public void setHasChangedSinceLastSave(boolean hasChanged)
hasChanged
- the hasChanged to setpublic void setShowInsertRowPopupMenu(boolean showInsertRowPopupMenu)
showInsertRowPopupMenu
- the showInsertRowPopupMenu to setpublic void setShowInsertColumnPopupMenu(boolean showInsertColumnPopupMenu)
showInsertColumnPopupMenu
- the showInsertColumnPopupMenu to setpublic void setShowDeleteRowPopupMenu(boolean showDeleteRowPopupMenu)
showDeleteRowPopupMenu
- the showDeleteRowPopupMenu to setpublic void setShowDeleteColumnPopupMenu(boolean showDeleteColumnPopupMenu)
showDeleteColumnPopupMenu
- the showDeleteColumnPopupMenu to setpublic void setShowEditInPopupMenu(boolean showEditInPopupMenu)
showEditInPopupMenu
- the showEditInPopupMenu to setpublic void setShowRandomizeInPopupMenu(boolean showRandomizeInPopupMenu)
showRandomizeInPopupMenu
- the showRandomizeInPopupMenu to setpublic void setShowNormalizeInPopupMenu(boolean showNormalizeInPopupMenu)
showNormalizeInPopupMenu
- the showNormalizeInPopupMenu to setpublic void setShowFillInPopupMenu(boolean showFillInPopupMenu)
showFillInPopupMenu
- the showFillInPopupMenu to setpublic void setShowCSVInPopupMenu(boolean showCSVInPopupMenu)
showCSVInPopupMenu
- the showCSVInPopupMenu to setpublic void normalize()
public void randomize()
public void fill(double value)
value
- value to fill the table with.