|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.openswing.swing.table.client.Grid
Title: OpenSwing Framework
Description: Grid based on VOListTableModel. This class has not be used directly by the programmer: it's called by GridControl.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static int |
BOTTOM_GRID
bottom grid (optional), that contains the bottom locked rows |
static int |
MAIN_GRID
main grid |
boolean |
searchAdditionalRows
flag used in grid to enable the retrieval of additional rows in fast search, when search criteria fails; default value: ClientSettings.SEARCH_ADDITION_ROWS |
static int |
TOP_GRID
top grid (optional), that contains the top locked rows |
Fields inherited from class javax.swing.JTable |
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Grid(Grids grids,
Column[] colProps,
GridStatusPanel statusPanel,
int fromColIndex,
int toColIndex,
boolean colorsInReadOnlyMode,
VOListTableModel model,
VOListAdapter modelAdapter,
GridController gridController,
boolean lockedGrid,
boolean anchorLastColumn,
int expandableColumn,
boolean singleExpandableRow,
boolean overwriteRowWhenExpanding,
ExpandableRowController expandableRowController,
java.util.HashMap comboFilters,
int headerHeight,
boolean searchAdditionalRows,
boolean allowColumnsSortingInEdit,
int gridType)
Costructor called by GridControl: programmer never called directly this class. |
Method Summary | |
void |
addNotify()
Method called by JVM when viewing this class. |
void |
addPopupCommand(javax.swing.JMenuItem item)
Add a command to the grids.getPopup() menu. |
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Updates the selection models of the table, depending on the state of the two flags: toggle and extend . |
void |
collapseRow(int row)
If expandableRenderer attribute is not null, then collapse the specified row. |
int |
columnAtPoint(java.awt.Point point)
Method overrided to calculate column index according to the cell visibility (that is dependent from the cells span) |
void |
columnMarginChanged(javax.swing.event.ChangeEvent e)
Method called by JTable when resizing a column. |
void |
columnMoved(javax.swing.event.TableColumnModelEvent e)
Method called my JTable when moving a column. |
void |
columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
Method overrided to ensure that the current selected cell is always visible. |
boolean |
disableListener()
|
void |
dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
This message goes to DragSourceListener, informing it that the dragging has ended. |
void |
dragEnter(java.awt.dnd.DragSourceDragEvent event)
This message goes to DragSourceListener, informing it that the dragging has entered the DropSite |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent event)
This method is invoked when you are dragging over the DropSite. |
void |
dragExit(java.awt.dnd.DragSourceEvent event)
This message goes to DragSourceListener, informing it that the dragging has exited the DropSite. |
void |
dragExit(java.awt.dnd.DropTargetEvent event)
This method is invoked when you are exit the DropSite without dropping. |
void |
dragOver(java.awt.dnd.DragSourceDragEvent event)
This message goes to DragSourceListener, informing it that the dragging is currently ocurring over the DropSite. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent event)
This method is invoked when a drag operation is going on. |
void |
drop(java.awt.dnd.DropTargetDropEvent event)
This method is invoked when a drop event has occurred. |
void |
dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
This method is invoked when the user changes the dropAction. |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
This method is invoked if the use modifies the current drop gesture. |
boolean |
editCellAt(int row,
int column,
java.util.EventObject e)
Method redefined to store the current selected cell when user clicks directly in the cell with the mouse. |
void |
editingStopped(javax.swing.event.ChangeEvent e)
Invoked when editing is finished. |
void |
enableDrag(java.lang.String gridId)
Enable drag onto the grid. |
void |
ensureRowIsVisible(int selRow)
This method override the super class method, to fix a bug. |
void |
filter(Column colProps,
java.lang.Object value1,
java.lang.Object value2)
Method called by quick filter panel to filter the specified column. |
void |
finalize()
|
java.awt.Color |
getActiveCellBackgroundColor()
|
java.awt.Rectangle |
getCellRect(int row,
int column,
boolean includeSpacing)
|
javax.swing.table.TableCellRenderer |
getCellRenderer(int row,
int col)
|
int |
getColumnIndex(java.lang.String columnName)
|
javax.swing.JComponent |
getComponent()
|
java.lang.String |
getExpandableColumnAttributeName()
|
ExpandableRowController |
getExpandableRowController()
|
Grids |
getGrids()
|
int |
getMode()
|
Grid |
getParentGrid()
|
int |
getRowCount()
|
int |
getSelectedIndex()
|
java.awt.event.MouseListener |
getSortingMouseListener()
|
org.openswing.swing.table.client.Grid.Pair |
getSpan(int row,
int column)
|
java.lang.String |
getValueAt(int index)
|
VOListTableModel |
getVOListTableModel()
|
boolean |
hasCellSpan()
|
boolean |
hasColSpan()
|
void |
internalSorting()
Sort the list of value objects already loaded, according to current column sorting settings. |
boolean |
isColorsInReadOnlyMode()
|
boolean |
isDataModified()
|
boolean |
isOverwriteRowWhenExpanding()
|
boolean |
isReadOnly()
|
boolean |
isRowHeightFixed()
|
boolean |
isSearchWindowVisible()
|
boolean |
isSingleExpandableRow()
|
boolean |
isVisible(int row,
int column)
|
boolean |
mergeCells(int[] rows,
int[] columns)
Set the cell span for the specified range of cells. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
nextPage(NavigatorBar navBar)
Method called when user click on "next page" button on the navigation bar: it does clear table model, reload next data block and select the first row of the block. |
java.awt.Component |
prepareEditor(javax.swing.table.TableCellEditor editor,
int row,
int column)
|
void |
prepareJTable()
Prepare a JTable for use with this model.
|
java.awt.Component |
prepareRenderer(javax.swing.table.TableCellRenderer renderer,
int row,
int column)
Prepares the renderer by querying the data model for the value and selection state of the cell at row , column .
|
void |
previousPage(NavigatorBar navBar)
Method called when user click on "previous page" button on the navigation bar: it does clear table model, reload previous data block and select the last row of the block. |
void |
refreshExpandableRenderer()
If expandableRenderer attribute is not null and there is an expanded row, then refresh it. |
void |
removeEditor()
|
boolean |
removeMergedCells(int[] rows,
int[] columns)
Remove the cell span for the specified range of cells. |
void |
removeQuickFilter(java.lang.String attributeName)
Remove filter from the specified column. |
void |
requestFocus()
|
void |
resetColumns(org.openswing.swing.table.profiles.java.GridProfile profile)
Method invoked by Grid.applyProfile to reset column visibility, position, width. |
int |
rowAtPoint(java.awt.Point point)
Method overrided to calculate row index according to the cell visibility (that is dependent from the cells span) |
int |
search(java.lang.String textToSearch)
Method invoked by SearchWindowManager when the specified "textToSeach" pattern has not matchings in the current content of binded control. |
void |
setActiveCellBackgroundColor(java.awt.Color activeCellBackgroundColor)
Set background color for the selected cell. |
void |
setColorsInReadOnlyMode(boolean colorsInReadOnlyMode)
Define if background and foreground colors must be setted according to GridController definition only in READONLY mode. |
void |
setOrderWithLoadData(boolean orderWithLoadData,
OrderPolicy orderPolicy)
Used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded). |
void |
setReorderingAllowed(boolean reorderingAllowed)
Set if it is allowed to reorder columns. |
void |
setResizingAllowed(boolean resizingAllowed)
Set if it is allowed to resize columns. |
void |
setRowHeightFixed(boolean rowHeightFixed)
|
void |
setSelectedIndex(int index)
Set the selected index. |
void |
setVisibleColumn(int columnModelIndex,
boolean colVisible)
Set (in)visibility state of the specified column. |
boolean |
stopCellEditing()
|
void |
updateColumnHeaderIcons()
Method invoked by FilterPanel to repaint icons in column headers, according to sorting/filtering conditions just applied. |
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
Called whenever the value of the selection changes. |
Methods inherited from class javax.swing.JTable |
addColumn, addColumnSelectionInterval, addRowSelectionInterval, clearSelection, columnAdded, columnRemoved, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnsFromModel, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, removeColumn, removeColumnSelectionInterval, removeNotify, removeRowSelectionInterval, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, isFocusTraversable, 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, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MAIN_GRID
public static final int TOP_GRID
public static final int BOTTOM_GRID
public boolean searchAdditionalRows
Constructor Detail |
public Grid(Grids grids, Column[] colProps, GridStatusPanel statusPanel, int fromColIndex, int toColIndex, boolean colorsInReadOnlyMode, VOListTableModel model, VOListAdapter modelAdapter, GridController gridController, boolean lockedGrid, boolean anchorLastColumn, int expandableColumn, boolean singleExpandableRow, boolean overwriteRowWhenExpanding, ExpandableRowController expandableRowController, java.util.HashMap comboFilters, int headerHeight, boolean searchAdditionalRows, boolean allowColumnsSortingInEdit, int gridType)
colProps
- TableModel column properties (name, type, etc.)statusPanel
- bottom panel included into the grid; used to view selected row numbersfromColIndex
- column index from which to start to add TableColumn (related to colProps list)toColIndex
- final column index of TableColumn objects to add (related to colProps list), index excludedcolorsInReadOnlyMode
- flag used to define if background and foreground colors must be setted according to GridController definition only in READONLY modemodel
- grid modelmodelAdapter
- grid model adaptergridController
- grid controllerlockedGrid
- locked grid (optional)anchorLastColumn
- define if last column must be anchored to the right marginexpandableColumn
- optional column index, related to column expandable, i.e. a cell that can contains an inner panelsingleExpandableRow
- flag used to define cell expansion policyoverwriteRowWhenExpanding
- flag used to define cell expansion policyexpandableRowController
- controller of cell expansion taskcomboFilters
- collection of combo filtersheaderHeight
- header heightgridType
- type of grid; possible values: Grid.MAIN_GRID, Grid.TOP_GRID, Grid.BOTTOM_GRIDMethod Detail |
public final void prepareJTable()
JTable
for use with this model.
This method creates the necessary columns in the JTable
and assigns
the appropriate cell renderers and editors (as provided by the attribute
adapter) for each column.
public boolean editCellAt(int row, int column, java.util.EventObject e)
public java.awt.Component prepareEditor(javax.swing.table.TableCellEditor editor, int row, int column)
public void removeEditor()
public final void previousPage(NavigatorBar navBar)
public final void nextPage(NavigatorBar navBar)
public final void internalSorting()
public final void setVisibleColumn(int columnModelIndex, boolean colVisible)
columnModelIndex
- column model indexcolVisible
- (in)visibility state for the specified columnpublic final VOListTableModel getVOListTableModel()
public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
toggle
and extend
. All changes
to the selection that are the result of keyboard or mouse events received
by the UI are channeled through this method so that the behavior may be
overridden by a subclass.
This implementation uses the following conventions:
toggle
: false, extend
: false.
Clear the previous selection and ensure the new cell is selected.
toggle
: false, extend
: true.
Extend the previous selection to include the specified cell.
toggle
: true, extend
: false.
If the specified cell is selected, deselect it. If it is not selected, select it.
toggle
: true, extend
: true.
Leave the selection state as it is, but move the anchor index to the specified location.
rowIndex
- affects the selection at row
columnIndex
- affects the selection at column
toggle
- see description aboveextend
- if true, extend the current selectionpublic final void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
e
- grid selection eventpublic void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
columnSelectionChanged
in interface javax.swing.event.TableColumnModelListener
e
- ListSelectionEventpublic final java.awt.Color getActiveCellBackgroundColor()
public final void setActiveCellBackgroundColor(java.awt.Color activeCellBackgroundColor)
activeCellBackgroundColor
- background color for the selected cellpublic final int getMode()
public final void setReorderingAllowed(boolean reorderingAllowed)
reorderingAllowed
- flag used to set columns reorderingpublic final void setResizingAllowed(boolean resizingAllowed)
public final void ensureRowIsVisible(int selRow)
selRow
- selected rowpublic final boolean isSearchWindowVisible()
true
if search window is currently visible, false
otherwisepublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void filter(Column colProps, java.lang.Object value1, java.lang.Object value2)
filter
in interface QuickFilterListener
colProps
- column propertiesvalue1
- value used in the filter column (as unique filtering value or as the miminum value in a range filtering)value2
- (optional) value used in the filter column (as the maximum value in a range filtering)public final void updateColumnHeaderIcons()
public void removeQuickFilter(java.lang.String attributeName)
attributeName
- attribute name that identifies the columnpublic final void addNotify()
public boolean isDataModified()
true
if TableModel is changed, false
otherwisepublic final boolean stopCellEditing()
true
if current editing cell is in valid state, false
otherwisepublic final void addPopupCommand(javax.swing.JMenuItem item)
item
- command to add in the grids.getPopup() menupublic int getColumnIndex(java.lang.String columnName)
columnName
- column name
public final void setRowHeightFixed(boolean rowHeightFixed)
rowHeightFixed
- define if row height can change for each row, according to image height included in a cell of grid; default value: true
public final boolean isRowHeightFixed()
true
public final void setOrderWithLoadData(boolean orderWithLoadData, OrderPolicy orderPolicy)
orderWithLoadData
- flag used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded)public final java.awt.event.MouseListener getSortingMouseListener()
public final void enableDrag(java.lang.String gridId)
gridId
- grid identifierpublic final void dragEnter(java.awt.dnd.DragSourceDragEvent event)
dragEnter
in interface java.awt.dnd.DragSourceListener
public final void dragExit(java.awt.dnd.DragSourceEvent event)
dragExit
in interface java.awt.dnd.DragSourceListener
public final void dragOver(java.awt.dnd.DragSourceDragEvent event)
dragOver
in interface java.awt.dnd.DragSourceListener
public final void dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
dropActionChanged
in interface java.awt.dnd.DragSourceListener
public final void dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
dragDropEnd
in interface java.awt.dnd.DragSourceListener
public final void dragEnter(java.awt.dnd.DropTargetDragEvent event)
dragEnter
in interface java.awt.dnd.DropTargetListener
public final void dragExit(java.awt.dnd.DropTargetEvent event)
dragExit
in interface java.awt.dnd.DropTargetListener
public final void dragOver(java.awt.dnd.DropTargetDragEvent event)
dragOver
in interface java.awt.dnd.DropTargetListener
public final void drop(java.awt.dnd.DropTargetDropEvent event)
drop
in interface java.awt.dnd.DropTargetListener
public final void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
dropActionChanged
in interface java.awt.dnd.DropTargetListener
public final void columnMoved(javax.swing.event.TableColumnModelEvent e)
columnMoved
in interface javax.swing.event.TableColumnModelListener
public final void columnMarginChanged(javax.swing.event.ChangeEvent e)
columnMarginChanged
in interface javax.swing.event.TableColumnModelListener
public final void setColorsInReadOnlyMode(boolean colorsInReadOnlyMode)
colorsInReadOnlyMode
- false
to enable background and foreground colors to be setted according to GridController definition in all grid modes; true
to enable background and foreground colors to be setted according to GridController definition only in READONLY modepublic final boolean isColorsInReadOnlyMode()
public final boolean hasColSpan()
public final boolean mergeCells(int[] rows, int[] columns)
rows
- row indexes that identify the cells to mergecolumns
- column indexes that identify the cells to merge
true
if merge operation is allowed, false
if the cells range is invalidpublic final boolean removeMergedCells(int[] rows, int[] columns)
rows
- row indexes that identify the cells to mergecolumns
- column indexes that identify the cells to merge
true
if merge operation is allowed, false
if the cells range is invalidpublic final boolean isVisible(int row, int column)
true
if the specified cell is visible (according to cells span settings), false
otherwisepublic final org.openswing.swing.table.client.Grid.Pair getSpan(int row, int column)
public final boolean hasCellSpan()
public java.awt.Rectangle getCellRect(int row, int column, boolean includeSpacing)
public final int rowAtPoint(java.awt.Point point)
public final int columnAtPoint(java.awt.Point point)
public void editingStopped(javax.swing.event.ChangeEvent e)
Application code will not use these methods explicitly, they are used internally by JTable.
editingStopped
in interface javax.swing.event.CellEditorListener
e
- the event receivedThis method has been overriden to restore focus in the just edited cell when its value is not valid.
public final void resetColumns(org.openswing.swing.table.profiles.java.GridProfile profile)
public final int getSelectedIndex()
getSelectedIndex
in interface SearchControl
public final void setSelectedIndex(int index)
setSelectedIndex
in interface SearchControl
public final int getRowCount()
getRowCount
in interface SearchControl
public final java.lang.String getValueAt(int index)
getValueAt
in interface SearchControl
public final javax.swing.JComponent getComponent()
getComponent
in interface SearchControl
public final boolean isReadOnly()
isReadOnly
in interface SearchControl
true
if the input control is in read only mode (so search is enabled), false
otherwisepublic final java.lang.String getExpandableColumnAttributeName()
public final boolean isSingleExpandableRow()
public final ExpandableRowController getExpandableRowController()
public final boolean isOverwriteRowWhenExpanding()
public final javax.swing.table.TableCellRenderer getCellRenderer(int row, int col)
row
- row numbercol
- column niumber in grid
public final void refreshExpandableRenderer()
public final void collapseRow(int row)
row
- row to collapsepublic final java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer, int row, int column)
row
, column
.
Returns the component (may be a Component
or a JComponent
) under the event location.
Note: Throughout the table package, the internal implementations always use this method to prepare renderers so that this default behavior can be safely overridden by a subclass.
renderer
- the TableCellRenderer
to preparerow
- the row of the cell to render, where 0 is the first rowcolumn
- the column of the cell to render,
where 0 is the first column
Component
under the event locationpublic final Grid getParentGrid()
public final boolean disableListener()
disableListener
in interface SearchControl
true
to disable key listening on input control (for instance, in case of nested grids), false
to listen for key eventspublic final int search(java.lang.String textToSearch)
search
in interface SearchControl
textToSearch
- patten of text to search
public final void requestFocus()
public Grids getGrids()
public void finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |