![JAR search and dependency download from the Maven repository](/logo.png)
jidefx.scene.control.editor.TextFieldEditor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jidefx-fields Show documentation
Show all versions of jidefx-fields Show documentation
JideFX Common Layer is a collection of several extend feature for JavaFX
The newest version!
/*
* @(#)TextFieldCellEditor.java 5/19/2013
*
* Copyright 2002 - 2013 JIDE Software Inc. All rights reserved.
*/
package jidefx.scene.control.editor;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.TextField;
/**
* An editor based on {@code TextField} for {@code String}.
*/
public class TextFieldEditor extends TextField implements Editor, LazyInitializeEditor {
@Override
public ObservableValue observableValue() {
return textProperty();
}
@Override
public void setValue(String newValue) {
setText(newValue);
}
@Override
public void initialize(Class clazz, EditorContext context) {
Object editable = context != null ? context.getProperties().get(EditorContext.PROPERTY_EDITABLE) : null;
if (editable instanceof Boolean) {
setEditable(((Boolean) editable));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy