public class CheckBoxTreeCellEditor
extends javax.swing.AbstractCellEditor
implements java.awt.event.ActionListener, javax.swing.tree.TreeCellEditor
CheckBoxTreeCellRenderer
,
Serialized FormConstructor and Description |
---|
CheckBoxTreeCellEditor(CheckBoxTreeCellRenderer renderer)
Creates an editor from a
CheckBoxTreeCellRenderer . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
cancelCellEditing() |
void |
forwardKeyEvent(java.awt.event.KeyEvent event) |
java.lang.Object |
getCellEditorValue() |
CheckBoxTreeCellRenderer |
getRenderer()
Gets the renderer wrapped by this editor.
|
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row) |
boolean |
isCellEditable(java.util.EventObject event)
This implementation returns false for mouse clicks on the label part of
the checkbox.
|
boolean |
stopCellEditing() |
java.lang.String |
toString() |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell
public CheckBoxTreeCellEditor(CheckBoxTreeCellRenderer renderer)
CheckBoxTreeCellRenderer
. Do not
reuse the same renderer instance passed in here as the tree renderer.renderer
- The renderer to wrap.public void forwardKeyEvent(java.awt.event.KeyEvent event)
public CheckBoxTreeCellRenderer getRenderer()
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row)
getTreeCellEditorComponent
in interface javax.swing.tree.TreeCellEditor
public boolean isCellEditable(java.util.EventObject event)
isCellEditable
in interface javax.swing.CellEditor
isCellEditable
in class javax.swing.AbstractCellEditor
public java.lang.Object getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public boolean stopCellEditing()
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.AbstractCellEditor
public void cancelCellEditing()
cancelCellEditing
in interface javax.swing.CellEditor
cancelCellEditing
in class javax.swing.AbstractCellEditor
public java.lang.String toString()
toString
in class java.lang.Object