javafx.scene.control.cell.TextFieldTreeTableCell Java Examples

The following examples show how to use javafx.scene.control.cell.TextFieldTreeTableCell. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditableDataTypeCellFactory.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public TreeTableCell<ModularFeatureListRow, Object> call(
    TreeTableColumn<ModularFeatureListRow, Object> param) {
  TextFieldTreeTableCell<ModularFeatureListRow, Object> cell = new TextFieldTreeTableCell<>();

  if (type instanceof StringParser) {
    cell.setConverter(((StringParser) type).getStringConverter());
    cell.setAlignment(Pos.CENTER);
    return cell;
  } else {
    logger.log(Level.SEVERE,
        "Class in editable CellFactory is no StringParser: " + type.getClass().toString());
    return null;
  }
}
 
Example #2
Source File: RFXTextFieldTreeTableCell.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public String _getValue() {
    TextFieldTreeTableCell<?, ?> cell = (TextFieldTreeTableCell<?, ?>) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}