Java 类javafx.util.StringConverter 实例源码

项目:Squid    文件:ExpressionManagerController.java   
private void initializeExpressionsSortFilterChoiceBox() {
    expressionSorterChoiceBox.setItems(FXCollections.observableArrayList(ExpressionSortOrder.values()));
    expressionSorterChoiceBox.getSelectionModel().select(expressionSortOrder);
    expressionSorterChoiceBox.setConverter(new StringConverter<ExpressionSortOrder>() {
        @Override
        public String toString(ExpressionSortOrder object) {
            return object.getDisplayName();
        }

        @Override
        public ExpressionSortOrder fromString(String string) {
            return null;
        }
    });
    expressionSorterChoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ExpressionSortOrder>() {
        @Override
        public void changed(ObservableValue observable, ExpressionSortOrder oldValue, ExpressionSortOrder newValue) {
            expressionSortOrder = newValue;
            populateExpressionsListView();
        }
    });
}
项目:hygene    文件:BasicSettingsViewController.java   
/**
 * Sets up the {@link ComboBox} listing all node color scheme choices.
 */
private void setUpNodeColorSchemeComboBox() {
    nodeColorScheme.setConverter(new StringConverter<Pair<String, ColorScheme>>() {
        @Override
        public String toString(final Pair<String, ColorScheme> object) {
            return object.getKey();
        }

        @Override
        public Pair<String, ColorScheme> fromString(final String string) {
            return NODE_COLOR_SCHEMES.stream()
                    .filter(pair -> pair.getKey().equals(string))
                    .collect(Collectors.toList()).get(0);
        }
    });
    nodeColorScheme.getItems().addAll(NODE_COLOR_SCHEMES);
    nodeColorScheme.getSelectionModel().selectFirst();
}
项目:waterrower-workout    文件:SpinnerFocusChangeListener.java   
private void commitEditorText(Spinner<T> spinner) {
    if (!spinner.isEditable()) return;
    try {
        String text = spinner.getEditor().getText();
        SpinnerValueFactory<T> valueFactory = spinner.getValueFactory();
        if (valueFactory != null) {
            StringConverter<T> converter = valueFactory.getConverter();
            if (converter != null) {
                T value = converter.fromString(text);
                if (value == null)
                    return;
                valueFactory.setValue(value);
            }
        }
    } catch (NumberFormatException e) {
        // Ignore text input.
        return;
    }
}
项目:wall-t    文件:ConfigurationView.java   
private void apiVersionLine( final GridPane parent ) {
    final Label lineLabel = new Label( "Api Version:" );
    parent.add( lineLabel, 0, 2 );

    final ComboBox<ApiVersion> apiVersionBox = new ComboBox<>( FXCollections.observableArrayList( ApiVersion.values( ) ) );
    apiVersionBox.converterProperty( ).setValue( new StringConverter<ApiVersion>( ) {
        @Override
        public String toString( final ApiVersion object ) {
            return object.getName( );
        }

        @Override
        public ApiVersion fromString( final String string ) {
            return ApiVersion.fromName( string );
        }
    } );
    apiVersionBox.getSelectionModel( ).select( _model.getApiVersion( ) );
    apiVersionBox.getSelectionModel( ).selectedItemProperty( ).addListener( ( o, oldValue, newValue ) -> _model.requestNewApiVersion( newValue ) );
    lineLabel.setLabelFor( apiVersionBox );
    parent.add( apiVersionBox, 1, 2 );
}
项目:uPMT    文件:NewProjectDialogController.java   
@Override
public void initialize(URL location, ResourceBundle resources) {
    // TODO Auto-generated method stub
    choixSchema.getItems().add(main.getDefaultSchema());
    for (Projet p : main.getProjects()) {
        choixSchema.getItems().add(p.getSchemaProjet());
    }
    // change the text to make it pretty
    choixSchema.setConverter(new StringConverter<Schema>() {

        @Override
        public String toString(Schema object) {
            // TODO Auto-generated method stub
            return object.getName();
        }

        @Override
        public Schema fromString(String string) {
            // TODO Auto-generated method stub
            return new Schema(string);
        }
    });
}
项目:CalendarFX    文件:PaperViewSkin.java   
private void createMarginFields() {
    NumericTextField topField = new NumericTextField();
    NumericTextField rightField = new NumericTextField();
    NumericTextField bottomField = new NumericTextField();
    NumericTextField leftField = new NumericTextField();

    StringConverter<Number> converter = new NumberStringConverter();

    leftField.textProperty().bindBidirectional(getSkinnable().leftMarginProperty(), converter);
    rightField.textProperty().bindBidirectional(getSkinnable().rightMarginProperty(), converter);
    topField.textProperty().bindBidirectional(getSkinnable().topMarginProperty(), converter);
    bottomField.textProperty().bindBidirectional(getSkinnable().bottomMarginProperty(), converter);

    marginsGridPane = new GridPane();
    marginsGridPane.getStyleClass().add("custom-fields");
    marginsGridPane.add(new Label(Messages.getString("MarginSelector.TOP")), 0, 0);
    marginsGridPane.add(topField, 1, 0);
    marginsGridPane.add(new Label(Messages.getString("MarginSelector.RIGHT")), 2, 0);
    marginsGridPane.add(rightField, 3, 0);
    marginsGridPane.add(new Label(Messages.getString("MarginSelector.BOTTOM")), 0, 1);
    marginsGridPane.add(bottomField, 1, 1);
    marginsGridPane.add(new Label(Messages.getString("MarginSelector.LEFT")), 2, 1);
    marginsGridPane.add(leftField, 3, 1);
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<Conviction> forConvictionConverter(Translator translator) {
    return new StringConverter<Conviction>() {
        @Override
        public String toString(Conviction object) {
            if (object == null) {
                return "";
            }

            return translator.getConvictionList().get(object.ordinal());
        }

        @Override
        public Conviction fromString(String string) {
            return Conviction.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<Race> forRaceConverter(Translator translator) {
    return new StringConverter<Race>() {
        @Override
        public String toString(Race object) {
            if (object == null) {
                return "";
            }

            return translator.getRaceList().get(object.ordinal());
        }

        @Override
        public Race fromString(String string) {
            return Race.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<Profession> forProfessionConverter(Translator translator) {
    return new StringConverter<Profession>() {
        @Override
        public String toString(Profession object) {
            if (object == null) {
                return "";
            }

            return translator.getProfessionList().get(object.ordinal());
        }

        @Override
        public Profession fromString(String string) {
            return Profession.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<DiceHelper.AdditionType> forAdditionType(Translator translator) {
    return new StringConverter<AdditionType>() {
        @Override
        public String toString(AdditionType object) {
            if (object == null) {
                return "";
            }

            return translator.getDiceAdditionProertyList().get(object.ordinal());
        }

        @Override
        public AdditionType fromString(String string) {
            return AdditionType.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<MeleWeapon.MeleWeaponType> forMeleWeaponType(
    Translator translator) {
    return new StringConverter<MeleWeaponType>() {
        @Override
        public String toString(MeleWeaponType object) {
            if (object == null) {
                return "";
            }

            return translator.getWeaponMeleTypeList().get(object.ordinal());
        }

        @Override
        public MeleWeaponType fromString(String string) {
            return MeleWeaponType.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<MeleWeapon.MeleWeaponClass> forMeleWeaponClass(
    Translator translator) {
    return new StringConverter<MeleWeaponClass>() {
        @Override
        public String toString(MeleWeaponClass object) {
            if (object == null) {
                return "";
            }

            return translator.getWeaponMeleClassList().get(object.ordinal());
        }

        @Override
        public MeleWeaponClass fromString(String string) {
            return MeleWeaponClass.valueOf(string);
        }
    };
}
项目:drd    文件:StringConvertors.java   
public static StringConverter<RangedWeapon.RangedWeaponType> forRangedWeaponType(
    Translator translator) {
    return new StringConverter<RangedWeaponType>() {
        @Override
        public String toString(RangedWeaponType object) {
            if (object == null) {
                return "";
            }

            return translator.getWeaponRangedTypeList().get(object.ordinal());
        }

        @Override
        public RangedWeaponType fromString(String string) {
            return RangedWeaponType.valueOf(string);
        }
    };
}
项目:ScrabbleGame    文件:NewGameController.java   
/**
 * Initializes the language ChoiceBox, retrieving all the available languages
 */
protected void initializeLanguageChoiceBox() {
    ResourceBundle i18nMessages = this.scrabble.getI18nMessages();
    List<LanguageInterface> availableLanguages = Arrays.asList(new French(), new English());

    this.languageChoiceBox.getItems().addAll(availableLanguages);
    this.languageChoiceBox.setValue(availableLanguages.get(0));
    this.languageChoiceBox.setConverter(new StringConverter<LanguageInterface>() {
        @Override
        public String toString(LanguageInterface object) {
            return i18nMessages.getString(object.getName());
        }

        @Override
        public LanguageInterface fromString(String string) {
            return null;
        }
    });
}
项目:Dr-Assistant    文件:EditTemplateController.java   
private void loadDrug() {
    drugs = drugGetway.allDrugs();
    comboBoxDrug.getItems().addAll(drugs);
    comboBoxDrug.setConverter(new StringConverter<Drug>() {
        @Override
        public String toString(Drug object) {
            return object.getName();
        }

        @Override
        public Drug fromString(String string) {
            return comboBoxDrug.getItems().stream().filter(ap -> ap.getName().equals(string)).findFirst().orElse(null);
        }
    });
    comboBoxDrug.getSelectionModel().selectFirst();
    comboBoxDrug.setOnKeyReleased((KeyEvent event) -> {
        drugs.forEach((drug) -> {
            if (String.valueOf(event.getText()).matches(Character.toString(drug.getName().charAt(0)))) {
                comboBoxDrug.setValue(drug);
            }
        });
    });
    comboBoxDrug.getSelectionModel().selectedItemProperty().addListener((ObservableValue<? extends Drug> observable, Drug oldValue, Drug newValue) -> {
        System.out.println("Selected drug id : " + newValue.getId() + " Name : " + newValue.getName());
    });
}
项目:Dr-Assistant    文件:NewPrescriptionController.java   
private void loadDrug() {
    drugs = drugGetway.allDrugs();
    comboBoxDrug.getItems().addAll(drugs);
    comboBoxDrug.setConverter(new StringConverter<Drug>() {
        @Override
        public String toString(Drug object) {
            return object.getName();
        }

        @Override
        public Drug fromString(String string) {
            return comboBoxDrug.getItems().stream().filter(ap -> ap.getName().equals(string)).findFirst().orElse(null);
        }
    });
    comboBoxDrug.getSelectionModel().selectFirst();
    comboBoxDrug.setOnKeyReleased((KeyEvent event) -> {
        drugs.forEach((drug) -> {
            if (String.valueOf(event.getText()).matches(Character.toString(drug.getName().charAt(0)))) {
                comboBoxDrug.setValue(drug);
            }
        });
    });
    comboBoxDrug.getSelectionModel().selectedItemProperty().addListener((ObservableValue<? extends Drug> observable, Drug oldValue, Drug newValue) -> {
        System.out.println("Selected drug id : " + newValue.getId() + " Name : " + newValue.getName());
    });
}
项目:ABC-List    文件:CheckBoxListCell.java   
public CheckBoxListCell(
        final Callback<T, ObservableValue<Boolean>> getSelectedProperty, 
        final BooleanProperty disableProperty,
        final StringConverter<T> converter
) {
    this.getStyleClass().add("check-box-list-cell");
    setSelectedStateCallback(getSelectedProperty);
    setConverter(converter);

    checkBox = new CheckBox();
    checkBox.disableProperty().bind(disableProperty);

    setAlignment(Pos.CENTER_LEFT);
    setContentDisplay(ContentDisplay.LEFT);

    // by default the graphic is null until the cell stops being empty
    setGraphic(null);
}
项目:ABC-List    文件:CellUtils.java   
static <T> void updateItem(final Cell<T> cell,
        final StringConverter<T> converter,
        final HBox hbox,
        final Node graphic,
        final ChoiceBox<T> choiceBox
) {
    if (cell.isEmpty()) {
        cell.setText(null);
        cell.setGraphic(null);
    } else if (cell.isEditing()) {
        if (choiceBox != null) {
            choiceBox.getSelectionModel().select(cell.getItem());
        }
        cell.setText(null);

        if (graphic != null) {
            hbox.getChildren().setAll(graphic, choiceBox);
            cell.setGraphic(hbox);
        } else {
            cell.setGraphic(choiceBox);
        }
    } else {
        cell.setText(getItemText(cell, converter));
        cell.setGraphic(graphic);
    }
}
项目:ABC-List    文件:CellUtils.java   
static <T> void updateItem(final Cell<T> cell,
        final StringConverter<T> converter,
        final HBox hbox,
        final Node graphic,
        final TextField textField
) {
    if (cell.isEmpty()) {
        cell.setText(null);
        cell.setGraphic(null);
    } else if (cell.isEditing()) {
        if (textField != null) {
            textField.setText(getItemText(cell, converter));
        }
        cell.setText(null);

        if (graphic != null) {
            hbox.getChildren().setAll(graphic, textField);
            cell.setGraphic(hbox);
        } else {
            cell.setGraphic(textField);
        }
    } else {
        cell.setText(getItemText(cell, converter));
        cell.setGraphic(graphic);
    }
}
项目:ABC-List    文件:CellUtils.java   
static <T> void startEdit(final Cell<T> cell,
        final StringConverter<T> converter,
        final HBox hbox,
        final Node graphic,
        final TextField textField
) {
    if (textField != null) {
        textField.setText(getItemText(cell, converter));
    }
    cell.setText(null);

    if (graphic != null) {
        hbox.getChildren().setAll(graphic, textField);
        cell.setGraphic(hbox);
    } else {
        cell.setGraphic(textField);
    }

    textField.selectAll();

    // requesting focus so that key input can immediately go into the
    // TextField (see RT-28132)
    textField.requestFocus();
}
项目:ABC-List    文件:CellUtils.java   
static <T> TextField createTextField(final Cell<T> cell, final StringConverter<T> converter) {
    final TextField textField = new TextField(getItemText(cell, converter));

    // Use onAction here rather than onKeyReleased (with check for Enter),
    // as otherwise we encounter RT-34685
    textField.setOnAction(event -> {
        if (converter == null) {
            throw new IllegalStateException(
                    "Attempting to convert text input into Object, but provided "
                    + "StringConverter is null. Be sure to set a StringConverter "
                    + "in your cell factory.");
        }
        cell.commitEdit(converter.fromString(textField.getText()));
        event.consume();
    });
    textField.setOnKeyReleased(t -> {
        if (t.getCode() == KeyCode.ESCAPE) {
            cell.cancelEdit();
            t.consume();
        }
    });
    return textField;
}
项目:ABC-List    文件:CellUtils.java   
static <T> void updateItem(final Cell<T> cell,
        final StringConverter<T> converter,
        final HBox hbox,
        final Node graphic,
        final ComboBox<T> comboBox
) {
    if (cell.isEmpty()) {
        cell.setText(null);
        cell.setGraphic(null);
    } else if (cell.isEditing()) {
        if (comboBox != null) {
            comboBox.getSelectionModel().select(cell.getItem());
        }
        cell.setText(null);

        if (graphic != null) {
            hbox.getChildren().setAll(graphic, comboBox);
            cell.setGraphic(hbox);
        } else {
            cell.setGraphic(comboBox);
        }
    } else {
        cell.setText(getItemText(cell, converter));
        cell.setGraphic(graphic);
    }
}
项目:stvs    文件:AdvancedCellUtils.java   
static <T> void startEdit(final Cell<T> cell,
                          final StringConverter<T> converter,
                          final HBox hbox,
                          final Node graphic,
                          final TextField textField) {
    if (textField != null) {
        textField.setText(getItemText(cell, converter));
    }
    cell.setText(null);

    if (graphic != null) {
        hbox.getChildren().setAll(graphic, textField);
        cell.setGraphic(hbox);
    } else {
        cell.setGraphic(textField);
    }

    textField.selectAll();

    // requesting focus so that key input can immediately go into the
    // TextField (see RT-28132)
    textField.requestFocus();
}
项目:stvs    文件:AdvancedCellUtils.java   
static <T> TextField createTextField(final Cell<T> cell, final StringConverter<T> converter) {
    final TextField textField = new TextField(getItemText(cell, converter));

    // Use onAction here rather than onKeyReleased (with check for Enter),
    // as otherwise we encounter RT-34685
    textField.setOnAction(event -> {
        if (converter == null) {
            throw new IllegalStateException(
                    "Attempting to convert text input into Object, but provided "
                            + "StringConverter is null. Be sure to set a StringConverter "
                            + "in your cell factory.");
        }
        cell.commitEdit(converter.fromString(textField.getText()));
        event.consume();
    });
    textField.setOnKeyReleased(t -> {
        if (t.getCode() == KeyCode.ESCAPE) {
            cell.cancelEdit();
            t.consume();
        }
    });
    return textField;
}
项目:fx-animation-editor    文件:TextFieldHelper.java   
public static <T> void bind(TextField textField, ObjectProperty<T> value, StringConverter<T> stringConverter, Runnable onCommit) {
    executeOnFocusLostOrEnter(textField, () -> {
        T oldValue = value.get();
        value.set(stringConverter.fromString(textField.getText()));
        textField.setText(stringConverter.toString(stringConverter.fromString(textField.getText())));
        textField.positionCaret(textField.getLength());
        if (onCommit != null && !Objects.equals(oldValue, value.get())) {
            onCommit.run();
        }
    });
    value.addListener((v, o, n) -> textField.setText(stringConverter.toString(n)));
    textField.setText(stringConverter.toString(value.get()));
}
项目:Suji    文件:KomiSpinnerFactory.java   
public KomiSpinnerFactory() {
    setValue(6.5);
    setConverter(new StringConverter<Double>() {
        @Override
        public String toString(Double object) {
            return object.toString();
        }

        @Override
        public Double fromString(String string) {
            return Double.parseDouble(string);
        }
    });
}
项目:Squid    文件:ExpressionManagerController.java   
private void initializeExpressionsChoiceFilterChoiceBox() {
    expressionChooserChoiceBox.setItems(FXCollections.observableArrayList(ExpressionChoiceFilter.values()));
    expressionChooserChoiceBox.getSelectionModel().select(expressionChoiceFilter);
    expressionChooserChoiceBox.setConverter(new StringConverter<ExpressionChoiceFilter>() {
        @Override
        public String toString(ExpressionChoiceFilter object) {
            return object.getDisplayName();
        }

        @Override
        public ExpressionChoiceFilter fromString(String string) {
            return null;
        }
    });
    expressionChooserChoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ExpressionChoiceFilter>() {
        @Override
        public void changed(ObservableValue observable, ExpressionChoiceFilter oldValue, ExpressionChoiceFilter newValue) {
            expressionChoiceFilter = newValue;
            populateExpressionsListView();
        }
    });
}
项目:marathonv5    文件:JavaFXElementPropertyAccessor.java   
@SuppressWarnings("unchecked") private String getChoiceBoxItemText(@SuppressWarnings("rawtypes") ChoiceBox choiceBox,
        int index) {
    @SuppressWarnings("rawtypes")
    StringConverter converter = choiceBox.getConverter();
    String text = null;
    if (converter == null) {
        text = choiceBox.getItems().get(index).toString();
    } else {
        text = converter.toString(choiceBox.getItems().get(index));
    }
    return stripHTMLTags(text);
}
项目:marathonv5    文件:JavaFXChoiceBoxTableCellElement.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxTableCell cell = (ChoiceBoxTableCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:JavaFXChoiceBoxTreeTableCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxTreeTableCell cell = (ChoiceBoxTreeTableCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:JavaFXChoiceBoxListCellElement.java   
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String _getValue() {
    ChoiceBoxListCell cell = (ChoiceBoxListCell) node;
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:JavaFXChoiceBoxTreeCellElement.java   
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String _getValue() {
    ChoiceBoxTreeCell cell = (ChoiceBoxTreeCell) getComponent();
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXChoiceBoxTableCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxTableCell cell = (ChoiceBoxTableCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXTextFieldListCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    TextFieldListCell<?> cell = (TextFieldListCell<?>) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXTextFieldTableCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    TextFieldTableCell<?, ?> cell = (TextFieldTableCell<?, ?>) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXChoiceBoxTreeTableCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxTreeTableCell cell = (ChoiceBoxTreeTableCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXTextFieldTreeCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    TextFieldTreeCell<?> cell = (TextFieldTreeCell<?>) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXChoiceBoxTreeCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxTreeCell cell = (ChoiceBoxTreeCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXChoiceBoxListCell.java   
@SuppressWarnings("unchecked") @Override public String _getValue() {
    @SuppressWarnings("rawtypes")
    ChoiceBoxListCell cell = (ChoiceBoxListCell) node;
    @SuppressWarnings("rawtypes")
    StringConverter converter = cell.getConverter();
    if (converter != null) {
        return converter.toString(cell.getItem());
    }
    return cell.getItem().toString();
}
项目:marathonv5    文件:RFXTextFieldTreeTableCell.java   
@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();
}