Search in sources :

Example 1 with DefaultTreeCellEditor

use of javax.swing.tree.DefaultTreeCellEditor in project jdk8u_jdk by JetBrains.

the class SynthTreeUI method createDefaultCellEditor.

/**
     * {@inheritDoc}
     */
@Override
protected TreeCellEditor createDefaultCellEditor() {
    TreeCellRenderer renderer = tree.getCellRenderer();
    DefaultTreeCellEditor editor;
    if (renderer != null && (renderer instanceof DefaultTreeCellRenderer)) {
        editor = new SynthTreeCellEditor(tree, (DefaultTreeCellRenderer) renderer);
    } else {
        editor = new SynthTreeCellEditor(tree, null);
    }
    return editor;
}
Also used : TreeCellRenderer(javax.swing.tree.TreeCellRenderer) DefaultTreeCellRenderer(javax.swing.tree.DefaultTreeCellRenderer) DefaultTreeCellEditor(javax.swing.tree.DefaultTreeCellEditor) DefaultTreeCellRenderer(javax.swing.tree.DefaultTreeCellRenderer)

Aggregations

DefaultTreeCellEditor (javax.swing.tree.DefaultTreeCellEditor)1 DefaultTreeCellRenderer (javax.swing.tree.DefaultTreeCellRenderer)1 TreeCellRenderer (javax.swing.tree.TreeCellRenderer)1