com.zfqjava.swing
Class JDataGrid

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTable
                          |
                          +--com.zfqjava.swing.JDataGrid
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.CellEditorListener, DataGridModelListener, java.util.EventListener, java.awt.image.ImageObserver, javax.swing.event.ListSelectionListener, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, javax.swing.event.UndoableEditListener

public class JDataGrid
extends javax.swing.JTable
implements DataGridModelListener, javax.swing.event.UndoableEditListener

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.

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

See Also:
Serialized Form

Inner Class Summary
protected  class JDataGrid.AccessibleJDataGrid
          This class implements accessibility support for the JDataGrid class.
 
Inner classes inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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(java.lang.Object[][] rowData, java.lang.Object[] columnNames)
          Constructs a JDataGrid to display the values in the two dimensional array, rowData, with column names, columnNames.
JDataGrid(javax.swing.table.TableModel dm)
          Constructs a JDataGrid that is initialized with dm as the data model, a default column model, and a default selection model.
JDataGrid(javax.swing.table.TableModel dm, javax.swing.table.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(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm, javax.swing.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(java.util.Vector rowData, java.util.Vector columnNames)
          Constructs a JDataGrid to display the values in the Vector of Vectors, rowData, with column names, columnNames.
 
Method Summary
 void addColumn(javax.swing.table.TableColumn aColumn)
           
 void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
          Registers the given observer to begin receiving notifications when undoable edits are made to the data grid.
 void cellChanged(DataGridModelEvent e)
          Invoked when this dataGrid's DataGridModel generates a DataGridModelEvent.
 void clearSelection()
           
 void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
           
protected  void configureEnclosingScrollPane()
           
protected  void createDefaultEditors()
           
protected  void createDefaultRenderers()
           
protected  javax.swing.table.JTableHeader createDefaultTableHeader()
           
 boolean editCellAt(int row, int column, java.util.EventObject e)
           
protected  void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
          Notifies all listeners that have registered interest for notification on this event type.
 javax.accessibility.AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this JDataGrid.
 javax.swing.table.TableCellEditor getCellEditor(int row, int column)
           
 java.awt.Rectangle getCellRect(Cell c, boolean includeSpacing)
          Returns a rectangle for the cell that lies at the intersection of c.
 javax.swing.table.TableCellRenderer getCellRenderer(int row, int column)
           
 javax.swing.table.TableCellEditor getDefaultEditor(java.lang.Class columnClass)
           
 javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
           
 JLineBar getRowHeader()
          Returns the row header for this table.
 Cell getSelectedCell()
          Returns the selected cell as Cell object.
 Cell[] getSelectedCells()
          Returns all selected cells.
 java.lang.String getUIClassID()
          Returns a string that specifies the name of the L&F class that renders this component.
 javax.swing.event.UndoableEditListener[] getUndoableEditListeners()
          Returns an array of all the undoable edit listeners registered on this data grid.
protected  void initializeLocalVars()
           
 boolean isCellSelected(int row, int column)
           
 boolean isColumnSelected(int column)
           
 boolean isRowSelected(int row)
           
protected  java.lang.String paramString()
          Returns a string representation of this JDataGrid.
 java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor, int row, int column)
           
 java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer, int row, int column)
           
 void removeColumn(javax.swing.table.TableColumn aColumn)
           
 void removeEditor()
           
 void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
          Unregisters the given observer from the notification list so it will no longer receive updates.
 void selectCell(Cell c)
          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 firstRow, int lastRow, int firstColumn, int lastColumn)
          Selects the specified cell in the data grid.
 void selectColumn(int column)
          Selects the specified column in the data grid.
 void selectRow(int row)
          Selects the specified row in the data grid.
 void setModel(javax.swing.table.TableModel dataModel)
           
 void setRowHeader(JLineBar rowHeader)
          Sets the row header for this table.
 void setRowHeight(int row, int rowHeight)
           
 void tableChanged(javax.swing.event.TableModelEvent e)
           
protected  void unconfigureEnclosingScrollPane()
           
 void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
          An undoable edit happened
 void updateUI()
          Resets the UI property with a value from the current look and feel.
 void valueChanged(javax.swing.event.ListSelectionEvent e)
           
 
Methods inherited from class javax.swing.JTable
addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, editingStopped, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getTableHeader, getToolTipText, getUI, getValueAt, isCellEditable, isEditing, isFocusTraversable, isManagingFocus, moveColumn, processKeyBinding, removeColumnSelectionInterval, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(javax.swing.table.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(javax.swing.table.TableModel dm,
                 javax.swing.table.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(javax.swing.table.TableModel dm,
                 javax.swing.table.TableColumnModel cm,
                 javax.swing.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(java.util.Vector rowData,
                 java.util.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(java.lang.Object[][] rowData,
                 java.lang.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 javax.swing.JTable
See Also:
JComponent.updateUI()

getUIClassID

public java.lang.String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.
Overrides:
getUIClassID in class javax.swing.JTable
Returns:
"DataGridUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

initializeLocalVars

protected void initializeLocalVars()
Overrides:
initializeLocalVars in class javax.swing.JTable

configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
Overrides:
configureEnclosingScrollPane in class javax.swing.JTable

unconfigureEnclosingScrollPane

protected void unconfigureEnclosingScrollPane()
Overrides:
unconfigureEnclosingScrollPane in class javax.swing.JTable

setRowHeight

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

addColumn

public void addColumn(javax.swing.table.TableColumn aColumn)
Overrides:
addColumn in class javax.swing.JTable

removeColumn

public void removeColumn(javax.swing.table.TableColumn aColumn)
Overrides:
removeColumn in class javax.swing.JTable

createDefaultTableHeader

protected javax.swing.table.JTableHeader createDefaultTableHeader()
Overrides:
createDefaultTableHeader in class javax.swing.JTable

createDefaultRenderers

protected void createDefaultRenderers()
Overrides:
createDefaultRenderers in class javax.swing.JTable

createDefaultEditors

protected void createDefaultEditors()
Overrides:
createDefaultEditors in class javax.swing.JTable

getDefaultRenderer

public javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
Overrides:
getDefaultRenderer in class javax.swing.JTable

getDefaultEditor

public javax.swing.table.TableCellEditor getDefaultEditor(java.lang.Class columnClass)
Overrides:
getDefaultEditor in class javax.swing.JTable

getCellRenderer

public javax.swing.table.TableCellRenderer getCellRenderer(int row,
                                                           int column)
Overrides:
getCellRenderer in class javax.swing.JTable

prepareRenderer

public java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer,
                                          int row,
                                          int column)
Overrides:
prepareRenderer in class javax.swing.JTable

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor(int row,
                                                       int column)
Overrides:
getCellEditor in class javax.swing.JTable

prepareEditor

public java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor,
                                        int row,
                                        int column)
Overrides:
prepareEditor in class javax.swing.JTable

editCellAt

public boolean editCellAt(int row,
                          int column,
                          java.util.EventObject e)
Overrides:
editCellAt in class javax.swing.JTable

removeEditor

public void removeEditor()
Overrides:
removeEditor in class javax.swing.JTable

clearSelection

public void clearSelection()
Overrides:
clearSelection in class javax.swing.JTable

isRowSelected

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

isColumnSelected

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

isCellSelected

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

setModel

public void setModel(javax.swing.table.TableModel dataModel)
Overrides:
setModel in class javax.swing.JTable

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Overrides:
tableChanged in class javax.swing.JTable

columnSelectionChanged

public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
Overrides:
columnSelectionChanged in class javax.swing.JTable

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Overrides:
valueChanged in class javax.swing.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

getCellRect

public java.awt.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

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)

selectRow

public void selectRow(int row)
Selects the specified row in the data grid.
Parameters:
row - the specified row
Since:
JDataGrid 1.1

selectColumn

public void selectColumn(int column)
Selects the specified column in the data grid.
Parameters:
column - the specified column
Since:
JDataGrid 1.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 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(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)

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(javax.swing.event.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 javax.swing.event.UndoableEditListener
Parameters:
e - the undoable edit
Since:
JDataGrid 1.1

fireUndoableEditHappened

protected void fireUndoableEditHappened(javax.swing.undo.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.

Since:
JDataGrid 1.1
See Also:
EventListenerList

addUndoableEditListener

public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Registers the given observer to begin receiving notifications when undoable edits are made to the data grid.
Parameters:
listener - the observer to register
Since:
JDataGrid 1.1
See Also:
UndoableEditEvent

removeUndoableEditListener

public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Unregisters the given observer from the notification list so it will no longer receive updates.
Parameters:
listener - the observer to register
Since:
JDataGrid 1.1
See Also:
UndoableEditEvent

getUndoableEditListeners

public javax.swing.event.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)

paramString

protected java.lang.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 javax.swing.JTable
Returns:
a string representation of this JDataGrid.

getAccessibleContext

public javax.accessibility.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.
Overrides:
getAccessibleContext in class javax.swing.JTable
Returns:
an AccessibleJDataGrid that serves as the AccessibleContext of this JDataGrid


Copyright © 2001-2003 Extreme Component, Inc. All rights reserved.