Java Code Examples for javafx.scene.control.TextField#setVisible()

The following examples show how to use javafx.scene.control.TextField#setVisible() . 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: RTImagePlot.java    From phoebus with Eclipse Public License 1.0 5 votes vote down vote up
private TextField constructAxisLimitsField()
{
	final TextField field = new TextField();
	//prevent mouse-clicks in TextField from triggering MouseClicked event for RTPlot
	field.addEventFilter(MouseEvent.MOUSE_CLICKED, (event)->event.consume());
	field.focusedProperty().addListener((prop, oldval, newval)->
	{
		if (!newval) hideAxisLimitsField();
	});
	field.setVisible(false);
	field.setManaged(false); //false because we manage layout, not the Parent
	return field;
}
 
Example 2
Source File: RTPlot.java    From phoebus with Eclipse Public License 1.0 5 votes vote down vote up
private TextField constructAxisLimitsField()
{
	final TextField field = new TextField();
	//prevent mouse-clicks in TextField from triggering MouseClicked event for RTPlot
	field.addEventFilter(MouseEvent.MOUSE_CLICKED, (event)->event.consume());
	field.focusedProperty().addListener((prop, oldval, newval)->
	{
		if (!newval) hideAxisLimitsField();
	});
	field.setVisible(false);
	field.setManaged(false); //false because we manage layout, not the Parent
	return field;
}