Writing Custom UI Controls
greg.x.brown at oracle.com
Mon Jul 16 06:22:17 PDT 2012
For small, self-contained controls like a search field or breadcrumb, option #1 is probably best (though I'm not sure if it is considered "public" yet - someone else may want to comment on that). For more complex controls that aggregate other controls (such as a ribbon), I'd suggest #2. I'd also highly recommend looking into FXML if possible.
On Jul 16, 2012, at 9:07 AM, Elisa Deaibess wrote:
> Thanks Greg for your response.
> Currently we aren't using FXML, we are using JavaFX java api.
> On Mon, Jul 16, 2012 at 3:55 PM, Greg Brown <greg.x.brown at oracle.com> wrote:
> > We are writing a new application using JavaFX 2.x. Our application needs
> > some custom controls such as a searchfield, listoptions, ribbon,
> > breadcrumbs, etc...
> > We decided to write common reusable controls; To do that we have 2 ways:
> > 1. Make our controls extends Control and create new skin
> > 2. Extend some layout container or other control
> JavaFX 2.2 contains some new features that make #2 much easier if you are defining the structure of your custom controls using FXML. See the "Custom Components" section of the "Introduction to FXML" document in the 2.2 Javadoc for more information.
More information about the openjfx-dev