com.jidesoft.grid
Class NavigableTable
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.jidesoft.grid.JideTable
com.jidesoft.grid.ContextSensitiveTable
com.jidesoft.grid.NavigableTable
- All Implemented Interfaces:
- IndexChangeListener, TableAdapter, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable
- Direct Known Subclasses:
- CellStyleTable
public class NavigableTable
- extends ContextSensitiveTable
An extension to JTable
which can programmatically avoid navigation on certain cells.
- Author:
- Marco De Angelis
- See Also:
NavigableModel
,
Serialized Form
Fields inherited from class com.jidesoft.grid.JideTable |
_batchProcessing, _cellChangeEvent, _clickCountToStart, _columnAutoResizer, _columnResizer, _headerDraggingMouseMotionListener, _rolloverCellEditor, _rolloverCellEditorListener, _rolloverColumn, _rolloverEditorComp, _rolloverEditorRemover, _rolloverRow, _rowHeights, _rowResizer, ACTION_NAME_CANCEL_EDITING, AUTO_RESIZE_ALL_COLUMNS_FILL, AUTO_RESIZE_FILL, AUTO_RESIZE_LAST_COLUMN_FILL, AUTO_RESIZE_NEXT_COLUMN_FILL, AUTO_RESIZE_SUBSEQUENT_COLUMNS_FILL, CLIENT_PROPERTY_LAZY_CALCULATE_ROW_HEIGHT, EDITOR_AUTO_COMPLETION_MODE_COLUMN, EDITOR_AUTO_COMPLETION_MODE_NONE, EDITOR_AUTO_COMPLETION_MODE_ROW, EDITOR_AUTO_COMPLETION_MODE_TABLE, PROPERTY_CLEAR_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_EDITOR_AUTO_COMPLETION_MODE, PROPERTY_FILLS_BOTTOM, PROPERTY_FILLS_GRIDS, PROPERTY_FILLS_RIGHT, PROPERTY_LOAD_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_NON_CONTIGUOUS_CELL_SELECTION, PROPERTY_ROW_AUTO_RESIZES, PROPERTY_SCROLL_ROW_WHEN_ROW_HEIGHT_CHANGES, PROPERTY_TABLE_SELECTION_MODEL, ROW_AUTO_RESIZES_PROPERTY |
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 |
Method Summary |
void |
changeSelection(int row,
int column,
boolean toggle,
boolean expand)
Override the default implementation to adjust the selection avoiding the non-navigable cells. |
protected int[] |
findNearestNavigableCellInColumn(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the nearest navigable cell from the specified cell that is in the same column. |
protected int[] |
findNearestNavigableCellInRow(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the nearest navigable cell from the specified cell that is in the same row. |
protected int[] |
findNextNavigableCell(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the next navigable cell from the specified cell. |
protected int[] |
findNextNavigableCellInColumn(int row,
int column,
int rowCount)
Finds the next navigable row in the same column. |
protected int[] |
findNextNavigableCellInRow(int row,
int column,
int columnCount)
Finds the next navigable cell in the same row. |
protected int[] |
findNextNavigableCellVertically(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the next navigable cell from the specified cell vertically. |
protected int[] |
findPreviousNavigableCell(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the previous navigable cell from the specified cell. |
protected int[] |
findPreviousNavigableCellInColumn(int row,
int column)
Finds the previous navigable row in the same column. |
protected int[] |
findPreviousNavigableCellInRow(int row,
int column)
Finds the previous navigable cell in the same row. |
protected int[] |
findPreviousNavigableCellVertically(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
Finds the previous navigable cell from the specified cell vertically. |
TableModel |
getNavigableModel()
|
TableModel |
getNextNavigableModel(TableModel model)
Gets the next style model of the specified model. |
boolean |
isCellNavigable(int row,
int column)
Checks if the cell is navigable. |
protected boolean |
isNavigationKey(KeyStroke ks)
Checks if the key stroke and the input event will respect the NavigableModel. |
boolean |
processKeyBinding(KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
|
Methods inherited from class com.jidesoft.grid.ContextSensitiveTable |
convertElementToString, createDefaultTransferHandler, getCellClassAt, getCellEditor, getCellEditorFromManager, getCellRenderer, getCellRendererFromManager, getConverterContextAt, getDefaultCellRenderer, getEditorContextAt, invalidateCellRendererCache, isCellEditorManagerEnabled, isCellRendererManagerEnabled, prepareEditor, setCellEditorManagerEnabled, setCellRendererManagerEnabled, setDefaultCellRenderer, updateUI |
Methods inherited from class com.jidesoft.grid.JideTable |
addCellEditorListener, addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, addRowValidator, addUndo, addUndoableEditListener, addValidator, adjustSelectionWhenColumnMoved, alwaysCalculateCellRect, calculateAutoResizedRowHeights, calculateAutoResizedRowHeights, calculateRowHeight, clearSelection, clearSelectionPermanently, columnSelectionChanged, configureEnclosingScrollPaneExplicitly, convertRowIndexToModel, convertRowIndexToView, createCellAutoCompletion, createDefaultColumnsFromModel, createDefaultSelectionModel, createDefaultTableHeader, createDefaultTableSelectionModel, createRowAutoScrollingListener, createRowHeights, createSortHeaderRenderer, editCellAt, editingCanceled, editingStopped, fireEditingCanceled, fireEditingStarted, fireEditingStarting, fireEditingStopped, fireEditingStopping, getActualUIClassID, getCellEditorListeners, getCellRect, getClickCountToStart, getDefaultRenderer, getDirtyRegion, getEditorAutoCompletionMode, getEditorAutoCompletionMode, getEditorCellRect, getGridColor, getGridColorProvider, getRolloverCellEditor, getRolloverColumn, getRolloverRow, getRowHeight, getRowHeights, getRowValidator, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getTableColumnWidthKeeper, getTableHeaderToolTipText, getTableHeaderToolTipText, getTableSelectionModel, getTextComponentForEditorComponent, getToolTipText, getUndoManager, getValidator, getValueAt, getVerticalGridColor, indexChanged, initTable, isAdjustEditorLocationOnModelChanged, isAlwaysRequestFocusForEditor, isAutoResizeFillMode, isAutoSelectTextWhenStartsEditing, isAutoStartCellEditing, isAutoStartCellEditingKey, isBatchProcessing, isCalculateRowHeightsOnWidthChange, isCellContentVisible, isCellFocused, isCellSelected, isClearPropertyAtStructureChange, isClearSelectionOnTableDataChanges, isColumnAutoResizable, isColumnResizable, isColumnSelected, isEnableIgnored, isFillBottom, isFillGrids, isFillRight, isFillsBottom, isFillsGrids, isFillsGridsBottom, isFillsGridsRight, isFillsRight, isKeepRowHeights, isLoadSelectionOnTableDataChanged, isNestedTableHeader, isNonContiguousCellSelection, isRollover, isRowAutoResizes, isRowHeightChanged, isRowResizable, isRowSelected, isScrollRowWhenRowHeightChanges, isSelectInsertedRows, isTablePrinting, isValidCellEditingKey, isVariousRowHeights, loadTableRowSettings, paintCellOverlay, paintCellUnderlay, paintFillHeader, prepareRenderer, releaseRendererComponent, removeCellEditorListener, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRolloverEditor, removeRowSelectionInterval, removeRowValidator, removeUndoableEditListener, removeValidator, resetTransferHandler, rolloverCellAt, rowAtPoint, saveTableRowSettings, scrollRowToVisible, selectAll, setAdjustEditorLocationOnModelChanged, setAlwaysRequestFocusForEditor, setAutoResizeMode, setAutoSelectTextWhenStartsEditing, setAutoStartCellEditing, setBatchProcessing, setCalculateRowHeightsOnWidthChange, setCellContentVisible, setClearPropertyAtStructureChange, setClearSelectionOnTableDataChanges, setClickCountToStart, setColumnAutoResizable, setColumnResizable, setColumnSelectionAllowed, setColumnSelectionInterval, setEditorAutoCompletionMode, setEnabled, setEnableIgnored, setFillBottom, setFillGrids, setFillRight, setFillsBottom, setFillsGrids, setFillsRight, setGridColorProvider, setKeepRowHeights, setLoadSelectionOnTableDataChanged, setModel, setNestedTableHeader, setNonContiguousCellSelection, setPreferredSize, setRowAutoResizes, setRowHeight, setRowHeight, setRowHeights, setRowResizable, setRowSelectionAllowed, setRowSelectionInterval, setScrollRowWhenRowHeightChanges, setSelectInsertedRows, setSortTableHeaderRenderer, setTableColumnWidthKeeper, setTableHeader, setTablePrinting, setTableSelectionModel, setVariousRowHeights, shouldCellBePaintedAsFocused, shouldCellBePaintedAsSelected, startCellEditing, tableChanged, validate, validateRow, valueChanged |
Methods inherited from class javax.swing.JTable |
columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createScrollPaneForTable, doLayout, editCellAt, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, initializeLocalVars, isCellEditable, isEditing, moveColumn, paramString, print, print, print, print, print, resizeAndRepaint, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setCellEditor, setCellSelectionEnabled, setColumnModel, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowMargin, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane |
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, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, 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, processMouseWheelEvent, 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 |
NavigableTable
public NavigableTable()
NavigableTable
public NavigableTable(int numRows,
int numColumns)
NavigableTable
public NavigableTable(TableModel dm)
NavigableTable
public NavigableTable(Object[][] rowData,
Object[] columnNames)
NavigableTable
public NavigableTable(Vector<?> rowData,
Vector<?> columnNames)
NavigableTable
public NavigableTable(TableModel dm,
TableColumnModel cm)
NavigableTable
public NavigableTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
getNavigableModel
public TableModel getNavigableModel()
getNextNavigableModel
public TableModel getNextNavigableModel(TableModel model)
- Gets the next style model of the specified model. If the model is not an instance of TableModelWrapper, null will
be returned as there is no next style model after it. If it is a TableModelWrapper, it will try to find the first
inner model that is a style model. If there is a style model, it will return it. Otherwise, null will be
returned.
- Parameters:
model
- the model.
- Returns:
- the next style model. The return value may or may not be an instance of StyleModel.
isCellNavigable
public boolean isCellNavigable(int row,
int column)
- Checks if the cell is navigable. If there are table model wrappers, it will find the first navigable model that
isNavigationOn is true and isNavigableAt is false.
- Parameters:
row
- the row index.column
- the column index.
- Returns:
- true or false.
isNavigationKey
protected boolean isNavigationKey(KeyStroke ks)
- Checks if the key stroke and the input event will respect the NavigableModel. By default, this method always
return true, meaning no matter what navigation key is press or mouse is pressed, the non-navigable cells will be
not selected. You can override it to customize the behavior.
For example, if you want the mouse click to select the cell even though cell is not navigable in the model, you
can do
return ks != null;
It works because if the ks is null, it means the selection change is not triggered by a key stroke. In fact, it
could be either by a mouse click or by code using Java API.
- Parameters:
ks
- the key stroke if any. If KeyStroke is null, it means the selection is changed not because of a key.
- Returns:
- true or false.
processKeyBinding
public boolean processKeyBinding(KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
- Overrides:
processKeyBinding
in class JideTable
changeSelection
public void changeSelection(int row,
int column,
boolean toggle,
boolean expand)
- Override the default implementation to adjust the selection avoiding the non-navigable cells. This implementation
works for keyboard events only, assuming the direction from the previous anchor selection. Mouse events on
non-navigable cells are blocked in the mouse input listener.
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.
- Specified by:
changeSelection
in interface TableAdapter
- Overrides:
changeSelection
in class JideTable
- Parameters:
row
- Affects the selection at row
column
- Affects the selection at column
toggle
- See description aboveexpand
- If true, extend the current selection
findNextNavigableCell
protected int[] findNextNavigableCell(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the next navigable cell from the specified cell.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the next navigable cell. Null if nothing is found.
findNextNavigableCellVertically
protected int[] findNextNavigableCellVertically(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the next navigable cell from the specified cell vertically.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the next navigable cell. Null if nothing is found.
findPreviousNavigableCell
protected int[] findPreviousNavigableCell(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the previous navigable cell from the specified cell.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the previous navigable cell. Null if nothing is found.
findPreviousNavigableCellVertically
protected int[] findPreviousNavigableCellVertically(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the previous navigable cell from the specified cell vertically.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the previous navigable cell. Null if nothing is found.
findNextNavigableCellInRow
protected int[] findNextNavigableCellInRow(int row,
int column,
int columnCount)
- Finds the next navigable cell in the same row.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcolumnCount
- the column count
- Returns:
- the next navigable cell in the same row. Null if nothing is found.
findPreviousNavigableCellInRow
protected int[] findPreviousNavigableCellInRow(int row,
int column)
- Finds the previous navigable cell in the same row.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cell
- Returns:
- the previous navigable cell in the same row. Null if nothing is found.
findNextNavigableCellInColumn
protected int[] findNextNavigableCellInColumn(int row,
int column,
int rowCount)
- Finds the next navigable row in the same column.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellrowCount
- the row count.
- Returns:
- the next navigable row in the same column. Null if nothing is found.
findPreviousNavigableCellInColumn
protected int[] findPreviousNavigableCellInColumn(int row,
int column)
- Finds the previous navigable row in the same column.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cell
- Returns:
- the previous navigable row in the same column. Null if nothing is found.
findNearestNavigableCellInRow
protected int[] findNearestNavigableCellInRow(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the nearest navigable cell from the specified cell that is in the same row.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the previous navigable cell. Null if nothing is found.
findNearestNavigableCellInColumn
protected int[] findNearestNavigableCellInColumn(int row,
int column,
int currentRow,
int currentColumn,
int rowCount,
int columnCount)
- Finds the nearest navigable cell from the specified cell that is in the same column.
- Parameters:
row
- row index of the specified cellcolumn
- column index of the specified cellcurrentRow
- current row indexcurrentColumn
- current column indexrowCount
- row countcolumnCount
- column count
- Returns:
- the previous navigable cell. Null if nothing is found.