org.jdesktop.swingx
Class JXTree

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTree
                  extended by org.jdesktop.swingx.JXTree
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class JXTree
extends JTree

JXTree. PENDING: support filtering/sorting.

See Also:
Serialized Form

Nested Class Summary
 class JXTree.CellEditorRemover
          This class tracks changes in the keyboard focus state.
 class JXTree.DelegatingRenderer
           
protected static class JXTree.TreeAdapter
           
 class JXTree.TreeRolloverController<T extends JTree>
          listens to rollover properties.
 class JXTree.TreeSearchable
          A searchable targetting the visible rows of a JXTree.
 
Nested classes/interfaces inherited from class javax.swing.JTree
JTree.AccessibleJTree, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  CompoundHighlighter compoundHighlighter
           
protected  ComponentAdapter dataAdapter
           
protected  FilterPipeline filters
           
 
Fields inherited from class javax.swing.JTree
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
 
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
JXTree()
          Constructs a JXTree with a sample model.
JXTree(Hashtable value)
          Constructs a JXTree created from a Hashtable which does not display with root.
JXTree(Object[] value)
          Constructs a JXTree with each element of the specified array as the child of a new root node which is not displayed.
JXTree(TreeModel newModel)
          Constructs an instance of JXTree which displays the root node -- the tree is created using the specified data model.
JXTree(TreeNode root)
          Constructs a JXTree with the specified TreeNode as its root, which displays the root node.
JXTree(TreeNode root, boolean asksAllowsChildren)
          Constructs a JXTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner.
JXTree(Vector value)
          Constructs a JXTree with each element of the specified Vector as the child of a new root node which is not displayed.
 
Method Summary
 void addHighlighter(Highlighter highlighter)
          Adds a Highlighter.
 void collapseAll()
          Collapses all nodes in the tree table.
 String convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          Called by the renderers to convert the specified value to text.
protected  JXTree.TreeRolloverController createLinkController()
           
protected  RolloverProducer createRolloverProducer()
          creates and returns the RolloverProducer to use with this tree.
protected  void doFind()
           
 void expandAll()
          Expands all nodes in the tree table.
 TreeCellRenderer getCellRenderer()
          Returns the current TreeCellRenderer that is rendering each cell.
protected  ComponentAdapter getComponentAdapter()
           
protected  ComponentAdapter getComponentAdapter(int index)
          Convenience to access a configured ComponentAdapter.
 Highlighter[] getHighlighters()
          Returns the Highlighters used by this tree.
protected  JXTree.TreeRolloverController getLinkController()
           
 Searchable getSearchable()
           
 TreePath[] getSelectionPaths()
          overridden to always return a not-null array (following SwingX convention).
 int[] getSelectionRows()
          overridden to always return a not-null array (following SwingX convention).
protected  Method getValueConversionMethod(TreeModel model)
          Tries to find and return a method for Object --> to String conversion on the model by reflection.
 boolean isOverwriteRendererIcons()
           
 boolean isRolloverEnabled()
          returns the rolloverEnabled property.
 void removeHighlighter(Highlighter highlighter)
          Removes the given Highlighter.
 void removeNotify()
          Overridden to release the CellEditorRemover, if any.
 void setCellRenderer(TreeCellRenderer renderer)
          Sets the TreeCellRenderer that will be used to draw each cell.
 void setClosedIcon(Icon closedIcon)
          set the icon for a closed non-leaf node.
 void setCollapsedIcon(Icon collapsed)
          sets the icon for the handel of a collapsed node.
 void setExpandedIcon(Icon expanded)
          sets the icon for the handle of an expanded node.
 void setHighlighters(Highlighter... highlighters)
          Sets the Highlighters to the table, replacing any old settings.
 void setLeafIcon(Icon leafIcon)
          set the icon for a leaf node.
 void setModel(TreeModel newModel)
          Sets the TreeModel that will provide the data.
 void setOpenIcon(Icon openIcon)
          set the icon for a open non-leaf node.
 void setOverwriteRendererIcons(boolean overwrite)
          Property to control whether per-tree icons should be copied to the renderer on setCellRenderer.
 void setRolloverEnabled(boolean rolloverEnabled)
          Property to enable/disable rollover support.
 void setSearchable(Searchable searchable)
          sets the Searchable for this editor.
 void startEditingAtPath(TreePath path)
          Overridden to terminate edits on focusLost.
 
Methods inherited from class javax.swing.JTree
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setDragEnabled, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, stopEditing, treeDidChange, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filters

protected FilterPipeline filters

compoundHighlighter

protected CompoundHighlighter compoundHighlighter

dataAdapter

protected ComponentAdapter dataAdapter
Constructor Detail

JXTree

public JXTree()
Constructs a JXTree with a sample model. The default model used by this tree defines a leaf node as any node without children.


JXTree

public JXTree(Object[] value)
Constructs a JXTree with each element of the specified array as the child of a new root node which is not displayed. By default, this tree defines a leaf node as any node without children. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
value - an array of objects that are children of the root.

JXTree

public JXTree(Vector value)
Constructs a JXTree with each element of the specified Vector as the child of a new root node which is not displayed. By default, this tree defines a leaf node as any node without children. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
value - an Vector of objects that are children of the root.

JXTree

public JXTree(Hashtable value)
Constructs a JXTree created from a Hashtable which does not display with root. Each value-half of the key/value pairs in the HashTable becomes a child of the new root node. By default, the tree defines a leaf node as any node without children. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
value - a Hashtable containing objects that are children of the root.

JXTree

public JXTree(TreeNode root)
Constructs a JXTree with the specified TreeNode as its root, which displays the root node. By default, the tree defines a leaf node as any node without children. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
root - root node of this tree

JXTree

public JXTree(TreeNode root,
              boolean asksAllowsChildren)
Constructs a JXTree with the specified TreeNode as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
root - root node of this tree
asksAllowsChildren - if true, only nodes that do not allow children are leaf nodes; otherwise, any node without children is a leaf node;
See Also:
DefaultTreeModel.asksAllowsChildren

JXTree

public JXTree(TreeModel newModel)
Constructs an instance of JXTree which displays the root node -- the tree is created using the specified data model. This version of the constructor simply invokes the super class version with the same arguments.

Parameters:
newModel - the TreeModel to use as the data model
Method Detail

setModel

public void setModel(TreeModel newModel)
Description copied from class: javax.swing.JTree
Sets the TreeModel that will provide the data.

Overrides:
setModel in class JTree
Parameters:
newModel - the TreeModel that is to provide the data

getValueConversionMethod

protected Method getValueConversionMethod(TreeModel model)
Tries to find and return a method for Object --> to String conversion on the model by reflection. Looks for a signature:
 
   String convertValueToText(Object);
  
PENDING JW: check - does this work with restricted permissions? JW: widened access for testing - do test!

Parameters:
model - the model to detect the method
Returns:
the Method or null if the model has no method with the expected signature

convertValueToText

public String convertValueToText(Object value,
                                 boolean selected,
                                 boolean expanded,
                                 boolean leaf,
                                 int row,
                                 boolean hasFocus)
Description copied from class: javax.swing.JTree
Called by the renderers to convert the specified value to text. This implementation returns value.toString, ignoring all other arguments. To control the conversion, subclass this method and use any of the arguments you need.

Overrides:
convertValueToText in class JTree
Parameters:
value - the Object to convert to text
selected - true if the node is selected
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - an integer specifying the node's display row, where 0 is the first row in the display
hasFocus - true if the node has the focus
Returns:
the String representation of the node's value

doFind

protected void doFind()

getSearchable

public Searchable getSearchable()
Returns:
a not-null Searchable for this editor.

setSearchable

public void setSearchable(Searchable searchable)
sets the Searchable for this editor. If null, a default searchable will be used.

Parameters:
searchable -

collapseAll

public void collapseAll()
Collapses all nodes in the tree table.


expandAll

public void expandAll()
Expands all nodes in the tree table.


getSelectionRows

public int[] getSelectionRows()
overridden to always return a not-null array (following SwingX convention).

Overrides:
getSelectionRows in class JTree
Returns:
an array of integers that identifies all currently selected rows where 0 is the first row in the display

getSelectionPaths

public TreePath[] getSelectionPaths()
overridden to always return a not-null array (following SwingX convention).

Overrides:
getSelectionPaths in class JTree
Returns:
an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected

setHighlighters

public void setHighlighters(Highlighter... highlighters)
Sets the Highlighters to the table, replacing any old settings. None of the given Highlighters must be null.

Note: the implementation is lenient with a single null highighter to ease the api change from previous versions. PENDING: property change?

Parameters:
highlighters - zero or more not null highlighters to use for renderer decoration.
See Also:
getHighlighters(), addHighlighter(Highlighter), removeHighlighter(Highlighter)

getHighlighters

public Highlighter[] getHighlighters()
Returns the Highlighters used by this tree. Maybe empty, but guarantees to be never null.

Returns:
the Highlighters used by this tree, guaranteed to never null.
See Also:
setHighlighters(Highlighter[])

addHighlighter

public void addHighlighter(Highlighter highlighter)
Adds a Highlighter. Appends to the end of the list of used Highlighters.

Parameters:
highlighter - the Highlighter to add.
Throws:
NullPointerException - if Highlighter is null.
See Also:
removeHighlighter(Highlighter), setHighlighters(Highlighter[])

removeHighlighter

public void removeHighlighter(Highlighter highlighter)
Removes the given Highlighter.

Does nothing if the Highlighter is not contained.

Parameters:
highlighter - the Highlighter to remove.
See Also:
addHighlighter(Highlighter), #setHighlighters(Highlighter..)

setRolloverEnabled

public void setRolloverEnabled(boolean rolloverEnabled)
Property to enable/disable rollover support. This can be enabled to show "live" rollover behaviour, f.i. the cursor over LinkModel cells. Default is disabled.

Parameters:
rolloverEnabled -

getLinkController

protected JXTree.TreeRolloverController getLinkController()

createLinkController

protected JXTree.TreeRolloverController createLinkController()

createRolloverProducer

protected RolloverProducer createRolloverProducer()
creates and returns the RolloverProducer to use with this tree. A "hit" for rollover is covering the total width of the tree. Additionally, a pressed to the right (but outside of the label bounds) is re-dispatched as a pressed just inside the label bounds. This is a first go for #166-swingx.

Returns:
RolloverProducer to use with this tree

isRolloverEnabled

public boolean isRolloverEnabled()
returns the rolloverEnabled property. TODO: Why doesn't this just return rolloverEnabled???

Returns:
if rollober is enabled.

getCellRenderer

public TreeCellRenderer getCellRenderer()
Description copied from class: javax.swing.JTree
Returns the current TreeCellRenderer that is rendering each cell.

Overrides:
getCellRenderer in class JTree
Returns:
the TreeCellRenderer that is rendering each cell

setCellRenderer

public void setCellRenderer(TreeCellRenderer renderer)
Description copied from class: javax.swing.JTree
Sets the TreeCellRenderer that will be used to draw each cell.

Overrides:
setCellRenderer in class JTree
Parameters:
renderer - the TreeCellRenderer that is to render each cell

setExpandedIcon

public void setExpandedIcon(Icon expanded)
sets the icon for the handle of an expanded node. Note: this will only succeed if the current ui delegate is a BasicTreeUI otherwise it will do nothing.

Parameters:
expanded -

setCollapsedIcon

public void setCollapsedIcon(Icon collapsed)
sets the icon for the handel of a collapsed node. Note: this will only succeed if the current ui delegate is a BasicTreeUI otherwise it will do nothing.

Parameters:
collapsed -

setLeafIcon

public void setLeafIcon(Icon leafIcon)
set the icon for a leaf node. Note: this will only succeed if current renderer is a DefaultTreeCellRenderer.

Parameters:
leafIcon -

setOpenIcon

public void setOpenIcon(Icon openIcon)
set the icon for a open non-leaf node. Note: this will only succeed if current renderer is a DefaultTreeCellRenderer.

Parameters:
openIcon -

setClosedIcon

public void setClosedIcon(Icon closedIcon)
set the icon for a closed non-leaf node. Note: this will only succeed if current renderer is a DefaultTreeCellRenderer.

Parameters:
closedIcon -

setOverwriteRendererIcons

public void setOverwriteRendererIcons(boolean overwrite)
Property to control whether per-tree icons should be copied to the renderer on setCellRenderer. the default is false for backward compatibility. PENDING: should update the current renderer's icons when setting to true?

Parameters:
overwrite -

isOverwriteRendererIcons

public boolean isOverwriteRendererIcons()

startEditingAtPath

public void startEditingAtPath(TreePath path)
Overridden to terminate edits on focusLost. This method updates the internal CellEditorRemover.

Overrides:
startEditingAtPath in class JTree
Parameters:
path - the TreePath identifying a node
See Also:
updateEditorRemover()

removeNotify

public void removeNotify()
Overridden to release the CellEditorRemover, if any.

Overrides:
removeNotify in class JComponent
See Also:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

getComponentAdapter

protected ComponentAdapter getComponentAdapter()
Returns:
the unconfigured ComponentAdapter.

getComponentAdapter

protected ComponentAdapter getComponentAdapter(int index)
Convenience to access a configured ComponentAdapter. Note: the column index of the configured adapter is always 0.

Parameters:
index - the row index in view coordinates, must be valid.
Returns:
the configured ComponentAdapter.