pt.moredata.widgets
Class BaseTable

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JTable
                  extended bypt.moredata.widgets.BaseTable
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.CellEditorListener, 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

public class BaseTable
extends javax.swing.JTable
implements javax.swing.event.TableModelListener, javax.swing.Scrollable, javax.swing.event.TableColumnModelListener, javax.swing.event.ListSelectionListener, javax.swing.event.CellEditorListener, javax.accessibility.Accessible

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static short alternate
           
static java.awt.Color disabledColor
           
static java.awt.Color lockedColor
           
 
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
BaseTable()
          Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
BaseTable(int numRows, int numColumns)
          Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel.
BaseTable(java.lang.Object[][] rowData, java.lang.Object[] columnNames)
          Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.
BaseTable(javax.swing.table.TableModel dm)
          Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
BaseTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm)
          Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
BaseTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm, javax.swing.ListSelectionModel sm)
          Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.
BaseTable(java.util.Vector rowData, java.util.Vector columnNames)
          Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.
 
Method Summary
 void addDelegate(WidgetDelegate delegate)
           
 void addTableListener(TableListener l)
          Listener que dispara depois de se sair de uma celula
protected  void configureEnclosingScrollPane()
          If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane.
 boolean editCellAt(int row, int column, java.util.EventObject e)
          Programmatically starts editing the cell at row and column, if the cell is editable.
protected  void fireCell(TableEvent event, byte tipo)
          Dispara o evento ao sair de uma celula
 javax.swing.table.TableCellEditor getCellEditor(int row, int column)
           
 CellProperties getCellProperties(int row, int col)
          returns the property of a cell
 javax.swing.table.TableCellRenderer getCellRenderer(int row, int column)
           
 javax.swing.table.TableColumn getColumn(int idx)
           
 CellEditor getCurrentEditor()
           
 DataSource getDataSource()
           
 javax.swing.table.TableCellEditor getDefaultEditor(java.lang.Class columnClass)
          Returns the editor to be used when no editor has been set in a TableColumn.
 javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
          Returns the DDataTableRenderer
 WidgetDelegate getDelegate(int index)
           
 WidgetDelegate getDelegate(int row, int col)
          Return the delegate that a belongs to the cell (row,col)
 java.util.ArrayList getDelegateList()
           
 boolean getEditable()
           
 java.awt.Component getEditorComponent()
          Returns the component that is handling the editing session.
 javax.swing.table.TableModel getModel()
          Returns the TableModel that provides the data displayed by this JTable.
 boolean getNavigateThroughNonEditableCells()
           
 TableSortMethod getSortMethod()
           
 TableListener getTableListener()
           
 javax.swing.plaf.TableUI getUI()
          Returns the L&F object that renders this component.
 java.lang.String getUIClassID()
          Returns the suffix used to construct the name of the L&F class used to render this component.
 boolean isFocusTraversable()
          We override this method, whose implementation in JComponent returns false, to return true.
 boolean isManagingFocus()
          We override this method, whose implementation in JComponent returns false, to return true.
 void moveTo(int row, int column)
           
 java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor, int row, int column)
          Prepares the editor by querying the data model for the value and selection state of the cell at row, column.
 java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor, int row, int column, java.lang.Object value)
           
 java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer, int row, int column)
          Prepares the renderer setting the adequate properties for that cell row, column.
 boolean reEditCellAt(int row, int column)
           
 boolean reEditCellAt(int row, int column, java.lang.Object value)
           
 void removeNotify()
          Calls the unconfigureEnclosingScrollPane method.
 void removeTableListener(TableListener l)
           
 void setCellProperties(int row, int col, CellProperties _properties)
          Define as propriedades da celula
 void setDataSource(DataSource ds)
           
 void setDefaultEditor(java.lang.Class columnClass, javax.swing.table.TableCellEditor editor)
          Sets the DDataEditor as the default editor
 void setDefaultRenderer(java.lang.Class columnClass, javax.swing.table.TableCellRenderer renderer)
          Sets the DDataTableRenderer as the default renderer
 void setDelegate(int row, int col, WidgetDelegate _delegate)
          Deprecated. The delegate list should't be modified
 void setDelegateList(java.util.ArrayList _delegateList)
           
 void setEditable(boolean editable)
           
 void setModel(javax.swing.table.TableModel dataModel)
          Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
 void setNavigateThroughNonEditableCells(boolean nav)
           
 void setSortMethod(TableSortMethod comp)
           
 void setUI(javax.swing.plaf.TableUI ui)
           
 boolean tableHasFocus()
          Verifica se a tabela tem focus
protected  void unconfigureEnclosingScrollPane()
          Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null.
 void updateUI()
          Update the Components
 void updateValues()
           
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDragEnabled, getEditingColumn, getEditingRow, getGridColor, getIntercellSpacing, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDragEnabled, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, valueChanged
 
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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.event.TableModelListener
tableChanged
 
Methods inherited from interface javax.swing.Scrollable
getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement
 
Methods inherited from interface javax.swing.event.TableColumnModelListener
columnAdded, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged
 
Methods inherited from interface javax.swing.event.ListSelectionListener
valueChanged
 
Methods inherited from interface javax.swing.event.CellEditorListener
editingCanceled, editingStopped
 
Methods inherited from interface javax.accessibility.Accessible
getAccessibleContext
 

Field Detail

disabledColor

public static final java.awt.Color disabledColor

lockedColor

public static final java.awt.Color lockedColor

alternate

public static short alternate
See Also:
getUIClassID(), #readObject
Constructor Detail

BaseTable

public BaseTable()
Constructs a default JTable 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()

BaseTable

public BaseTable(javax.swing.table.TableModel dm)
Constructs a JTable 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()

BaseTable

public BaseTable(javax.swing.table.TableModel dm,
                 javax.swing.table.TableColumnModel cm)
Constructs a JTable 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()

BaseTable

public BaseTable(javax.swing.table.TableModel dm,
                 javax.swing.table.TableColumnModel cm,
                 javax.swing.ListSelectionModel sm)
Constructs a JTable 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()

BaseTable

public BaseTable(int numRows,
                 int numColumns)
Constructs a JTable 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

BaseTable

public BaseTable(java.util.Vector rowData,
                 java.util.Vector columnNames)
Constructs a JTable 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);

Each row must contain a value for each column or an exception will be raised.

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

BaseTable

public BaseTable(java.lang.Object[][] rowData,
                 java.lang.Object[] columnNames)
Constructs a JTable 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

configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane. When a JTable is added to a JScrollPane in the usual way, using new JScrollPane(myTable), addNotify is called in the JTable (when the table is added to the viewport). JTable's addNotify method in turn calls this method, which is protected so that this default installation procedure can be overridden by a subclass.

See Also:
JTable.addNotify()

removeNotify

public void removeNotify()
Calls the unconfigureEnclosingScrollPane method.

See Also:
unconfigureEnclosingScrollPane()

unconfigureEnclosingScrollPane

protected void unconfigureEnclosingScrollPane()
Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null. JTable's removeNotify method calls this method, which is protected so that this default uninstallation procedure can be overridden by a subclass.

See Also:
removeNotify(), configureEnclosingScrollPane()

setDefaultRenderer

public void setDefaultRenderer(java.lang.Class columnClass,
                               javax.swing.table.TableCellRenderer renderer)
Sets the DDataTableRenderer as the default renderer

Parameters:
columnClass - set the default cell renderer for this columnClass
renderer - default cell renderer to be used for this columnClass
See Also:
getDefaultRenderer(java.lang.Class), setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor)

getDefaultRenderer

public javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class columnClass)
Returns the DDataTableRenderer

Parameters:
columnClass - return the default cell renderer for this columnClass
Returns:
the renderer for this columnClass
See Also:
setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer), JTable.getColumnClass(int)

setDefaultEditor

public void setDefaultEditor(java.lang.Class columnClass,
                             javax.swing.table.TableCellEditor editor)
Sets the DDataEditor as the default editor

Parameters:
columnClass - set the default cell editor for this columnClass
editor - default cell editor to be used for this columnClass
See Also:
TableModel.isCellEditable(int, int), getDefaultEditor(java.lang.Class), setDefaultRenderer(java.lang.Class, javax.swing.table.TableCellRenderer)

getDefaultEditor

public javax.swing.table.TableCellEditor getDefaultEditor(java.lang.Class columnClass)
Returns the editor to be used when no editor has been set in a TableColumn. During the editing of cells the editor is fetched from a Hashtable of entries according to the class of the cells in the column. If there is no entry for this columnClass the method returns the entry for the most specific superclass. The JTable installs entries for Object, Number, and Boolean, all of which can be modified or replaced.

Parameters:
columnClass - return the default cell editor for this columnClass
Returns:
the default cell editor to be used for this columnClass
See Also:
setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor), JTable.getColumnClass(int)

editCellAt

public boolean editCellAt(int row,
                          int column,
                          java.util.EventObject e)
Programmatically starts editing the cell at row and column, if the cell is editable. To prevent the JTable from editing a particular table, column or cell value, return false from the isCellEditable method in the TableModel interface.

Parameters:
row - the row to be edited
column - the column to be edited
e - event to pass into shouldSelectCell
Returns:
false if for any reason the cell cannot be edited
Throws:
java.lang.IllegalArgumentException - If row or column is not in the valid range

getEditorComponent

public java.awt.Component getEditorComponent()
Returns the component that is handling the editing session. If nothing is being edited, returns null.

Returns:
Component handling editing session

getUI

public javax.swing.plaf.TableUI getUI()
Returns the L&F object that renders this component.

Returns:
the TableUI object that renders this component

getUIClassID

public java.lang.String getUIClassID()
Returns the suffix used to construct the name of the L&F class used to render this component.

Returns:
the string "TableUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setModel

public void setModel(javax.swing.table.TableModel dataModel)
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.

Throws:
java.lang.IllegalArgumentException - if newModel is null
See Also:
getModel()

getModel

public javax.swing.table.TableModel getModel()
Returns the TableModel that provides the data displayed by this JTable.

Returns:
the TableModel that provides the data displayed by this JTable
See Also:
setModel(javax.swing.table.TableModel)

getCellRenderer

public javax.swing.table.TableCellRenderer getCellRenderer(int row,
                                                           int column)

prepareRenderer

public java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer,
                                          int row,
                                          int column)
Prepares the renderer setting the adequate properties for that cell row, column.

Note:

Parameters:
renderer - the TableCellRenderer to prepare
row - the row of the cell to render, where 0 is the first row
column - the column of the cell to render, where 0 is the first column

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor(int row,
                                                       int column)
Parameters:
row - the row of the cell to edit, where 0 is the first row
column - the column of the cell to edit, where 0 is the first column
Returns:
the editor for this cell; if null return the default editor for this type of cell
See Also:
DefaultCellEditor

prepareEditor

public java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor,
                                        int row,
                                        int column)
Prepares the editor by querying the data model for the value and selection state of the cell at row, column.

Note: Throughout the table package, the internal implementations always use this method to prepare editors so that this default behavior can be safely overridden by a subclass.

Parameters:
editor - the TableCellEditor to set up
row - the row of the cell to edit, where 0 is the first row
column - the column of the cell to edit, where 0 is the first column
Returns:
the Component being edited

prepareEditor

public java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor,
                                        int row,
                                        int column,
                                        java.lang.Object value)

isManagingFocus

public boolean isManagingFocus()
We override this method, whose implementation in JComponent returns false, to return true. This allows us to give a special meaning to TAB and SHIFT-TAB in the JTable.

Returns:
true

isFocusTraversable

public boolean isFocusTraversable()
We override this method, whose implementation in JComponent returns false, to return true. This indicates that the JTable is a component that should be part of a (tabbing) focus cycle by default.

Returns:
true

moveTo

public void moveTo(int row,
                   int column)

reEditCellAt

public boolean reEditCellAt(int row,
                            int column)

reEditCellAt

public boolean reEditCellAt(int row,
                            int column,
                            java.lang.Object value)

setCellProperties

public void setCellProperties(int row,
                              int col,
                              CellProperties _properties)
Define as propriedades da celula


getCellProperties

public CellProperties getCellProperties(int row,
                                        int col)
returns the property of a cell


setDelegate

public void setDelegate(int row,
                        int col,
                        WidgetDelegate _delegate)
Deprecated. The delegate list should't be modified

This method puts a delegate on the delegate list


getDelegate

public WidgetDelegate getDelegate(int row,
                                  int col)
Return the delegate that a belongs to the cell (row,col)


getDelegate

public WidgetDelegate getDelegate(int index)

setDelegateList

public void setDelegateList(java.util.ArrayList _delegateList)

getDelegateList

public java.util.ArrayList getDelegateList()

addDelegate

public void addDelegate(WidgetDelegate delegate)

addTableListener

public void addTableListener(TableListener l)
Listener que dispara depois de se sair de uma celula


removeTableListener

public void removeTableListener(TableListener l)

fireCell

protected void fireCell(TableEvent event,
                        byte tipo)
Dispara o evento ao sair de uma celula


getCurrentEditor

public CellEditor getCurrentEditor()

setEditable

public void setEditable(boolean editable)

getEditable

public boolean getEditable()

updateValues

public void updateValues()

setUI

public void setUI(javax.swing.plaf.TableUI ui)

updateUI

public void updateUI()
Update the Components


getColumn

public javax.swing.table.TableColumn getColumn(int idx)

tableHasFocus

public boolean tableHasFocus()
Verifica se a tabela tem focus


getTableListener

public TableListener getTableListener()

setNavigateThroughNonEditableCells

public void setNavigateThroughNonEditableCells(boolean nav)

getNavigateThroughNonEditableCells

public boolean getNavigateThroughNonEditableCells()

setSortMethod

public void setSortMethod(TableSortMethod comp)

getSortMethod

public TableSortMethod getSortMethod()

getDataSource

public DataSource getDataSource()

setDataSource

public void setDataSource(DataSource ds)