All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.actelion.research.gui.fx.FXTextField Maven / Gradle / Ivy

There is a newer version: 2024.11.2
Show newest version
package com.actelion.research.gui.fx;

import com.actelion.research.gui.generic.GenericTextField;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.control.TextInputControl;

public class FXTextField extends FXComponent implements GenericTextField {
	public FXTextField(int width, int height) {
		super(height == 1 ? new TextField() : new TextArea());
		((TextInputControl)getNode()).setPrefWidth(width);
		((TextInputControl)getNode()).setPrefHeight(height);
	}

	public String getText() {
		return ((TextInputControl)getNode()).getText();
	}

	public void setText(String text) {
		((TextInputControl)getNode()).setText(text);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy