JComponentPack 3.5

com.zfqjava.swing
Class JDataGrid

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.zfqjava.swing.JDataGrid
All Implemented Interfaces:
CellEditorListener2, CellSelectionListener, CellSpanListener, DataGridModelListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, UndoableEditListener, Scrollable
Direct Known Subclasses:
JDataTable

public class JDataGrid
extends JTable
implements DataGridModelListener, UndoableEditListener, CellSelectionListener, CellSpanListener, CellEditorListener2

JDataGrid provides a data grid, add some features such as row header, cell attributes, cell merge and split, undo and redo support.

The DataGridModel provides model support for cell attributes, cell class, cell editable, undo support, cell merge and split and other set methods for column name and column class. It's TableModel subclass.

The ObjectCellRenderer provides the basic cell renderer for render cell attributes.
The ObjectCellEditor provides the basic cell editor.

JDataGrid provides a row header when add into JScrollPane container, and build-in Date, Number and Boolean and String and Multiple line String renderer and editor to support cell attributes and other features.

Client Property:

*
NameValueDefault Value
JDataGrid.clickCountToStartsEdit java.lang.Integer null
JDataGrid.autoSetsCellValue java.lang.Boolean Boolean.TRUE
JDataGrid.autoSetsCellClass java.lang.Boolean Boolean.TRUE
JDataGrid.columnSortingEnabled java.lang.Boolean Boolean.FALSE
JDataGrid.switchUnsortedOrderEnabled java.lang.Boolean Boolean.FALSE
JDataGrid.stringEscapeChar java.lang.Character null
JDataGrid.clearCellOnStartsEdit java.lang.Boolean Boolean.FALSE
JDataGrid.selectionStyle
  • Classic
  • Modern
Classic
JDataGrid.fillCellValueOnly java.lang.Boolean Boolean.FALSE
JDataGrid.activateLinkOnModifierDown java.lang.Boolean Boolean.FALSE
JDataGrid.clearSelectionOnDataChanged java.lang.Boolean Boolean.TRUE
CellEditor.dispatchEventOnStopEditingDisabled java.lang.Boolean Boolean.FALSE
JDataGrid.generateHyperlinkEventForURLValue java.lang.Boolean Boolean.TRUE
JDataGrid.toggleSelectionOnCtrlDown java.lang.Boolean Boolean.FALSE
JDataGrid.notEditableCellRendererDisabled java.lang.Boolean Boolean.FALSE
JDataGrid.selectCellTextOnStartsEdit java.lang.Boolean Boolean.FALSE
JDataGrid.fullRowColumnCutPasteDisabled java.lang.Boolean Boolean.FALSE
JDataGrid.keepRowSizeModelForSameRowCountOnModelChanged java.lang.Boolean Boolean.FALSE
JDataGrid.keepColumnSizeModelForSameColumnCountOnModelChanged java.lang.Boolean Boolean.FALSE
JDataGrid.keepSelectionForSameRowColumnCountOnModelChanged java.lang.Boolean Boolean.FALSE

Note:
Since JDataGrid is compitable with JTable at API level, use it just replace JTable with JDataGrid.

See Also:
Serialized Form

Nested Class Summary
protected  class JDataGrid.AccessibleJDataGrid
          This class implements accessibility support for the JDataGrid class.
 
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int CANCEL_EDITING_ON_FOCUS_LOST
          Identifies when current editor's focus lost, cancel editing.
static int COMMIT
          Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked.
static int COMMIT_OR_EDITING
          Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked.
static int COMMIT_OR_REVERT
          Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked.
static int DO_NOTHING_ON_FOCUS_LOST
          Identifies when current editor's focus lost, do nothing.
static int STOP_EDITING_ON_FOCUS_LOST
          Identifies when current editor's focus lost, stop editing.
 
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, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JDataGrid()
          Constructs a default JDataGrid that is initialized with a default data model, a default column model, and a default selection model.
JDataGrid(int numRows, int numColumns)
          Constructs a JDataGrid with numRows and numColumns of empty cells using DefaultTableModel.
JDataGrid(Object[][] rowData, Object[] columnNames)
          Constructs a JDataGrid to display the values in the two dimensional array, rowData, with column names, columnNames.
JDataGrid(TableModel dm)
          Constructs a JDataGrid that is initialized with dm as the data model, a default column model, and a default selection model.
JDataGrid(TableModel dm, TableColumnModel cm)
          Constructs a JDataGrid that is initialized with dm as the data model, cm as the column model, and a default selection model.
JDataGrid(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
          Constructs a JDataGrid that is initialized with dm as the data model, cm as the column model, and sm as the selection model.
JDataGrid(Vector rowData, Vector columnNames)
          Constructs a JDataGrid to display the values in the Vector of Vectors, rowData, with column names, columnNames.
 
Method Summary
 void addCellEditorListener(CellEditorListener l)
          Adds a CellEditorListener to the listener list.
 void addColumn(TableColumn aColumn)
           
 void addHyperlinkListener(HyperlinkListener listener)
          Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.
 void addUndoableEditListener(UndoableEditListener l)
          Registers the given observer to begin receiving notifications when undoable edits are made to the data grid.
 void cancelEditing()
          Cancels the current editing session.
 void cellChanged(DataGridModelEvent e)
          Invoked when this dataGrid's DataGridModel generates a DataGridModelEvent.
 void cellMerged(CellSpanEvent e)
           
 void cellSplitted(CellSpanEvent e)
           
 void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
           
 void changeSelection(int anchorRow, int leadRow, int anchorColumn, int leadColumn, boolean toggle, boolean extend, boolean includeSpan)
          Changes the selection of JDataGrid.
 void changeSelection(int firstRow, int lastRow, int firstColumn, int lastColumn, int anchorRow, int leadRow, int anchorColumn, int leadColumn, boolean toggle, boolean extend, boolean includeSpan)
          Changes the selection of JDataGrid.
 void clearSelection()
           
 void columnMoved(TableColumnModelEvent e)
           
 void columnRemoved(TableColumnModelEvent e)
           
 void columnSelectionChanged(ListSelectionEvent e)
           
protected  void configureEnclosingScrollPane()
           
 int convertColumnIndexToDataGridModel(int viewColumnIndex)
          Converts the view column index to DataGridModel column index.
 int convertColumnIndexToDataGridView(int modelColumnIndex)
          Converts the DataGridModel column index to JDataGrid view column row index .
 int convertRowIndexToDataGridModel(int viewRowIndex)
          Converts the view row index to DataGridModel row index.
 int convertRowIndexToDataGridView(int modelRowIndex)
          Converts the DataGridModel row index to JDataGrid view row index .
protected  CellSelectionModel createCellSelectionModel()
          Creates the default cell selection model.
protected  CellSpanModel createCellSpanModel()
          Creates the default cell span model for the TableModel, if the model is DataGridModel,use DataGridModel as the cell span model.
protected  SizeModel createColumnSizeModel()
          Creates the default column size model.
protected  AbstractButton createCornerButton()
          Creates a corner button.
 DataGridModel createDataGridModel()
          Creates a new default DataGridModel for datagrid.
 void createDefaultColumnsFromModel()
           
protected  void createDefaultEditors()
           
protected  void createDefaultRenderers()
           
protected  JLineBar createRowHeader()
          Creates a row header.
protected  SizeModel createRowSizeModel()
          Creates the default row size model.
protected  void doHyperlinkUpdate(HyperlinkEvent e)
          Handles the HyperlinkEvent, and do the default behavior, such as launch a browser.
 void doLayout()
           
 boolean editCellAt(int row, int column, EventObject e)
           
 void editingCanceled(ChangeEvent e)
           
 void editingFailed(ChangeEvent e)
           
 void editingStopped(ChangeEvent e)
           
 void fireHyperlinkUpdate(HyperlinkEvent e)
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireUndoableEditHappened(UndoableEdit edit)
          Notifies all listeners that have registered interest for notification on this event type.
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this JDataGrid.
 Color getAlternatingRowBackground()
          Returns the odd row background color.
 Color getAlternatingRowForeground()
          Returns the odd row foreground color.
 AttributeSet getCellAttributes()
          Returns all selected cell attributes in common.
 AttributeSet getCellAttributes(int row, int column)
          Returns the cell attributes.
 AttributeSet getCellAttributes(int row, int column, boolean readOnly)
          Returns the cell attributes.
 Class getCellClass(int row, int column)
          Returns the cell class.
 TableCellEditor getCellEditor(int row, int column)
           
 CellEditorComponentType getCellEditorComponentTypeByClass(Class c)
          Returns the cell editor component type for the specified class type.
 CellEditorComponentType getCellEditorComponentTypeByColumn(int column)
          Returns the cell renderer component type for the specified class type.
 CellEditorListener[] getCellEditorListeners()
          Returns an array of all the CellEditorListeners added to this AbstractCellEditor with addCellEditorListener().
 CellManager getCellManager()
          Returns the cell manager.
 Rectangle getCellRect(Cell c, boolean includeSpacing)
          Returns a rectangle for the cell that lies at the intersection of c.
 Rectangle getCellRect(Cell c, boolean includeSpacing, Rectangle rect)
           
 Rectangle getCellRect(int row, int column, boolean includeSpacing)
           
 Rectangle getCellRect(int row, int column, boolean includeSpacing, boolean includeSpan)
           
 Rectangle getCellRect(int row, int column, boolean includeSpacing, Rectangle rect)
           
 TableCellRenderer getCellRenderer(int row, int column)
           
 CellRendererComponentType getCellRendererComponentTypeByClass(Class c)
          Returns the cell renderer component type for the specified class type.
 CellRendererComponentType getCellRendererComponentTypeByColumn(int column)
          Returns the cell renderer component type for the specified class type.
 CellSelectionModel getCellSelectionModel()
          Returns the cell selection model.
 CellSpanModel getCellSpanModel()
          Returns the cell span model.
 int getColumnHeaderHeight()
          Returns the column header height.
 Component getColumnHeaderView()
          Returns the column header view.
 SizeModel getColumnSizeModel()
          Returns the column size model.
 int getColumnWidth()
          Returns the width of a table column, in pixels.
 int getColumnWidth(int column)
          Returns the width, in pixels, of the cells in column.
 boolean getColumnWidthIsAdjusting(int column)
          Determines the adjusting property for the specified column width.
 AbstractButton getCornerButton()
          Returns the corner button.
 DataGridModel getDataGridModel()
          Returns the DataGridModel for this datagrid.
 TableCellEditor getDefaultEditor(Class columnClass)
           
 TableCellRenderer getDefaultRenderer(Class columnClass)
           
 int getEditingStopBehavior()
          Returns the editing stop behavior.
 Color getFillHandleColor()
          Returns the fillHandleColor property.
 int getFocusLostBehavior()
          Returns the focus lost behavior.
 int getFreezeColumn()
          Returns the freeze column.
 Color getFreezeLineColor()
          Returns the freeze line color.
 int getFreezeRow()
          Returns the freeze row.
 HyperlinkListener[] getHyperlinkListeners()
          Returns an array of all the HyperLinkListeners added to this JDataGrid with addHyperlinkListener().
 int getLeadSelectionColumn()
          Returns current lead selection column.
 int getLeadSelectionRow()
          Returns current lead selection row.
 Dimension getMaximumSize()
           
 Dimension getMinimumSize()
           
 Dimension getPreferredScrollableViewportSize()
           
 Dimension getPreferredSize()
           
 JLineBar getRowHeader()
          Returns the row header for this table.
 Component getRowHeaderView()
          Returns the row header view.
 int getRowHeaderWidth()
          Returns the row header width.
 int getRowHeight(int row)
           
 boolean getRowHeightIsAdjusting(int row)
          Determines the adjusting property for the specified row height.
 SizeModel getRowSizeModel()
          Returns the row size model.
 Cell getSelectedCell()
          Returns the selected cell as Cell object.
 Cell[] getSelectedCells()
          Returns all selected cells.
 Color getSelectionBorderColor()
          Returns the selectionBorderColor property.
 List getSelectionList()
          Returns the read-only selection list.
 String getToolTipText(MouseEvent event)
           
 String getUIClassID()
          Returns a string that specifies the name of the L&F class that renders this component.
 UndoableEditListener[] getUndoableEditListeners()
          Returns an array of all the undoable edit listeners registered on this data grid.
 double getZoomFactor()
          Returns the zoom factor.
protected  void initializeLocalVars()
           
 boolean isCellEditable(int row, int column)
           
 boolean isCellSelected(Cell c)
          Returns whether the cell is selected.
 boolean isCellSelected(int row, int column)
           
 boolean isColumnSelected(int column)
           
 boolean isColumnVisible(int column)
          Returns the visible property for the specified column.
 boolean isEditable()
          Returns true if the datagrid is editable.
 boolean isFillHandlePainted()
          Returns the fillHandlePainted property.
 boolean isFullColumnSelected(int column)
          Determines whether the full column is selected.
 boolean isFullRowSelected(int row)
          Determines whether the full row is selected.
 boolean isPrinting()
          Returns whether current is printing.
 boolean isRowSelected(int row)
           
 boolean isRowVisible(int row)
          Returns the visible property for the specified row.
 boolean isSelectionBorderPainted()
          Returns the selectionBorderPainted property.
 boolean isSelectionEmpty()
          Returns true if the selection is empty.
 void paint(Graphics g)
           
protected  void paintComponent(Graphics g)
           
protected  String paramString()
          Returns a string representation of this JDataGrid.
 Component prepareEditor(TableCellEditor editor, int row, int column)
           
 Component prepareRenderer(TableCellRenderer renderer, int row, int column)
           
 void print(Graphics g)
           
 void printAll(Graphics g)
           
protected  boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
           
protected  void processMouseEvent(MouseEvent e)
           
protected  void processMouseMotionEvent(MouseEvent e)
           
protected  void processMouseWheelEvent(MouseWheelEvent e)
           
 void removeCellEditorListener(CellEditorListener l)
          Removes a CellEditorListener from the listener list.
 void removeColumn(TableColumn aColumn)
           
 void removeEditor()
           
 void removeHyperlinkListener(HyperlinkListener listener)
          Removes a hyperlink listener.
 void removeUndoableEditListener(UndoableEditListener l)
          Unregisters the given observer from the notification list so it will no longer receive updates.
 void repaintCell(int rowIndex, int columnIndex)
          Repaints the specified cell.
 void resetColumnHeader()
           
 void resetRowHeader()
           
 int rowAtPoint(Point point)
           
 void scrollRectToVisible(Rectangle aRect)
           
 void selectAll()
           
 void selectCell(Cell c)
          Selects the specified cell in the data grid.
 void selectCell(Cell c, boolean includeSpan)
          Selects the specified cell in the data grid.
 void selectCell(int row, int column)
          Selects the specified cell in the data grid.
 void selectCell(int row, int column, boolean includeSpan)
          Selects the specified cell in the data grid.
 void selectCell(int firstRow, int lastRow, int firstColumn, int lastColumn)
          Selects the specified cell in the data grid.
 void selectCell(int firstRow, int lastRow, int firstColumn, int lastColumn, boolean includeSpan)
          Selects the specified cell in the data grid.
 void selectColumn(int column)
          Selects the specified column in the data grid.
 void selectColumn(int column, boolean includeSpan)
          Selects the specified column in the data grid.
 void selectRow(int row)
          Selects the specified row in the data grid.
 void selectRow(int row, boolean includeSpan)
          Selects the specified row in the data grid.
 void setAlternatingRowBackground(Color color)
          Sets the odd row background color.
 void setAlternatingRowForeground(Color color)
          Sets the odd row foreground color.
 void setCellAttributes(AttributeSet attributes)
          Sets attributes to all selected cell .
 void setCellAttributes(AttributeSet attributes, int row, int column)
          Sets the cell attributes.
 void setCellClass(Class c, int row, int column)
          Sets the cell class.
 void setCellEditorComponentTypeByClass(Class c, CellEditorComponentType type)
          Sets the cell editor component type for the specified class type.
 void setCellEditorComponentTypeByColumn(int column, CellEditorComponentType type)
          Sets the cell editor component type for the specified column.
 void setCellManager(CellManager cellManager)
          Sets the cell manager to find the cell editor.
 void setCellRendererComponentTypeByClass(Class c, CellRendererComponentType type)
          Sets the cell renderer component type for the specified class type.
 void setCellRendererComponentTypeByColumn(int column, CellRendererComponentType type)
          Sets the cell renderer component type for the specified column.
 void setCellSelectionModel(CellSelectionModel model)
          Sets the cell selection model.
 void setCellSpanModel(CellSpanModel cellSpanModel)
          Sets the cell span model.
 void setColumnHeaderHeight(int columnHeaderHeight)
          Sets the column header height.
 void setColumnHeaderView(Component view)
          Sets the column header view.
 void setColumnSizeModel(SizeModel columnSizeModel)
          Sets the column size model.
 void setColumnVisible(int column, boolean visible)
          Shows or hides the specified column.
 void setColumnWidth(int columnWidth)
          Sets the width, in pixels, of all cells to columnWidth, revalidates, and repaints.
 void setColumnWidth(int column, int columnWidth)
          Sets the width for column to columnWidth, revalidates, and repaints.
 void setColumnWidthIsAdjusting(int column, boolean isAdjusting)
          Sets the adjusting property for the specified column width.
 void setCornerButton(AbstractButton cornerButton)
          Sets the corner button.
 void setEditable(boolean editable)
          Sets the editable property, the default value is true.
 void setEditingStopBehavior(int editingStopBehavior)
          Sets the editing stop behavior.
 void setFillHandleColor(Color color)
          Sets the fillHandleColor property.
 void setFillHandlePainted(boolean b)
          Sets the fillHandlePainted property.
 void setFocusLostBehavior(int focusLostBehavior)
          Sets the focus lost behavior.
 void setFreezeCell(int row, int column)
          Sets the freeze cell.
 void setFreezeColumn(int column)
          Sets the freeze column.
 void setFreezeLineColor(Color freezeLineColor)
          Sets the freeze line color.
 void setFreezeRow(int row)
           
 void setModel(TableModel dataModel)
           
 void setRowHeader(JLineBar rowHeader)
          Sets the row header for this table.
 void setRowHeaderView(Component view)
          Sets the row header view.
 void setRowHeaderWidth(int rowHeaderWidth)
          Sets the row header width.
 void setRowHeight(int rowHeight)
           
 void setRowHeight(int row, int rowHeight)
           
 void setRowHeightIsAdjusting(int row, boolean isAdjusting)
          Sets the adjusting property for the specified row height.
 void setRowSizeModel(SizeModel rowSizeModel)
          Sets the row size model.
 void setRowVisible(int row, boolean visible)
          Shows or hides the specified row.
 void setSelectionBorderColor(Color color)
          Sets the selectionBorderColor property.
 void setSelectionBorderPainted(boolean b)
          Sets the selectionBorderPainted property.
 void setTableHeader(JTableHeader tableHeader)
           
 void setZoomFactor(double zoomFactor)
          Sets the zoom factor.
 void sizeColumnWidthToFit(int column)
          Resizes the column width to fit the width of the column contents.
 boolean stopEditing()
          Ends the current editing session.
 void tableChanged(TableModelEvent e)
           
protected  void unconfigureEnclosingScrollPane()
           
 void undoableEditHappened(UndoableEditEvent e)
          An undoable edit happened
 void updateUI()
          Resets the UI property with a value from the current look and feel.
 void valueChanged(CellSelectionEvent e)
          An cell selection event happened
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class javax.swing.JTable
addColumnSelectionInterval, addNotify, addRowSelectionInterval, columnAdded, columnAtPoint, columnMarginChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultDataModel, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, editCellAt, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUpdateSelectionOnSort, getValueAt, isEditing, moveColumn, print, print, print, print, print, removeColumnSelectionInterval, removeNotify, removeRowSelectionInterval, resizeAndRepaint, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, 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, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged
 
Methods inherited from class javax.swing.JComponent
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, 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, paintBorder, paintChildren, paintImmediately, paintImmediately, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, 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, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, 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
 

Field Detail

COMMIT

public static final int COMMIT
Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked. If in commiting the new value a ParseException is thrown, the invalid value will remain, the editing cannot be stoped.

Since:
JDataGrid 1.6.0
See Also:
Constant Field Values

COMMIT_OR_REVERT

public static final int COMMIT_OR_REVERT
Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked. If in commiting the new value a ParseException is thrown, the value will be reverted, the editing will be stoped.

Since:
JDataGrid 1.6.0
See Also:
Constant Field Values

COMMIT_OR_EDITING

public static final int COMMIT_OR_EDITING
Identifies when stop editing, AbstractCellEditor.commitEdit should be invoked. If in commiting the new value a ParseException is thrown, the value will be the current editing value, the editing will be stoped.

Since:
JDataGrid 1.6.0
See Also:
Constant Field Values

DO_NOTHING_ON_FOCUS_LOST

public static final int DO_NOTHING_ON_FOCUS_LOST
Identifies when current editor's focus lost, do nothing. This is the default focus load behavior.

See Also:
Constant Field Values

STOP_EDITING_ON_FOCUS_LOST

public static final int STOP_EDITING_ON_FOCUS_LOST
Identifies when current editor's focus lost, stop editing.

See Also:
Constant Field Values

CANCEL_EDITING_ON_FOCUS_LOST

public static final int CANCEL_EDITING_ON_FOCUS_LOST
Identifies when current editor's focus lost, cancel editing.

See Also:
Constant Field Values
Constructor Detail

JDataGrid

public JDataGrid()
Constructs a default JDataGrid that is initialized with a default data model, a default column model, and a default selection model.

See Also:
JTable.createDefaultDataModel(), JTable.createDefaultColumnModel(), JTable.createDefaultSelectionModel()

JDataGrid

public JDataGrid(TableModel dm)
Constructs a JDataGrid that is initialized with dm as the data model, a default column model, and a default selection model.

Parameters:
dm - the data model for the table
See Also:
JTable.createDefaultColumnModel(), JTable.createDefaultSelectionModel()

JDataGrid

public JDataGrid(TableModel dm,
                 TableColumnModel cm)
Constructs a JDataGrid that is initialized with dm as the data model, cm as the column model, and a default selection model.

Parameters:
dm - the data model for the table
cm - the column model for the table
See Also:
JTable.createDefaultSelectionModel()

JDataGrid

public JDataGrid(TableModel dm,
                 TableColumnModel cm,
                 ListSelectionModel sm)
Constructs a JDataGrid that is initialized with dm as the data model, cm as the column model, and sm as the selection model. If any of the parameters are null this method will initialize the table with the corresponding default model. The autoCreateColumnsFromModel flag is set to false if cm is non-null, otherwise it is set to true and the column model is populated with suitable TableColumns for the columns in dm.

Parameters:
dm - the data model for the table
cm - the column model for the table
sm - the row selection model for the table
See Also:
JTable.createDefaultDataModel(), JTable.createDefaultColumnModel(), JTable.createDefaultSelectionModel()

JDataGrid

public JDataGrid(int numRows,
                 int numColumns)
Constructs a JDataGrid with numRows and numColumns of empty cells using DefaultTableModel. The columns will have names of the form "A", "B", "C", etc.

Parameters:
numRows - the number of rows the table holds
numColumns - the number of columns the table holds
See Also:
DefaultTableModel

JDataGrid

public JDataGrid(Vector rowData,
                 Vector columnNames)
Constructs a JDataGrid to display the values in the Vector of Vectors, rowData, with column names, columnNames. The Vectors contained in rowData should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code:

((Vector)rowData.elementAt(1)).elementAt(5);

Parameters:
rowData - the data for the new table
columnNames - names of each column

JDataGrid

public JDataGrid(Object[][] rowData,
                 Object[] columnNames)
Constructs a JDataGrid to display the values in the two dimensional array, rowData, with column names, columnNames. rowData is an array of rows, so the value of the cell at row 1, column 5 can be obtained with the following code:

 rowData[1][5]; 

All rows must be of the same length as columnNames.

Parameters:
rowData - the data for the new table
columnNames - names of each column
Method Detail

updateUI

public void updateUI()
Resets the UI property with a value from the current look and feel.

Overrides:
updateUI in class JTable
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.

Overrides:
getUIClassID in class JTable
Returns:
"DataGridUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

initializeLocalVars

protected void initializeLocalVars()
Overrides:
initializeLocalVars in class JTable

paint

public void paint(Graphics g)
Overrides:
paint in class JComponent

configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
Overrides:
configureEnclosingScrollPane in class JTable

unconfigureEnclosingScrollPane

protected void unconfigureEnclosingScrollPane()
Overrides:
unconfigureEnclosingScrollPane in class JTable

getColumnHeaderHeight

public int getColumnHeaderHeight()
Returns the column header height.

Since:
JDataGrid 2.2.3

setColumnHeaderHeight

public void setColumnHeaderHeight(int columnHeaderHeight)
Sets the column header height.

Since:
JDataGrid 2.2.3

getRowHeaderWidth

public int getRowHeaderWidth()
Returns the row header width.

Since:
JDataGrid 2.2.3

setRowHeaderWidth

public void setRowHeaderWidth(int rowHeaderWidth)
Sets the row header width.

Since:
JDataGrid 2.2.3

setRowHeight

public void setRowHeight(int rowHeight)
Overrides:
setRowHeight in class JTable

setRowHeight

public void setRowHeight(int row,
                         int rowHeight)
Overrides:
setRowHeight in class JTable

getRowHeight

public int getRowHeight(int row)
Overrides:
getRowHeight in class JTable

sizeColumnWidthToFit

public void sizeColumnWidthToFit(int column)
Resizes the column width to fit the width of the column contents.

Parameters:
column - the column
Since:
JDataGrid 1.6.0

setColumnWidth

public void setColumnWidth(int columnWidth)
Sets the width, in pixels, of all cells to columnWidth, revalidates, and repaints. The width of the cells will be equal to the column width minus the column margin.

Parameters:
columnWidth - new column width
Throws:
IllegalArgumentException - if columnWidth is less than 1
Since:
JDataGrid 1.2
See Also:
getColumnWidth()

getColumnWidth

public int getColumnWidth()
Returns the width of a table column, in pixels. The default column width is 75.0.

Returns:
the width in pixels of a table column
Since:
JDataGrid 1.2
See Also:
setColumnWidth(int)

setColumnWidth

public void setColumnWidth(int column,
                           int columnWidth)
Sets the width for column to columnWidth, revalidates, and repaints. The width of the cells in this column will be equal to the column width minus the column margin.

Parameters:
column - the column whose width is being changed
columnWidth - new column width, in pixels
Throws:
IllegalArgumentException - if columnWidth is less than 1
Since:
JDataGrid 1.2

getColumnWidth

public int getColumnWidth(int column)
Returns the width, in pixels, of the cells in column.

Parameters:
column - the column whose width is to be returned
Returns:
the width, in pixels, of the cells in the column
Since:
JDataGrid 1.2

rowAtPoint

public int rowAtPoint(Point point)
Overrides:
rowAtPoint in class JTable

setColumnVisible

public void setColumnVisible(int column,
                             boolean visible)
Shows or hides the specified column.

Parameters:
column - the column
visible - the visible property
Since:
JDataGrid 1.7
See Also:
isColumnVisible(int)

isColumnVisible

public boolean isColumnVisible(int column)
Returns the visible property for the specified column.

Parameters:
column - the column
Returns:
true if the column is visible, otherwise return false
Since:
JDataGrid 1.7
See Also:
setColumnVisible(int, boolean)

setRowVisible

public void setRowVisible(int row,
                          boolean visible)
Shows or hides the specified row.

Parameters:
row - the row
visible - the visible property
Since:
JDataGrid 1.7
See Also:
isRowVisible(int)

isRowVisible

public boolean isRowVisible(int row)
Returns the visible property for the specified row.

Parameters:
row - the row
Returns:
true if the row is visible, otherwise return false
Since:
JDataGrid 1.7
See Also:
setRowVisible(int, boolean)

setColumnWidthIsAdjusting

public void setColumnWidthIsAdjusting(int column,
                                      boolean isAdjusting)
Sets the adjusting property for the specified column width.

Parameters:
column - the column index
isAdjusting - the adjusting property
Since:
JDataGrid 1.7
See Also:
getColumnWidthIsAdjusting(int)

getColumnWidthIsAdjusting

public boolean getColumnWidthIsAdjusting(int column)
Determines the adjusting property for the specified column width.

Parameters:
column - the column index
Returns:
the adjusting property
Since:
JDataGrid 1.7
See Also:
setColumnWidthIsAdjusting(int, boolean)

setRowHeightIsAdjusting

public void setRowHeightIsAdjusting(int row,
                                    boolean isAdjusting)
Sets the adjusting property for the specified row height.

Parameters:
row - the row index
isAdjusting - the adjusting property
Since:
JDataGrid 1.7
See Also:
getRowHeightIsAdjusting(int)

getRowHeightIsAdjusting

public boolean getRowHeightIsAdjusting(int row)
Determines the adjusting property for the specified row height.

Parameters:
row - the row index
Returns:
the adjusting property
Since:
JDataGrid 1.7
See Also:
setRowHeightIsAdjusting(int, boolean)

setRowSizeModel

public void setRowSizeModel(SizeModel rowSizeModel)
Sets the row size model.

Parameters:
rowSizeModel - the row size model
Since:
JDataGrid 1.9
See Also:
getRowSizeModel()

getRowSizeModel

public SizeModel getRowSizeModel()
Returns the row size model.

Returns:
the row size model
Since:
JDataGrid 1.9
See Also:
setRowSizeModel(com.zfqjava.swing.SizeModel)

createRowSizeModel

protected SizeModel createRowSizeModel()
Creates the default row size model.

Returns:
the default row size model
Since:
JDataGrid 1.9
See Also:
setRowSizeModel(com.zfqjava.swing.SizeModel), getRowSizeModel()

setColumnSizeModel

public void setColumnSizeModel(SizeModel columnSizeModel)
Sets the column size model.

Parameters:
columnSizeModel - the column size model
Since:
JDataGrid 1.9
See Also:
getColumnSizeModel()

getColumnSizeModel

public SizeModel getColumnSizeModel()
Returns the column size model.

Returns:
the column size model
Since:
JDataGrid 1.9
See Also:
setColumnSizeModel(com.zfqjava.swing.SizeModel)

createColumnSizeModel

protected SizeModel createColumnSizeModel()
Creates the default column size model.

Returns:
the default column size model
Since:
JDataGrid 1.9
See Also:
setColumnSizeModel(com.zfqjava.swing.SizeModel), getColumnSizeModel()

getCellSpanModel

public CellSpanModel getCellSpanModel()
Returns the cell span model.

Returns:
the cell span model
Since:
JComponentPack 1.3 JDataGrid 2.7

setCellSpanModel

public void setCellSpanModel(CellSpanModel cellSpanModel)
Sets the cell span model.

Parameters:
cellSpanModel - the cell span model
Since:
JComponentPack 1.3 JDataGrid 2.7

createCellSpanModel

protected CellSpanModel createCellSpanModel()
Creates the default cell span model for the TableModel, if the model is DataGridModel,use DataGridModel as the cell span model.

Returns:
a default cell span model
Since:
JComponentPack 1.3 JDataGrid 2.7

cellMerged

public void cellMerged(CellSpanEvent e)
Specified by:
cellMerged in interface CellSpanListener

cellSplitted

public void cellSplitted(CellSpanEvent e)
Specified by:
cellSplitted in interface CellSpanListener

getCellRect

public Rectangle getCellRect(int row,
                             int column,
                             boolean includeSpacing)
Overrides:
getCellRect in class JTable

getCellRect

public Rectangle getCellRect(int row,
                             int column,
                             boolean includeSpacing,
                             Rectangle rect)

getCellRect

public Rectangle getCellRect(int row,
                             int column,
                             boolean includeSpacing,
                             boolean includeSpan)

getCellRect

public Rectangle getCellRect(Cell c,
                             boolean includeSpacing)
Returns a rectangle for the cell that lies at the intersection of c. If includeSpacing is true then the value returned has the full height and width of the row and column specified. If it is false, the returned rectangle is inset by the intercell spacing to return the true bounds of the rendering or editing component as it will be set during rendering.

Parameters:
c - the cell area
includeSpacing - if false, return the true cell bounds - computed by subtracting the intercell spacing from the height and widths of the column and row models
Returns:
the rectangle containing the cell at location c
See Also:
getCellRect(int, int, boolean)

getCellRect

public Rectangle getCellRect(Cell c,
                             boolean includeSpacing,
                             Rectangle rect)

addColumn

public void addColumn(TableColumn aColumn)
Overrides:
addColumn in class JTable

removeColumn

public void removeColumn(TableColumn aColumn)
Overrides:
removeColumn in class JTable

createDefaultColumnsFromModel

public void createDefaultColumnsFromModel()
Overrides:
createDefaultColumnsFromModel in class JTable

getCellManager

public CellManager getCellManager()
Returns the cell manager.

Returns:
the cell manager
Since:
JDataGrid 1.6.1

setCellManager

public void setCellManager(CellManager cellManager)
Sets the cell manager to find the cell editor.

Parameters:
cellManager -
Since:
JComponentPack 3.2

setEditable

public void setEditable(boolean editable)
Sets the editable property, the default value is true.

Parameters:
editable - the editable property
Since:
JDataGrid 1.7
See Also:
isEditable()

isEditable

public boolean isEditable()
Returns true if the datagrid is editable.

Returns:
true if the datagrid is editable
Since:
JDataGrid 1.7
See Also:
setEditable(boolean)

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Overrides:
isCellEditable in class JTable

stopEditing

public boolean stopEditing()
Ends the current editing session. (The current CellEditor object saves any edits that are currently in progress on a cell. Other implementations may operate differently.) Has no effect if the datagrid isn't being edited.

Returns:
true if editing was in progress and is now stopped, false if editing was not in progress
Since:
JComponentPack 3.2
See Also:
JTable.isEditing(), cancelEditing(), isEditable()

cancelEditing

public void cancelEditing()
Cancels the current editing session. Has no effect if the datagrid isn't being edited.

Since:
JComponentPack 3.2
See Also:
JTable.isEditing(), stopEditing(), isEditable()

setAlternatingRowBackground

public void setAlternatingRowBackground(Color color)
Sets the odd row background color.

Parameters:
color - the odd row background color
Since:
JDataGrid 1.8
See Also:
getAlternatingRowBackground()

getAlternatingRowBackground

public Color getAlternatingRowBackground()
Returns the odd row background color.

Returns:
the odd row background color
Since:
JDataGrid 1.8
See Also:
setAlternatingRowBackground(java.awt.Color)

setAlternatingRowForeground

public void setAlternatingRowForeground(Color color)
Sets the odd row foreground color.

Parameters:
color - the odd row foreground color
Since:
JDataGrid 1.8
See Also:
getAlternatingRowForeground()

getAlternatingRowForeground

public Color getAlternatingRowForeground()
Returns the odd row foreground color.

Returns:
the odd row foreground color
Since:
JDataGrid 1.8
See Also:
setAlternatingRowForeground(java.awt.Color)

createDefaultRenderers

protected void createDefaultRenderers()
Overrides:
createDefaultRenderers in class JTable

createDefaultEditors

protected void createDefaultEditors()
Overrides:
createDefaultEditors in class JTable

getDefaultRenderer

public TableCellRenderer getDefaultRenderer(Class columnClass)
Overrides:
getDefaultRenderer in class JTable

getDefaultEditor

public TableCellEditor getDefaultEditor(Class columnClass)
Overrides:
getDefaultEditor in class JTable

getCellRenderer

public TableCellRenderer getCellRenderer(int row,
                                         int column)
Overrides:
getCellRenderer in class JTable

prepareRenderer

public Component prepareRenderer(TableCellRenderer renderer,
                                 int row,
                                 int column)
Overrides:
prepareRenderer in class JTable

getCellEditor

public TableCellEditor getCellEditor(int row,
                                     int column)
Overrides:
getCellEditor in class JTable

prepareEditor

public Component prepareEditor(TableCellEditor editor,
                               int row,
                               int column)
Overrides:
prepareEditor in class JTable

setCellEditorComponentTypeByColumn

public void setCellEditorComponentTypeByColumn(int column,
                                               CellEditorComponentType type)
Sets the cell editor component type for the specified column.

Parameters:
column - the specified column index
type - the cell editor component type
Since:
JComponentPack 1.3 JDataGrid 2.7

getCellEditorComponentTypeByColumn

public CellEditorComponentType getCellEditorComponentTypeByColumn(int column)
Returns the cell renderer component type for the specified class type.

Parameters:
column - the specified object class
Returns:
the cell renderer component type for the specified class type
Since:
JComponentPack 1.3 JDataGrid 2.7

setCellEditorComponentTypeByClass

public void setCellEditorComponentTypeByClass(Class c,
                                              CellEditorComponentType type)
Sets the cell editor component type for the specified class type.

Parameters:
c - the specified object class
type - the cell editor component type
Since:
JComponentPack 1.3 JDataGrid 2.7

getCellEditorComponentTypeByClass

public CellEditorComponentType getCellEditorComponentTypeByClass(Class c)
Returns the cell editor component type for the specified class type.

Parameters:
c - the specified object class
Returns:
the cell editor component type for the specified class type
Since:
JComponentPack 1.3 JDataGrid 2.7

setCellRendererComponentTypeByColumn

public void setCellRendererComponentTypeByColumn(int column,
                                                 CellRendererComponentType type)
Sets the cell renderer component type for the specified column.

Parameters:
column - the specified column index
type - the cell renderer component type
Since:
JComponentPack 1.3 JDataGrid 2.7

getCellRendererComponentTypeByColumn

public CellRendererComponentType getCellRendererComponentTypeByColumn(int column)
Returns the cell renderer component type for the specified class type.

Parameters:
column - the specified object class
Returns:
the cell renderer component type for the specified class type
Since:
JComponentPack 1.3 JDataGrid 2.7

setCellRendererComponentTypeByClass

public void setCellRendererComponentTypeByClass(Class c,
                                                CellRendererComponentType type)
Sets the cell renderer component type for the specified class type.

Parameters:
c - the specified object class
type - the cell renderer component type
Since:
JComponentPack 1.3 JDataGrid 2.7

getCellRendererComponentTypeByClass

public CellRendererComponentType getCellRendererComponentTypeByClass(Class c)
Returns the cell renderer component type for the specified class type.

Parameters:
c - the specified object class
Returns:
the cell renderer component type for the specified class type
Since:
JComponentPack 1.3 JDataGrid 2.7

printAll

public void printAll(Graphics g)
Overrides:
printAll in class JComponent

print

public void print(Graphics g)
Overrides:
print in class JComponent

setSelectionBorderColor

public void setSelectionBorderColor(Color color)
Sets the selectionBorderColor property.

Parameters:
color - the selection border color
Since:
JDataGrid 1.7
See Also:
getSelectionBorderColor()

getSelectionBorderColor

public Color getSelectionBorderColor()
Returns the selectionBorderColor property.

Returns:
the property
Since:
JDataGrid 1.7
See Also:
setSelectionBorderColor(java.awt.Color)

setSelectionBorderPainted

public void setSelectionBorderPainted(boolean b)
Sets the selectionBorderPainted property.

Parameters:
b - the property
Since:
JDataGrid 1.7
See Also:
isSelectionBorderPainted()

isSelectionBorderPainted

public boolean isSelectionBorderPainted()
Returns the selectionBorderPainted property.

Returns:
the property
Since:
JDataGrid 1.7
See Also:
setSelectionBorderPainted(boolean)

setFillHandleColor

public void setFillHandleColor(Color color)
Sets the fillHandleColor property.

Parameters:
color - the fill handle color
Since:
JDataGrid 1.7
See Also:
getFillHandleColor()

getFillHandleColor

public Color getFillHandleColor()
Returns the fillHandleColor property.

Returns:
the property
Since:
JDataGrid 1.7
See Also:
setFillHandleColor(java.awt.Color)

setFillHandlePainted

public void setFillHandlePainted(boolean b)
Sets the fillHandlePainted property.

Parameters:
b - the property
Since:
JDataGrid 1.7
See Also:
isFillHandlePainted()

isFillHandlePainted

public boolean isFillHandlePainted()
Returns the fillHandlePainted property.

Returns:
the property
Since:
JDataGrid 1.7
See Also:
setFillHandlePainted(boolean)

isPrinting

public boolean isPrinting()
Returns whether current is printing.

Returns:
true if is printing
Since:
JDataGrid 1.6.0

setEditingStopBehavior

public void setEditingStopBehavior(int editingStopBehavior)
Sets the editing stop behavior.

One of 3 legal values:

Parameters:
editingStopBehavior - the editing stop behavior
Since:
JDataGrid 1.6.0
See Also:
getEditingStopBehavior()

getEditingStopBehavior

public int getEditingStopBehavior()
Returns the editing stop behavior.

One of 3 legal values:

Returns:
the editing stop behavior
Since:
JDataGrid 1.6.0
See Also:
setEditingStopBehavior(int)

getFocusLostBehavior

public int getFocusLostBehavior()
Returns the focus lost behavior.

One of 3 legal values:

Returns:
the focus lost behavior in use
Since:
JComponentPack 3.2
See Also:
setFocusLostBehavior(int)

setFocusLostBehavior

public void setFocusLostBehavior(int focusLostBehavior)
Sets the focus lost behavior.

One of 3 legal values:

Parameters:
focusLostBehavior - the focus lost behavior
Since:
JComponentPack 3.2
See Also:
getFocusLostBehavior()

editCellAt

public boolean editCellAt(int row,
                          int column,
                          EventObject e)
Overrides:
editCellAt in class JTable

processKeyBinding

protected boolean processKeyBinding(KeyStroke ks,
                                    KeyEvent e,
                                    int condition,
                                    boolean pressed)
Overrides:
processKeyBinding in class JTable

getCellClass

public Class getCellClass(int row,
                          int column)
Returns the cell class.

Parameters:
row - the index of the row
column - the index of the column
Returns:
the class for the specified cell
Since:
JDataGrid 1.6.0
See Also:
setCellClass(java.lang.Class, int, int)

setCellClass

public void setCellClass(Class c,
                         int row,
                         int column)
Sets the cell class.

Parameters:
c - the class for the specified cell
row - the index of the row
column - the index of the column
Since:
JDataGrid 1.6.0
See Also:
getCellClass(int, int)

getCellAttributes

public AttributeSet getCellAttributes(int row,
                                      int column)
Returns the cell attributes.

Parameters:
row - the index of the row
column - the index of the column
Returns:
the attributes for the specified cell
Since:
JDataGrid 1.6.0
See Also:
setCellAttributes(javax.swing.text.AttributeSet, int, int)

getCellAttributes

public AttributeSet getCellAttributes(int row,
                                      int column,
                                      boolean readOnly)
Returns the cell attributes.

Parameters:
row - the index of the row
column - the index of the column
readOnly - true will return a read only attributes for cell render, otherwise return a copy attributes
Returns:
the attributes for the specified cell
Since:
JComponentPack 3.2
See Also:
setCellAttributes(javax.swing.text.AttributeSet, int, int)

setCellAttributes

public void setCellAttributes(AttributeSet attributes,
                              int row,
                              int column)
Sets the cell attributes.

Parameters:
attributes - the cell attributes
row - the index of the row
column - the index of the column
Since:
JDataGrid 1.6.0
See Also:
getCellAttributes(int, int)

getCellAttributes

public AttributeSet getCellAttributes()
Returns all selected cell attributes in common.

Returns:
the attributes for all selected cell
Since:
JDataGrid 2.0
See Also:
setCellAttributes(javax.swing.text.AttributeSet, int, int)

setCellAttributes

public void setCellAttributes(AttributeSet attributes)
Sets attributes to all selected cell .

Parameters:
attributes - the cell attributes
Since:
JDataGrid 1.8
See Also:
getCellAttributes(int, int)

removeEditor

public void removeEditor()
Overrides:
removeEditor in class JTable

clearSelection

public void clearSelection()
Overrides:
clearSelection in class JTable

getLeadSelectionRow

public int getLeadSelectionRow()
Returns current lead selection row.

Returns:
current lead selection row
Since:
JComponentPack 3.2
See Also:
getLeadSelectionColumn(), getSelectedCell(), getSelectedCells(), getSelectionList()

getLeadSelectionColumn

public int getLeadSelectionColumn()
Returns current lead selection column.

Returns:
current lead selection column
Since:
JComponentPack 3.2
See Also:
getLeadSelectionRow(), getSelectedCell(), getSelectedCells(), getSelectionList()

selectAll

public void selectAll()
Overrides:
selectAll in class JTable

isFullRowSelected

public boolean isFullRowSelected(int row)
Determines whether the full row is selected.

Parameters:
row - the specified row
Returns:
true if the specified full row is selected
Since:
JDataGrid 1.6.1

isFullColumnSelected

public boolean isFullColumnSelected(int column)
Determines whether the full column is selected.

Parameters:
column - the specified column
Returns:
true if the specified full column is selected
Since:
JDataGrid 1.6.1

isRowSelected

public boolean isRowSelected(int row)
Overrides:
isRowSelected in class JTable

isColumnSelected

public boolean isColumnSelected(int column)
Overrides:
isColumnSelected in class JTable

isCellSelected

public boolean isCellSelected(int row,
                              int column)
Overrides:
isCellSelected in class JTable

isCellSelected

public boolean isCellSelected(Cell c)
Returns whether the cell is selected.

Parameters:
c - the cell
Returns:
true if the cell is selected, otherwise return false
Since:
JDataGrid 1.9

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener
Overrides:
valueChanged in class JTable

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent e)
Specified by:
columnSelectionChanged in interface TableColumnModelListener
Overrides:
columnSelectionChanged in class JTable

setModel

public void setModel(TableModel dataModel)
Overrides:
setModel in class JTable

tableChanged

public void tableChanged(TableModelEvent e)
Specified by:
tableChanged in interface TableModelListener
Overrides:
tableChanged in class JTable

getSelectedCell

public Cell getSelectedCell()
Returns the selected cell as Cell object. Returns null if have not such selected cell or the selected cell is not contiguous.

Returns:
the selected cell as Cell object

getSelectedCells

public Cell[] getSelectedCells()
Returns all selected cells.

Returns:
the selected cell as Cell object
Since:
JDataGrid 1.1

isSelectionEmpty

public boolean isSelectionEmpty()
Returns true if the selection is empty.

Returns:
true if the selection is empty
Since:
JDataGrid 1.2

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Specified by:
getPreferredScrollableViewportSize in interface Scrollable
Overrides:
getPreferredScrollableViewportSize in class JTable

setRowHeader

public void setRowHeader(JLineBar rowHeader)
Sets the row header for this table.

Parameters:
rowHeader - the row header
Since:
JDataGrid 1.1
See Also:
getRowHeader()

getRowHeader

public JLineBar getRowHeader()
Returns the row header for this table.

Returns:
the row header
Since:
JDataGrid 1.1
See Also:
setRowHeader(com.zfqjava.swing.JLineBar)

setTableHeader

public void setTableHeader(JTableHeader tableHeader)
Overrides:
setTableHeader in class JTable

setColumnHeaderView

public void setColumnHeaderView(Component view)
Sets the column header view.

Parameters:
view - the column header view
Since:
JDataGrid 1.8
See Also:
getColumnHeaderView()

getColumnHeaderView

public Component getColumnHeaderView()
Returns the column header view.

Returns:
the column header view
Since:
JDataGrid 1.8
See Also:
setColumnHeaderView(java.awt.Component)

setRowHeaderView

public void setRowHeaderView(Component view)
Sets the row header view.

Parameters:
view - the row header view
Since:
JDataGrid 1.8
See Also:
getRowHeaderView()

getRowHeaderView

public Component getRowHeaderView()
Returns the row header view.

Returns:
the row header view
Since:
JDataGrid 1.8
See Also:
setRowHeaderView(java.awt.Component)

createRowHeader

protected JLineBar createRowHeader()
Creates a row header.

Returns:
a row header
Since:
JDataGrid 1.7
See Also:
setRowHeader(com.zfqjava.swing.JLineBar), getRowHeader()

resetRowHeader

public void resetRowHeader()
Since:
JComponentPack 3.4

resetColumnHeader

public void resetColumnHeader()
Since:
JComponentPack 3.4

setCornerButton

public void setCornerButton(AbstractButton cornerButton)
Sets the corner button.

Parameters:
cornerButton - the corner button
Since:
JDataGrid 1.7
See Also:
getCornerButton()

getCornerButton

public AbstractButton getCornerButton()
Returns the corner button.

Returns:
the corner button
Since:
JDataGrid 1.7
See Also:
setCornerButton(javax.swing.AbstractButton)

createCornerButton

protected AbstractButton createCornerButton()
Creates a corner button.

Returns:
a corner button
Since:
JDataGrid 1.7
See Also:
setCornerButton(javax.swing.AbstractButton), getCornerButton()

getZoomFactor

public double getZoomFactor()
Returns the zoom factor.

Returns:
the zoom factor
Since:
JDataGrid 2.0
See Also:
setZoomFactor(double)

setZoomFactor

public void setZoomFactor(double zoomFactor)
Sets the zoom factor.

Parameters:
zoomFactor - the zoom factor
Since:
JDataGrid 2.0
See Also:
getZoomFactor()

paintComponent

protected void paintComponent(Graphics g)
Overrides:
paintComponent in class JComponent

doLayout

public void doLayout()
Overrides:
doLayout in class JTable

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class JComponent

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

getMaximumSize

public Dimension getMaximumSize()
Overrides:
getMaximumSize in class JComponent

processMouseEvent

protected void processMouseEvent(MouseEvent e)
Overrides:
processMouseEvent in class JComponent

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e)
Overrides:
processMouseMotionEvent in class JComponent

processMouseWheelEvent

protected void processMouseWheelEvent(MouseWheelEvent e)
Overrides:
processMouseWheelEvent in class Component

setFreezeCell

public void setFreezeCell(int row,
                          int column)
Sets the freeze cell.

Parameters:
row - the top row visible in the bottom pane
column - the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeRow(int), getFreezeRow(), setFreezeColumn(int), getFreezeColumn()

setFreezeRow

public void setFreezeRow(int row)

getFreezeRow

public int getFreezeRow()
Returns the freeze row.

Returns:
the freeze row, the top row visible in the bottom pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), setFreezeRow(int)

setFreezeColumn

public void setFreezeColumn(int column)
Sets the freeze column.

Parameters:
column - the freeze column, the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), getFreezeColumn()

getFreezeColumn

public int getFreezeColumn()
Returns the freeze column.

Returns:
the freeze column, the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), setFreezeColumn(int)

getFreezeLineColor

public Color getFreezeLineColor()
Returns the freeze line color.

Returns:
the freeze line color
Since:
JDataGrid 2.0
See Also:
setFreezeLineColor(java.awt.Color)

setFreezeLineColor

public void setFreezeLineColor(Color freezeLineColor)
Sets the freeze line color.

Parameters:
freezeLineColor - the freeze line color
Since:
JDataGrid 2.0
See Also:
getFreezeLineColor()

selectRow

public void selectRow(int row)
Selects the specified row in the data grid.

Parameters:
row - the specified row
Since:
JDataGrid 1.1

selectRow

public void selectRow(int row,
                      boolean includeSpan)
Selects the specified row in the data grid.

Parameters:
row - the specified row
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.1

selectColumn

public void selectColumn(int column)
Selects the specified column in the data grid.

Parameters:
column - the specified column
Since:
JDataGrid 1.1

selectColumn

public void selectColumn(int column,
                         boolean includeSpan)
Selects the specified column in the data grid.

Parameters:
column - the specified column
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.1

selectCell

public void selectCell(int row,
                       int column)
Selects the specified cell in the data grid.

Parameters:
row - the row index
column - the column index
Since:
JDataGrid 1.1
See Also:
selectCell(int,int,int,int), selectCell(Cell)

selectCell

public void selectCell(int row,
                       int column,
                       boolean includeSpan)
Selects the specified cell in the data grid.

Parameters:
row - the row index
column - the column index
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.1
See Also:
selectCell(int,int,int,int), selectCell(Cell)

selectCell

public void selectCell(Cell c)
Selects the specified cell in the data grid.

Parameters:
c - the specified cell
Since:
JDataGrid 1.1
See Also:
selectCell(int,int), selectCell(int,int,int,int)

selectCell

public void selectCell(Cell c,
                       boolean includeSpan)
Selects the specified cell in the data grid.

Parameters:
c - the specified cell
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.1
See Also:
selectCell(int,int), selectCell(int,int,int,int)

selectCell

public void selectCell(int firstRow,
                       int lastRow,
                       int firstColumn,
                       int lastColumn)
Selects the specified cell in the data grid.

Parameters:
firstRow - the first row index of the specified cell area
lastRow - the last row index of the specified cell area
firstColumn - the first column index of the specified cell area
lastColumn - the last column index of the specified cell area
Since:
JDataGrid 1.1
See Also:
selectCell(int,int), selectCell(Cell)

selectCell

public void selectCell(int firstRow,
                       int lastRow,
                       int firstColumn,
                       int lastColumn,
                       boolean includeSpan)
Selects the specified cell in the data grid.

Parameters:
firstRow - the first row index of the specified cell area
lastRow - the last row index of the specified cell area
firstColumn - the first column index of the specified cell area
lastColumn - the last column index of the specified cell area
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.1
See Also:
selectCell(int,int), selectCell(Cell)

changeSelection

public void changeSelection(int rowIndex,
                            int columnIndex,
                            boolean toggle,
                            boolean extend)
Overrides:
changeSelection in class JTable

changeSelection

public void changeSelection(int anchorRow,
                            int leadRow,
                            int anchorColumn,
                            int leadColumn,
                            boolean toggle,
                            boolean extend,
                            boolean includeSpan)
Changes the selection of JDataGrid.

Parameters:
anchorRow - the anchor row index of the specified cell area
leadRow - the lead row index of the specified cell area
anchorColumn - the anchor column index of the specified cell area
leadColumn - the lead column index of the specified cell area
toggle - the toggle flag
extend - the extend flag
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.2

changeSelection

public void changeSelection(int firstRow,
                            int lastRow,
                            int firstColumn,
                            int lastColumn,
                            int anchorRow,
                            int leadRow,
                            int anchorColumn,
                            int leadColumn,
                            boolean toggle,
                            boolean extend,
                            boolean includeSpan)
Changes the selection of JDataGrid.

Parameters:
firstRow - the first row index of the specified cell area
lastRow - the last row index of the specified cell area
firstColumn - the first column index of the specified cell area
lastColumn - the last column index of the specified cell area
anchorRow - the anchor row index of the specified cell area
leadRow - the lead row index of the specified cell area
anchorColumn - the anchor column index of the specified cell area
leadColumn - the lead column index of the specified cell area
toggle - the toggle flag
extend - the extend flag
includeSpan - if true, will select the cell area include all span
Since:
JDataGrid 1.6.0

scrollRectToVisible

public void scrollRectToVisible(Rectangle aRect)
Overrides:
scrollRectToVisible in class JComponent

getDataGridModel

public DataGridModel getDataGridModel()
Returns the DataGridModel for this datagrid.

Returns:
the DataGridModel for this datagrid
Since:
JDataGrid 1.6.0

createDataGridModel

public DataGridModel createDataGridModel()
Creates a new default DataGridModel for datagrid.

Returns:
a new default DataGridModel for datagrid
Since:
JDataGrid 2.0

convertRowIndexToDataGridModel

public int convertRowIndexToDataGridModel(int viewRowIndex)
Converts the view row index to DataGridModel row index.

Parameters:
viewRowIndex - the view row index
Since:
JComponentPack 3.2
See Also:
convertColumnIndexToDataGridModel(int)

convertRowIndexToDataGridView

public int convertRowIndexToDataGridView(int modelRowIndex)
Converts the DataGridModel row index to JDataGrid view row index .

Parameters:
modelRowIndex - the DataGridModel row index
Since:
JComponentPack 3.2
See Also:
convertColumnIndexToDataGridView(int)

convertColumnIndexToDataGridModel

public int convertColumnIndexToDataGridModel(int viewColumnIndex)
Converts the view column index to DataGridModel column index.

Parameters:
viewColumnIndex - the view column index
Since:
JComponentPack 3.2
See Also:
convertRowIndexToDataGridModel(int)

convertColumnIndexToDataGridView

public int convertColumnIndexToDataGridView(int modelColumnIndex)
Converts the DataGridModel column index to JDataGrid view column row index .

Parameters:
modelColumnIndex - the DataGridModel column index
Since:
JComponentPack 3.2
See Also:
convertRowIndexToDataGridView(int)

getSelectionList

public List getSelectionList()
Returns the read-only selection list.

Returns:
the read-only selection list
Since:
JDataGrid 1.6.1

setCellSelectionModel

public void setCellSelectionModel(CellSelectionModel model)
Sets the cell selection model.

Parameters:
model - the cell selection model
Since:
JDataGrid 1.9
See Also:
getCellSelectionModel()

getCellSelectionModel

public CellSelectionModel getCellSelectionModel()
Returns the cell selection model.

Returns:
the cell selection model
Since:
JDataGrid 1.9
See Also:
setCellSelectionModel(com.zfqjava.swing.CellSelectionModel)

createCellSelectionModel

protected CellSelectionModel createCellSelectionModel()
Creates the default cell selection model.

Returns:
the default cell selection model
Since:
JDataGrid 1.9

repaintCell

public void repaintCell(int rowIndex,
                        int columnIndex)
Repaints the specified cell.

Parameters:
rowIndex - the row index of the specified cell
columnIndex - the column index of the specified cell
Since:
JDataGrid 1.2

cellChanged

public void cellChanged(DataGridModelEvent e)
Invoked when this dataGrid's DataGridModel generates a DataGridModelEvent.

Application code will not use these methods explicitly, they are used internally by JDataGrid.

Specified by:
cellChanged in interface DataGridModelListener
Parameters:
e - the event
Since:
JDataGrid 1.1

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent e)
An undoable edit happened

Application code will not use these methods explicitly, they are used internally by JDataGrid.

Specified by:
undoableEditHappened in interface UndoableEditListener
Parameters:
e - the undoable edit
Since:
JDataGrid 1.1

fireUndoableEditHappened

protected void fireUndoableEditHappened(UndoableEdit edit)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

Application code will not use these methods explicitly, they are used internally by JDataGrid.

Parameters:
edit - the undoable edit
Since:
JDataGrid 1.1
See Also:
EventListenerList

addUndoableEditListener

public void addUndoableEditListener(UndoableEditListener l)
Registers the given observer to begin receiving notifications when undoable edits are made to the data grid.

Parameters:
l - the observer to register
Since:
JDataGrid 1.1
See Also:
UndoableEditEvent

removeUndoableEditListener

public void removeUndoableEditListener(UndoableEditListener l)
Unregisters the given observer from the notification list so it will no longer receive updates.

Parameters:
l - the observer to register
Since:
JDataGrid 1.1
See Also:
UndoableEditEvent

getUndoableEditListeners

public UndoableEditListener[] getUndoableEditListeners()
Returns an array of all the undoable edit listeners registered on this data grid.

Returns:
all of this data grid's UndoableEditListeners or an empty array if no undoable edit listeners are currently registered
Since:
JDataGrid 1.1
See Also:
addUndoableEditListener(javax.swing.event.UndoableEditListener), removeUndoableEditListener(javax.swing.event.UndoableEditListener)

addHyperlinkListener

public void addHyperlinkListener(HyperlinkListener listener)
Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered.

Parameters:
listener - the listener
Since:
JDataGrid 1.8

removeHyperlinkListener

public void removeHyperlinkListener(HyperlinkListener listener)
Removes a hyperlink listener.

Parameters:
listener - the listener
Since:
JDataGrid 1.8

getHyperlinkListeners

public HyperlinkListener[] getHyperlinkListeners()
Returns an array of all the HyperLinkListeners added to this JDataGrid with addHyperlinkListener().

Returns:
all of the HyperLinkListeners added or an empty array if no listeners have been added
Since:
JDataGrid 1.8

fireHyperlinkUpdate

public void fireHyperlinkUpdate(HyperlinkEvent e)
Notifies all listeners that have registered interest for notification on this event type. The listener list is processed last to first.

Parameters:
e - the event
Since:
JDataGrid 1.8
See Also:
EventListenerList

doHyperlinkUpdate

protected void doHyperlinkUpdate(HyperlinkEvent e)
Handles the HyperlinkEvent, and do the default behavior, such as launch a browser.

Parameters:
e - the HyperlinkEvent
Since:
JDataGrid 2.0

getToolTipText

public String getToolTipText(MouseEvent event)
Overrides:
getToolTipText in class JTable

valueChanged

public void valueChanged(CellSelectionEvent e)
An cell selection event happened

Application code will not use these methods explicitly, they are used internally by JDataGrid.

Specified by:
valueChanged in interface CellSelectionListener
Parameters:
e - the cell selection event
Since:
JDataGrid 1.9

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Adds a CellEditorListener to the listener list.

Parameters:
l - the new listener to be added
Since:
JComponentPack 1.3

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Removes a CellEditorListener from the listener list.

Parameters:
l - the listener to be removed
Since:
JComponentPack 1.3

getCellEditorListeners

public CellEditorListener[] getCellEditorListeners()
Returns an array of all the CellEditorListeners added to this AbstractCellEditor with addCellEditorListener().

Returns:
all of the CellEditorListeners added or an empty array if no listeners have been added
Since:
JComponentPack 1.3

editingCanceled

public void editingCanceled(ChangeEvent e)
Specified by:
editingCanceled in interface CellEditorListener
Overrides:
editingCanceled in class JTable

editingStopped

public void editingStopped(ChangeEvent e)
Specified by:
editingStopped in interface CellEditorListener
Overrides:
editingStopped in class JTable

editingFailed

public void editingFailed(ChangeEvent e)
Specified by:
editingFailed in interface CellEditorListener2

columnRemoved

public void columnRemoved(TableColumnModelEvent e)
Specified by:
columnRemoved in interface TableColumnModelListener
Overrides:
columnRemoved in class JTable

columnMoved

public void columnMoved(TableColumnModelEvent e)
Specified by:
columnMoved in interface TableColumnModelListener
Overrides:
columnMoved in class JTable

paramString

protected String paramString()
Returns a string representation of this JDataGrid. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString in class JTable
Returns:
a string representation of this JDataGrid.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JDataGrid. For JDataGrids, the AccessibleContext takes the form of an AccessibleJDataGrid. A new AccessibleJDataGrid instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JTable
Returns:
an AccessibleJDataGrid that serves as the AccessibleContext of this JDataGrid

JComponentPack 3.5

Send your Feedback
JComponentPack 3.5
Copyright © 2009 Extreme Component, Inc. All rights reserved.