A Potential Pitfall with the TextFormatter Class in JavaFX

Posted on Thu 07 April 2016 in JavaFX • Tagged with anchor, caret, cursor, eszett, Java, JavaFX, string conversion, text field, text formatter

A common use case for the TextFormatter class in JavaFX is a text field that should convert any lower-case character input into an upper-case character. This can be achieved easily by defining a filter for the text formatter as described here. A straightforward implementation could look like this:

private UnaryOperator …

Continue reading

The TextFormatter Class in JavaFX: How to Restrict User Input in a Text Field

Posted on Tue 05 April 2016 in JavaFX • Tagged with change listener, event, JavaFX, Richard Bair, text field, text formatter

There are a lot of code examples for restricting or modifying user input into a JavaFX text field. Most examples I have seen suggest adding a change listener to the text field's text property. Here's how you would allow only lower-case characters in your text field using the change listener …


Continue reading

Adding JavaFX Properties to a DTO

Posted on Mon 21 March 2016 in JavaFX • Tagged with annotations, DTO, FXForm2, JavaFX, JSR 303, UI, Wrapper

Now that I have understood what a DTO is good for, I'm thinking about ways to improve it. As they are right now, our DTOs are POJOs extended by JSR 303 annotations for defining constraints on their fields/methods. The annotations are duplicates of the annotations defined on the corresponding …


Continue reading

Zooming in the Fancy Chart Control

Posted on Thu 24 April 2014 in JavaFX • Tagged with fancy chart, Github, JavaFX, zoom

A new version of the fancy chart control is available at https://github.com/tesis-dynaware/fancy-chart

This version supports zooming for the XY chart: by dragging the mouse, you can select an area in the chart to scale the selected area up to full size of the chart. This allows …


Continue reading

Headless UI Testing with TestFX and JavaFX 8

Posted on Wed 23 April 2014 in JavaFX • Tagged with build, headless, JavaFX, JDK, Monocle, TestFX

JavaFX is a great UI toolkit. TestFX is a great library for testing the user interfaces written in JavaFX. Writing graphical tests with TestFX is simple and fast, but one challenge remains when you build your software using a headless build machine: how can you perform your UI tests in …


Continue reading

Enhanced Fancy Chart

Posted on Fri 21 March 2014 in JavaFX • Tagged with CSV, fancy chart, Github, HDF5, JavaFX, XLS

A new version of the fancy chart control is available at https://github.com/tesis-dynaware/fancy-chart

Data can now be imported and exported to CSV, XLS, and HDF5 files. A lot of code was refactored to make it easier to support other file formats in the future.


Source Code for the Fancy Chart Control

Posted on Fri 14 March 2014 in JavaFX • Tagged with animation, fancy, Github, JavaFX, TableView

Due to popular demand, I published the source code for the combined LineChart and TableView control mentioned in this post to Github. You can find the sources here:

https://github.com/tesis-dynaware/fancy-chart


A Combined LineChart and TableView Widget in JavaFX

Posted on Wed 19 February 2014 in JavaFX • Tagged with animation, characteristic, fancy chart, JavaFX, popup, TableView

Video of a combined LineChart and Table widget in JavaFX

(click to watch the video)

This video shows a widget for displaying three characteristics (velocity vs. distance) in a LineChart node and a tabbed TableView node. The two nodes provide different views on the same data.

The widget comes with the following features:

  • hovering over a data point in the …

Continue reading

A Widget Picker Control in JavaFX

Posted on Fri 07 February 2014 in JavaFX • Tagged with editor, grid, JavaFX, user interface, widget

The following video shows a custom control in JavaFX that lets you select items from a list and position them in a grid. The items represent UI widgets, that is, JavaFX controls, with a defined size on the grid. The grid represents a page on which these widgets will be …


Continue reading

A Graph Editor in JavaFX

Posted on Thu 06 February 2014 in JavaFX • Tagged with EMF, graph editor, JavaFX, user interface

Another thing we've been working on is going to see the light of day soon: a graph editor for JavaFX. The current beta version provides the following main features:

  • create draggable, resizable nodes and connections between them
  • add multiple input or output connectors to a node
  • create joints inside a …

Continue reading