@Override public void startEdit() { if (isEditable() && checkGroupedColumn()) { super.startEdit(); if (editorNode == null) { createEditorNode(); } else { // set current value if the editor is already created builder.setValue(getValue()); } builder.startEdit(); setGraphic(editorNode); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); } }
@Override public void updateItem(T item, boolean empty) { super.updateItem(item, empty); if (empty) { setText(null); setGraphic(null); } else { if (isEditing() && checkGroupedColumn()) { if (editorNode != null) { builder.setValue(getValue()); } setGraphic(editorNode); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); builder.updateItem(item, empty); } else { Object value = getValue(); if (value instanceof Node) { setGraphic((Node) value); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); } else { setText(value.toString()); setContentDisplay(ContentDisplay.TEXT_ONLY); } } } }
@Override public void startEdit() { if (isEditable() && checkGroupedColumn()) { super.startEdit(); if (editorNode == null) { createEditorNode(); } else { // set current value if the editor is already created builder.setValue(getValue()); } builder.startEdit(); setGraphic(editorNode); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); } }
@Override public void updateItem(T item, boolean empty) { super.updateItem(item, empty); if (empty) { setText(null); setGraphic(null); } else { if (isEditing() && checkGroupedColumn()) { if (editorNode != null) { builder.setValue(getValue()); } setGraphic(editorNode); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); builder.updateItem(item, empty); } else { Object value = getValue(); if (value instanceof Node) { setGraphic((Node) value); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); } else { setText(value.toString()); setContentDisplay(ContentDisplay.TEXT_ONLY); } } } }