EditorTextField tf = new EditorTextField(); tf.setFont(new Font("Monospaced", Font.PLAIN, 14)); EditorComboBox cb = new EditorComboBox(operators); cb.setFont(new Font("Monospaced", Font.PLAIN, 14)); nodeEditor = cb; leafEditor = tf;
nodeEditor.addCellEditorListener(l); leafEditor.addCellEditorListener(l);
currentEditor.cancelCellEditing();
return currentEditor.getCellEditorValue();
if (leaf) { currentEditor = leafEditor; leafEditor.setText(value.toString()); } else { currentEditor = nodeEditor; nodeEditor.setSelectedItem(((OpNode)value).getOperator()); } return (Component)currentEditor;
return currentEditor.isCellEditable(event);
nodeEditor.removeCellEditorListener(l); leafEditor.removeCellEditorListener(l);
return currentEditor.shouldSelectCell(event);
return currentEditor.stopCellEditing();