Affichage des articles dont le libellé est UI Component. Afficher tous les articles
Affichage des articles dont le libellé est UI Component. Afficher tous les articles

lundi 18 juin 2012

JavaFX 2.x custom component compatible with FXML


In November, last year, I wrote a little example on how to extend an existing component in JavaFx 2.0.
Today, I would use this component in FXML and make a little demo.
The application for the demo is very simple:
  • One SearchTextBox component (custom component) with events on OnCrossButtonMouseClicked and OnSearchEvent.
  • One ComboBox to change the font size of the SearchTextBox component.

jeudi 17 novembre 2011

Extend an existing UI component in JavaFX 2.0


Last year, I coded a custom component on JavaFX 1.x, then naturally I wished to rewrite it on JavaFX 2.0.
To do this, i tried different solutions,  like creating to a totally new component with this method
But, it isn't a great solution when you want to customize or to enhance an existing component, like I want to do.
To rewrite my custom component, I chose to extend an existing control (TextField in my case) and its skin, because you cannot add content directly in the control but you can do that in its skin.